Skip to content

Commit 60e4e51

Browse files
authored
Merge pull request #128 from SPAAM-community/amdirt-command-updates
Replace old upper case with lower case commands for AMdiRT
2 parents c236dd5 + 32e254c commit 60e4e51

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

accessing-ancient-metagenomic-data.qmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ First, we will need to activate a conda environment, and then install the latest
128128
While in the `accessing-ancient-metagenomic-data` conda environment, run the following command to load the GUI into your web-browser. If the browser doesn't automatically load, copy the IP address and paste it in your browser's URL bar.
129129

130130
```bash
131-
AMDirT viewer
131+
amdirt viewer
132132
```
133133

134134
:::{.callout-note}
@@ -337,7 +337,7 @@ As in note above sometimes not all citation information can be retrieved using w
337337

338338
### AMDirT download and convert
339339

340-
If you're less of a GUI person and consider yourself a command-line wizard, you can also use the `AMDirT download` and `AMDirT convert` commands instead of the GUI version.
340+
If you're less of a GUI person and consider yourself a command-line wizard, you can also use the `amdirt download` and `amdirt convert` commands instead of the GUI version.
341341

342342
Make a new directory called `cli`, and change into it.
343343

@@ -347,12 +347,12 @@ mkdir cli && cd cli/
347347

348348
In this case you must supply your own filtered AncientMetagenomeDir samples table, and use command line options to specify which files to generate.
349349

350-
For this, we will download the samples table, use a bit of bash filtering, and then use the `AMDirT convert` command to generate the same downstream-ready files as we did with the GUI.
350+
For this, we will download the samples table, use a bit of bash filtering, and then use the `amdirt convert` command to generate the same downstream-ready files as we did with the GUI.
351351

352352
First we can download the ancientsinglegenome-hostassociated samples table with the following command.
353353

354354
```bash
355-
AMDirT download -t ancientsinglegenome-hostassociated -y samples
355+
amdirt download -t ancientsinglegenome-hostassociated -y samples
356356
```
357357

358358
This will produce a file called `ancientsinglegenome-hostassociated_samples_<DATA_VERSION>.tsv` in your current directory (by default).
@@ -375,10 +375,10 @@ In this command, we tell `awk` that the column separator is a tab, print the row
375375
awk -F "\t" 'NR==1 || $1 == "Muhlemann2020" && $7 == "Norway"' ancientsinglegenome-hostassociated_samples_<DATA_VERSION>.tsv > ancientsinglegenome-hostassociated_samples_<DATA_VERSION>_filtered.tsv
376376
```
377377

378-
Then, we can pass this filtered table to the `AMDirT convert` command to firstly retrieve the library-level metadata.
378+
Then, we can pass this filtered table to the `amdirt convert` command to firstly retrieve the library-level metadata.
379379

380380
```bash
381-
AMDirT convert --librarymetadata ancientsinglegenome-hostassociated_samples_<DATA_VERSION>_filtered.tsv ancientsinglegenome-hostassociated
381+
amdirt convert --librarymetadata ancientsinglegenome-hostassociated_samples_<DATA_VERSION>_filtered.tsv ancientsinglegenome-hostassociated
382382
```
383383

384384
This has downloaded a new file called `AncientMetagenomeDir_filtered_libraries.tsv`, which we can then further filter in the same away to match the desired libraries as we picked during the GUI section of the tutorial!
@@ -390,7 +390,7 @@ awk -F "\t" 'NR==1 || $14 == "Targeted-Capture"' AncientMetagenomeDir_filtered_l
390390
Then with these two filtered files, one for samples,and one for libraries, we can supply them to the `convert` command to generate the same download scripts, eager input samplesheet, and citation `.bib` file as we did before!
391391

392392
```bash
393-
AMDirT convert -o . --bibliography --curl --eager --libraries AncientMetagenomeDir_filtered_libraries_capturedonly.tsv ancientsinglegenome-hostassociated_samples_<DATA_VERSION>_filtered.tsv ancientsinglegenome-hostassociated
393+
amdirt convert -o . --bibliography --curl --eager --libraries AncientMetagenomeDir_filtered_libraries_capturedonly.tsv ancientsinglegenome-hostassociated_samples_<DATA_VERSION>_filtered.tsv ancientsinglegenome-hostassociated
394394
```
395395

396396
You should see a few messages saying `Writing <XYZ>`, and then if we run `ls`, you should see the same resulting files starting with `AncientMetagenomeDir_` as before with the GUI!
@@ -424,13 +424,13 @@ You can calculate this with the CLI method as follows.
424424

425425
```bash
426426
## Download the ancient metagenome table
427-
AMDirT download -t ancientmetagenome-hostassociated -y samples
427+
amdirt download -t ancientmetagenome-hostassociated -y samples
428428

429429
## Filter to just palaeofaeces since 2021
430430
awk -F "\t" 'NR==1 || $2 >= 2021 && $13 == "palaeofaeces"' ancientmetagenome-hostassociated_samples_<DATA_VERSION>.tsv > ancientmetagenome-hostassociated_samples_<DATA_VERSION>_filtered.tsv
431431

432432
## Get the library metadata of the dental calculus (might take a little bit of time)
433-
AMDirT convert --librarymetadata ancientmetagenome-hostassociated_samples_<DATA_VERSION>_filtered.tsv ancientmetagenome-hostassociated
433+
amdirt convert --librarymetadata ancientmetagenome-hostassociated_samples_<DATA_VERSION>_filtered.tsv ancientmetagenome-hostassociated
434434

435435
## Filter to just single stranded libraries
436436
awk -F "\t" 'NR==1 || $9 == "single"' AncientMetagenomeDir_filtered_libraries.tsv > AncientMetagenomeDir_filtered_libraries_singlestranded.tsv

ancient-metagenomic-pipelines.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ nextflow pull nf-core/eager
147147

148148
Next we can re-visit AMDirT (see [Accessing Ancient Metagenomic Data](accessing-ancient-metagenomic-data.qmd), [@Borry2024-dz]) to download a pre-prepared configuration file for nf-core/eager
149149

150-
1. Load AMDirt (`AMDirT viewer`), and select the latest release and the 'ancientsinglegenome-hostassociated' table
150+
1. Load AMDirt (`amdirt viewer`), and select the latest release and the 'ancientsinglegenome-hostassociated' table
151151
2. Filter the `sample_name` column to just show KZL002 and GLZ002, and select these two rows
152152
- Press the burger icon on the column
153153
- Press the filter tab and deselect everything

0 commit comments

Comments
 (0)