From f22cf0c921a2f1eb78ed807111966f3e2002307c Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Tue, 11 Oct 2022 16:41:44 +0200 Subject: [PATCH 01/23] Update usage.md --- docs/usage.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 8b8b588..aec51dc 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -145,6 +145,7 @@ Expected (uncompressed) database files for each tool are as follows: with same release version of the mOTUs tools. The database for same version tools can be thus reused for multiple runs. Users can download the database once using the script above and specify the path the database to the TSV table provided to `--databases`. +- **KrakenUniq** ## Running the pipeline @@ -199,7 +200,9 @@ Complexity filtering is primarily a run-time optimisation step. It is not necess There are currently three options for short-read complexity filtering: [`bbduk`](https://jgi.doe.gov/data-and-tools/software-tools/bbtools/bb-tools-user-guide/bbduk-guide/), [`prinseq++`](https://github.com/Adrian-Cantu/PRINSEQ-plus-plus), and [`fastp`](https://github.com/OpenGene/fastp#low-complexity-filter). -The tools offer different algorithms and parameters for removing low complexity reads. We therefore recommend reviewing the pipeline's [parameter documentation](https://nf-co.re/taxprofiler/parameters) and the documentation of the tools (see links above) to decide on optimal methods and parameters for your dataset. +There is one option for long-read quality filtering: [`Filtlong`](https://github.com/rrwick/Filtlong) + +The tools offer different algorithms and parameters for removing low complexity reads and quality filtering. We therefore recommend reviewing the pipeline's [parameter documentation](https://nf-co.re/taxprofiler/parameters) and the documentation of the tools (see links above) to decide on optimal methods and parameters for your dataset. You can optionally save the FASTQ output of the run merging with the `--save_complexityfiltered_reads`. If running with `fastp`, complexity filtering happens inclusively within the earlier shortread preprocessing step. Therefore there will not be an independent pipeline step for complexity filtering, and no independent FASTQ file (i.e. `--save_complexityfiltered_reads` will be ignored) - your complexity filtered reads will also be in the `fastp/` folder in the same file(s) as the preprocessed read. From 17b2ad3199aede3f695b1085869550c49eda97ec Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Tue, 11 Oct 2022 17:29:41 +0200 Subject: [PATCH 02/23] Add prettier --- docs/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index aec51dc..93ec0a9 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -200,7 +200,7 @@ Complexity filtering is primarily a run-time optimisation step. It is not necess There are currently three options for short-read complexity filtering: [`bbduk`](https://jgi.doe.gov/data-and-tools/software-tools/bbtools/bb-tools-user-guide/bbduk-guide/), [`prinseq++`](https://github.com/Adrian-Cantu/PRINSEQ-plus-plus), and [`fastp`](https://github.com/OpenGene/fastp#low-complexity-filter). -There is one option for long-read quality filtering: [`Filtlong`](https://github.com/rrwick/Filtlong) +There is one option for long-read quality filtering: [`Filtlong`](https://github.com/rrwick/Filtlong) The tools offer different algorithms and parameters for removing low complexity reads and quality filtering. We therefore recommend reviewing the pipeline's [parameter documentation](https://nf-co.re/taxprofiler/parameters) and the documentation of the tools (see links above) to decide on optimal methods and parameters for your dataset. From d09a8e054535e76b6c41e45598a7d14273d91244 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Tue, 11 Oct 2022 17:44:48 +0200 Subject: [PATCH 03/23] [skip ci] --- docs/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 93ec0a9..3c0e17d 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -145,7 +145,7 @@ Expected (uncompressed) database files for each tool are as follows: with same release version of the mOTUs tools. The database for same version tools can be thus reused for multiple runs. Users can download the database once using the script above and specify the path the database to the TSV table provided to `--databases`. -- **KrakenUniq** +- **KrakenUniq** WIP ## Running the pipeline From 0b16010b92d7362e1accdc621f17fee99b824110 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:39:03 +0200 Subject: [PATCH 04/23] Add tutorials section --- docs/usage.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 3c0e17d..0be44ed 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -228,7 +228,7 @@ Activating this functionality will concatenate the FASTQ files with the same sam You can optionally save the FASTQ output of the run merging with the `--save_runmerged_reads`. -##### Profiling +#### Profiling ###### MALT @@ -429,6 +429,20 @@ We recommend adding the following line to your environment to limit this (typica NXF_OPTS='-Xms1g -Xmx4g' ``` +## Tutorials + +### Tutorial - How to create your custom database + +#### Kraken2 +Kraken2 allows the user to build custom databases. You can follow Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#custom-databases). + +#### Centrifuge +Centrifuge is similar to Kraken2 in that it enables to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). + +#### Kaiju +WIP + + ## Troubleshooting and FAQs ### I get a warning during centrifuge_kreport process with exit status 255. From e98cd038c767705e6dce1fe119b44995a6e8d47f Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Wed, 12 Oct 2022 12:56:54 +0200 Subject: [PATCH 05/23] [skip ci] Add description for MALT --- docs/usage.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 0be44ed..5769bd9 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -440,8 +440,24 @@ Kraken2 allows the user to build custom databases. You can follow Kraken2 [tutor Centrifuge is similar to Kraken2 in that it enables to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). #### Kaiju -WIP +It is possible to [create custom databases](https://github.com/bioinformatics-centre/kaiju#custom-database) with Kaiju. +#### MALT +To create a custom database for MALT, the user should download and unzip the following database which lists all NCBI records. The input files are specified using -i and the index is specified using -d. A detailed description for each argument can be found [here](https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf) + +```bash +wget https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Feb2022.db.zip +unzip megan-nucl-Feb2022.db +malt-build -i path/to/fasta/files/*.{fna,fa} -s DNA -d index -t 8 -st 4 -a2t megan-nucl-Feb2022.db +``` + +#### Bracken + +#### KrakenUniq + +#### DIAMOND + +#### mOTUs ## Troubleshooting and FAQs From 97fbc2bceb54cacc66f97eccdb250b58779442ee Mon Sep 17 00:00:00 2001 From: sofstam Date: Fri, 9 Dec 2022 12:58:51 +0100 Subject: [PATCH 06/23] Update usage.md --- docs/usage.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 8ec435a..36d3a8d 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -185,7 +185,7 @@ work # Directory containing the nextflow working files ### Sequencing quality control -nf-core taxprofiler offers [`falco`][https://github.com/smithlabcode/falco] as an alternative option to [`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/). +nf-core taxprofiler offers [`falco`](https://github.com/smithlabcode/falco) as an alternative option to [`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/). ### Preprocessing Steps @@ -202,14 +202,14 @@ Raw sequencing read processing in the form of adapter clipping and paired-end re It is highly recommended to run this on raw reads to remove artifacts from sequencing that can cause false positive identification of taxa (e.g. contaminated reference genomes) and/or skews in taxonomic abundance profiles. -There are currently two options for short-read preprocessing: `fastp` or `adapterremoval`. +There are currently two options for short-read preprocessing: [`fastp`](https://github.com/OpenGene/fastp) or [`adapterremoval`](https://github.com/MikkelSchubert/adapterremoval). For adapter clipping, you can either rely on tool default adapter sequences, or supply your own adapters (`--shortread_qc_adapter1` and `--shortread_qc_adapter2`) By default, paired-end merging is not activated and paired-end profiling is performed where supported otherwise pairs will be independently profiled. If paired-end merging is activated you can also specify whether to include unmerged reads in the reads sent for profiling (`--shortread_qc_mergepairs` and `--shortread_qc_includeunmerged`). You can also turn off clipping and only perform paired-end merging, if requested. This can be useful when processing data downloaded from the ENA, SRA, or DDBJ (`--shortread_qc_skipadaptertrim`). Both tools support length filtering of reads and can be tuned with `--shortread_qc_minlength`. Performing length filtering can be useful to remove short (often low sequencing complexity) sequences that result in unspecific classification and therefore slow down runtime during profiling, with minimal gain. -There is currently one option for long-read Oxford Nanopore processing: `porechop`. +There is currently one option for long-read Oxford Nanopore processing: [`porechop`](https://github.com/rrwick/Porechop). For both short-read and long-read preprocessing, you can optionally save the resulting processed reads with `--save_preprocessed_reads`. @@ -227,6 +227,8 @@ The tools offer different algorithms and parameters for removing low complexity You can optionally save the FASTQ output of the run merging with the `--save_complexityfiltered_reads`. If running with `fastp`, complexity filtering happens inclusively within the earlier shortread preprocessing step. Therefore there will not be an independent pipeline step for complexity filtering, and no independent FASTQ file (i.e. `--save_complexityfiltered_reads` will be ignored) - your complexity filtered reads will also be in the `fastp/` folder in the same file(s) as the preprocessed read. +**We do not any read preprocessing or complexity filtering if you are using ONTs Guppy toolkit for basecalling and post-processing.** + #### Host Removal Removal of possible-host reads from FASTQ files prior profiling can be activated with `--perform_shortread_hostremoval` or `--perform_longread_hostremoval`. @@ -480,7 +482,7 @@ NXF_OPTS='-Xms1g -Xmx4g' Kraken2 allows the user to build custom databases. You can follow Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#custom-databases). #### Centrifuge -Centrifuge is similar to Kraken2 in that it enables to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). +Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). #### Kaiju It is possible to [create custom databases](https://github.com/bioinformatics-centre/kaiju#custom-database) with Kaiju. @@ -495,12 +497,29 @@ malt-build -i path/to/fasta/files/*.{fna,fa} -s DNA -d index -t 8 -st 4 -a2t meg ``` #### Bracken +You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.shtml?t=manual) to build a custom database. Alternatively, you can use one of the indexes that can be found [here](https://benlangmead.github.io/aws-indexes/k2). #### KrakenUniq +For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2) #### DIAMOND +To create a custom database for DIAMOND, the user should download and unzip the NCBI's taxonomy files. The `makedb` needs to be executed afterwards. A detailed description can be found [here](https://gensoft.pasteur.fr/docs/diamond/0.8.22/diamond_manual.pdf) + +```bash +wget ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip +unzip taxdmp.zip + +## warning: large file! +wget ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/prot.accession2taxid.FULL.gz + +## warning: takes a long time! +cat ../raw/*.faa | diamond makedb -d testdb-diamond --taxonmap prot.accession2taxid.FULL.gz --taxonnodes nodes.dmp --taxonnames names.dmp + +rm *dmp *txt *gz *prt *zip +``` #### mOTUs +A detailed description on how to download mOTUs database can be found [here](https://github.com/motu-tool/mOTUs) ## Troubleshooting and FAQs From a622dcaef0f94e30c5062de114f6ef34f7114f06 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Fri, 9 Dec 2022 13:59:37 +0100 Subject: [PATCH 07/23] Delete one line --- docs/usage.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 6ad005c..8f6d776 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -162,7 +162,6 @@ Expected (uncompressed) database files for each tool are as follows: with same release version of the mOTUs tools. The database for same version tools can be thus reused for multiple runs. Users can download the database once using the script above and specify the path the database to the TSV table provided to `--databases`. -- **KrakenUniq** WIP ## Running the pipeline From 98f3ab9fd1ba0e9a8c1bf5adcf5b5dd8bb7993f1 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Fri, 9 Dec 2022 15:35:51 +0100 Subject: [PATCH 08/23] Apply prettier --- docs/usage.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/usage.md b/docs/usage.md index 8f6d776..d17d168 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -484,15 +484,19 @@ NXF_OPTS='-Xms1g -Xmx4g' ### Tutorial - How to create your custom database #### Kraken2 + Kraken2 allows the user to build custom databases. You can follow Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#custom-databases). #### Centrifuge + Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). #### Kaiju + It is possible to [create custom databases](https://github.com/bioinformatics-centre/kaiju#custom-database) with Kaiju. #### MALT + To create a custom database for MALT, the user should download and unzip the following database which lists all NCBI records. The input files are specified using -i and the index is specified using -d. A detailed description for each argument can be found [here](https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf) ```bash @@ -502,12 +506,15 @@ malt-build -i path/to/fasta/files/*.{fna,fa} -s DNA -d index -t 8 -st 4 -a2t meg ``` #### Bracken + You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.shtml?t=manual) to build a custom database. Alternatively, you can use one of the indexes that can be found [here](https://benlangmead.github.io/aws-indexes/k2). #### KrakenUniq + For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2) #### DIAMOND + To create a custom database for DIAMOND, the user should download and unzip the NCBI's taxonomy files. The `makedb` needs to be executed afterwards. A detailed description can be found [here](https://gensoft.pasteur.fr/docs/diamond/0.8.22/diamond_manual.pdf) ```bash @@ -524,6 +531,7 @@ rm *dmp *txt *gz *prt *zip ``` #### mOTUs + A detailed description on how to download mOTUs database can be found [here](https://github.com/motu-tool/mOTUs) ## Troubleshooting and FAQs From 896a39e68dffdebee06cfd698f231773fade76b0 Mon Sep 17 00:00:00 2001 From: sofstam Date: Mon, 12 Dec 2022 13:19:59 +0100 Subject: [PATCH 09/23] Apply review suggestions --- docs/usage.md | 58 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index d17d168..88fbf10 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -162,6 +162,7 @@ Expected (uncompressed) database files for each tool are as follows: with same release version of the mOTUs tools. The database for same version tools can be thus reused for multiple runs. Users can download the database once using the script above and specify the path the database to the TSV table provided to `--databases`. +- **KrakenUniq** WIP ## Running the pipeline @@ -184,7 +185,7 @@ work # Directory containing the nextflow working files ### Sequencing quality control -nf-core taxprofiler offers [`falco`](https://github.com/smithlabcode/falco) as an alternative option to [`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/). +[`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) gives general quality metrics about your reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. nf-core taxprofiler offers [`falco`](https://github.com/smithlabcode/falco) as an alternative option. ### Preprocessing Steps @@ -226,7 +227,7 @@ The tools offer different algorithms and parameters for removing low complexity You can optionally save the FASTQ output of the run merging with the `--save_complexityfiltered_reads`. If running with `fastp`, complexity filtering happens inclusively within the earlier shortread preprocessing step. Therefore there will not be an independent pipeline step for complexity filtering, and no independent FASTQ file (i.e. `--save_complexityfiltered_reads` will be ignored) - your complexity filtered reads will also be in the `fastp/` folder in the same file(s) as the preprocessed read. -**We do not any read preprocessing or complexity filtering if you are using ONTs Guppy toolkit for basecalling and post-processing.** +**We do not recommend performing any read preprocessing or complexity filtering if you are using ONTs Guppy toolkit for basecalling and post-processing.** #### Host Removal @@ -484,19 +485,56 @@ NXF_OPTS='-Xms1g -Xmx4g' ### Tutorial - How to create your custom database #### Kraken2 +Kraken2 allows the user to build custom databases. + +To install a taxonomy: + +```bash +kraken2-build --download-taxonomy --db $DBNAME +``` + +To install one or more reference libraries: + +```bash +--download-library bacteria --db $DBNAME +--download-library viral --db $DBNAME +--download-library archaea --db $DBNAME +``` + +To add more genomes: + +```bash +kraken2-build --add-to-library genome.fa --db $DBNAME +``` + +You can follow Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#custom-databases) for a more detailed description. -Kraken2 allows the user to build custom databases. You can follow Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#custom-databases). #### Centrifuge +Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). The user should download taxonomy files, make custom `seqid2taxid.map` and combine the fasta files together. -Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). +```bash +centrifuge-download -o taxonomy taxonomy + +## custom seqid2taxid.map +NC_001133.9 4392 +NC_012920.1 9606 +NC_001134.8 4392 +NC_001135.5 4392 + +cat *.{fa,fna} > input-sequences.fna +centrifuge-build -p 4 --conversion-table seqid2taxid.map --taxonomy-tree taxonomy/nodes.dmp --name-table taxonomy/names.dmp input-sequences.fna taxprofiler_cf +``` #### Kaiju - It is possible to [create custom databases](https://github.com/bioinformatics-centre/kaiju#custom-database) with Kaiju. -#### MALT +```bash +kaiju-mkbwt -n 5 -a ACDEFGHIKLMNPQRSTVWY -o proteins proteins.faa +kaiju-mkfmi proteins +``` +#### MALT To create a custom database for MALT, the user should download and unzip the following database which lists all NCBI records. The input files are specified using -i and the index is specified using -d. A detailed description for each argument can be found [here](https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf) ```bash @@ -506,16 +544,13 @@ malt-build -i path/to/fasta/files/*.{fna,fa} -s DNA -d index -t 8 -st 4 -a2t meg ``` #### Bracken - You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.shtml?t=manual) to build a custom database. Alternatively, you can use one of the indexes that can be found [here](https://benlangmead.github.io/aws-indexes/k2). #### KrakenUniq - -For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2) +For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2). But if you wish to build your own, please see the [documentation](https://github.com/fbreitwieser/krakenuniq/blob/master/README.md#custom-databases-with-ncbi-taxonomy). #### DIAMOND - -To create a custom database for DIAMOND, the user should download and unzip the NCBI's taxonomy files. The `makedb` needs to be executed afterwards. A detailed description can be found [here](https://gensoft.pasteur.fr/docs/diamond/0.8.22/diamond_manual.pdf) +To create a custom database for DIAMOND, the user should download and unzip the NCBI's taxonomy files. The `makedb` needs to be executed afterwards. A detailed description can be found [here](https://github.com/bbuchfink/diamond/wiki/1.-Tutorial) ```bash wget ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip @@ -531,7 +566,6 @@ rm *dmp *txt *gz *prt *zip ``` #### mOTUs - A detailed description on how to download mOTUs database can be found [here](https://github.com/motu-tool/mOTUs) ## Troubleshooting and FAQs From bd5cd0a89710dbcb80133baa54c071a5d8583e49 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Mon, 12 Dec 2022 13:34:53 +0100 Subject: [PATCH 10/23] Prettier --- docs/usage.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 88fbf10..defef04 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -485,6 +485,7 @@ NXF_OPTS='-Xms1g -Xmx4g' ### Tutorial - How to create your custom database #### Kraken2 + Kraken2 allows the user to build custom databases. To install a taxonomy: @@ -509,8 +510,8 @@ kraken2-build --add-to-library genome.fa --db $DBNAME You can follow Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#custom-databases) for a more detailed description. - #### Centrifuge + Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). The user should download taxonomy files, make custom `seqid2taxid.map` and combine the fasta files together. ```bash @@ -527,6 +528,7 @@ centrifuge-build -p 4 --conversion-table seqid2taxid.map --taxonomy-tree taxonom ``` #### Kaiju + It is possible to [create custom databases](https://github.com/bioinformatics-centre/kaiju#custom-database) with Kaiju. ```bash @@ -535,6 +537,7 @@ kaiju-mkfmi proteins ``` #### MALT + To create a custom database for MALT, the user should download and unzip the following database which lists all NCBI records. The input files are specified using -i and the index is specified using -d. A detailed description for each argument can be found [here](https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf) ```bash @@ -544,12 +547,15 @@ malt-build -i path/to/fasta/files/*.{fna,fa} -s DNA -d index -t 8 -st 4 -a2t meg ``` #### Bracken + You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.shtml?t=manual) to build a custom database. Alternatively, you can use one of the indexes that can be found [here](https://benlangmead.github.io/aws-indexes/k2). #### KrakenUniq + For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2). But if you wish to build your own, please see the [documentation](https://github.com/fbreitwieser/krakenuniq/blob/master/README.md#custom-databases-with-ncbi-taxonomy). #### DIAMOND + To create a custom database for DIAMOND, the user should download and unzip the NCBI's taxonomy files. The `makedb` needs to be executed afterwards. A detailed description can be found [here](https://github.com/bbuchfink/diamond/wiki/1.-Tutorial) ```bash @@ -566,6 +572,7 @@ rm *dmp *txt *gz *prt *zip ``` #### mOTUs + A detailed description on how to download mOTUs database can be found [here](https://github.com/motu-tool/mOTUs) ## Troubleshooting and FAQs From a99f89af7758143c26c788dc46a336d2e48059f1 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Mon, 12 Dec 2022 16:30:28 +0100 Subject: [PATCH 11/23] Apply review suggestions --- docs/usage.md | 52 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index defef04..f52e0ea 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -227,7 +227,7 @@ The tools offer different algorithms and parameters for removing low complexity You can optionally save the FASTQ output of the run merging with the `--save_complexityfiltered_reads`. If running with `fastp`, complexity filtering happens inclusively within the earlier shortread preprocessing step. Therefore there will not be an independent pipeline step for complexity filtering, and no independent FASTQ file (i.e. `--save_complexityfiltered_reads` will be ignored) - your complexity filtered reads will also be in the `fastp/` folder in the same file(s) as the preprocessed read. -**We do not recommend performing any read preprocessing or complexity filtering if you are using ONTs Guppy toolkit for basecalling and post-processing.** +> ⚠️ For nanopore data: we do not recommend performing any read preprocessing or complexity filtering if you are using ONTs Guppy toolkit for basecalling and post-processing. #### Host Removal @@ -484,31 +484,43 @@ NXF_OPTS='-Xms1g -Xmx4g' ### Tutorial - How to create your custom database +Here we will give brief guidance on how to build databases for each supported taxonomic profiler. You should always consult the documentation of each toolfor more information, how we provide these as quick reference guides. +The following tutorial assumes you already have the tool available (e.g. installed locally, or via conda, docker etc.), and you have already downloaded the FASTA files you wish to build into a database. + #### Kraken2 -Kraken2 allows the user to build custom databases. - -To install a taxonomy: +> These are instructions are based on Kraken 2.1.2 +> To build a Kraken2 database you need two components: a taxonomy (consisting of `names.dmp`, `nodes.dmp`, and `*accession2taxid`) files, and the FASTA files you wish to include. +> To install pull the NCBI taxonomy you can run the following: ```bash -kraken2-build --download-taxonomy --db $DBNAME +kraken2-build --download-taxonomy --db ``` -To install one or more reference libraries: +You can then add your FASTA files with the following build command. ```bash ---download-library bacteria --db $DBNAME ---download-library viral --db $DBNAME ---download-library archaea --db $DBNAME +kraken2-build --add-to-library *.fna --db ``` -To add more genomes: +You can repeat this step multiple times to iteratively add more genomes prior building. + +You can also automatical download and add 'standard' libraries provided by Kraken2 (e.g. bacteria on RefSeq) ```bash -kraken2-build --add-to-library genome.fa --db $DBNAME +kraken2-build --download-library bacteria --db ``` -You can follow Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#custom-databases) for a more detailed description. +Once all genomes are added to the library, you can build the database (and optionally clean it up): + +```bash +kraken2-build --build --db +kraken2-build --clean--db +``` + +You can then add the / path to your nf-core/taxprofiler database input sheet. + +You can follow the Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#custom-databases) for a more detailed description. #### Centrifuge @@ -538,14 +550,22 @@ kaiju-mkfmi proteins #### MALT -To create a custom database for MALT, the user should download and unzip the following database which lists all NCBI records. The input files are specified using -i and the index is specified using -d. A detailed description for each argument can be found [here](https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf) +MALT does not provide any default databases for profiling, therefore you must build your own. +You need FASTA files to include, and an (unzipped) [MEGAN mapping 'db' file](https://software-ab.informatik.uni-tuebingen.de/download/megan6/) for your FASTA type. +In addition to the input directory, output directory, and the mapping file database, you also need to specify the sequence type (DNA or Protein) with the `-s` flag. ```bash -wget https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Feb2022.db.zip -unzip megan-nucl-Feb2022.db -malt-build -i path/to/fasta/files/*.{fna,fa} -s DNA -d index -t 8 -st 4 -a2t megan-nucl-Feb2022.db +malt-build -i ///*.{fna,fa,fasta} -a2t //.db -d / -s DNA ``` +You can then add the / path to your nf-core/taxprofiler database input sheet. + +⚠️ MALT generates very large database files and requires large amounts of RAM. You can reduce both by increasing the step size `-st` (with a reduction in sensitivity). + +MALT-build can be multi-threaded with `-t` to speed up building. + +See the [MALT manual](https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf) for more information. + #### Bracken You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.shtml?t=manual) to build a custom database. Alternatively, you can use one of the indexes that can be found [here](https://benlangmead.github.io/aws-indexes/k2). From 97e48075c8926922a322c7c072ca680d3961326d Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Tue, 13 Dec 2022 09:37:43 +0100 Subject: [PATCH 12/23] Apply review suggestion Co-authored-by: James A. Fellows Yates --- docs/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index f52e0ea..6c1214d 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -185,7 +185,7 @@ work # Directory containing the nextflow working files ### Sequencing quality control -[`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) gives general quality metrics about your reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. nf-core taxprofiler offers [`falco`](https://github.com/smithlabcode/falco) as an alternative option. +[`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) gives general quality metrics about your reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. nf-core taxprofiler offers [`falco`](https://github.com/smithlabcode/falco) as an drop-in replacement, with supposedly better improvement particularly for long reads. ### Preprocessing Steps From 1eb3da758b04893fbe2199d8873cad461fc6308b Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Tue, 13 Dec 2022 09:38:09 +0100 Subject: [PATCH 13/23] Apply review suggestion Co-authored-by: James A. Fellows Yates --- docs/usage.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 6c1214d..c45d828 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -568,8 +568,12 @@ See the [MALT manual](https://software-ab.informatik.uni-tuebingen.de/download/m #### Bracken -You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.shtml?t=manual) to build a custom database. Alternatively, you can use one of the indexes that can be found [here](https://benlangmead.github.io/aws-indexes/k2). +Bracken does not provide any default databases for profiling, but rather building upon Kraken2 databases. See [Kraken2](#kraken2) for more information on how to build these. +In addition to a Kraken2 database, you also need to have the (average) read lengths (in bp) of your sequencing experiment, the K-mer size used to build the Kraken2 database, and Kraken2 available on your machine. + +```bash +bracken-build -d -k -l #### KrakenUniq For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2). But if you wish to build your own, please see the [documentation](https://github.com/fbreitwieser/krakenuniq/blob/master/README.md#custom-databases-with-ncbi-taxonomy). From f80adee9e2d1ff4931dcc368890ff7a9d250c2eb Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Tue, 13 Dec 2022 09:50:05 +0100 Subject: [PATCH 14/23] Review suggestions and prettier --- docs/usage.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/usage.md b/docs/usage.md index c45d828..44d385a 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -174,6 +174,8 @@ nextflow run nf-core/taxprofiler --input samplesheet.csv --databases databases.c This will launch the pipeline with the `docker` configuration profile. See below for more information about profiles. +When running nf-core/taxprofiler, every step and tool is 'opt in'. To run a given profiler you must make sure to supply both a database in your `.csv` and supply `--run_` flag to your command. Omitting either will result in the profiling tool not executing. If you wish to perform pre-processing (adapter clipping, merge running etc.) or post-processing (visualisation) steps, these are also opt in `--perform_` and in some cases may also require additional files. Please check the parameters tab of this documentation for more information. + Note that the pipeline will create the following files in your working directory: ```bash @@ -574,6 +576,14 @@ In addition to a Kraken2 database, you also need to have the (average) read leng ```bash bracken-build -d -k -l +``` + +> 🛈 You can speed up database construction by supplying the threads parameter (`-t`). + +> 🛈 If you do not have Kraken2 in your `$PATH` you can point to the binary with `-x ///kraken2`. + +You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.shtml?t=manual) for more information. Alternatively, you can use one of the indexes that can be found [here](https://benlangmead.github.io/aws-indexes/k2). + #### KrakenUniq For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2). But if you wish to build your own, please see the [documentation](https://github.com/fbreitwieser/krakenuniq/blob/master/README.md#custom-databases-with-ncbi-taxonomy). From d99706f43d2df8e3524b5656e99d7ec602805a85 Mon Sep 17 00:00:00 2001 From: sofstam Date: Tue, 13 Dec 2022 11:23:07 +0100 Subject: [PATCH 15/23] Move database section and alphabetical order --- docs/usage.md | 271 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 165 insertions(+), 106 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 44d385a..f6168a6 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -103,66 +103,22 @@ nf-core/taxprofiler will automatically decompress and extract any compressed arc Expected (uncompressed) database files for each tool are as follows: -- **MALT** output of `malt-build`. A directory containing: - - `ref.idx` - - `taxonomy.idx` - - `taxonomy.map` - - `index0.idx` - - `table0.idx` - - `table0.db` - - `ref.inf` - - `ref.db` - - `taxonomy.tre` -- **Kraken2** output of `kraken2-build` command(s) A directory containing: - - `opts.k2d` - - `hash.k2d` - - `taxo.k2d` -- **Bracken** output of a combined `kraken2-` and `bracken-build` process. Please see the [documentation on Bracken](https://github.com/jenniferlu717/Bracken#running-bracken-easy-version) for details. The output is a directory containing files per expected sequencing read length similarly to: - - `hash.k2d` - - `opts.k2d` - - `taxo.k2d` - - `database.kraken` - - `database100mers.kmer_distrib` - - `database100mers.kraken` - - `database150mers.kmer_distrib` - - `database150mers.kraken` -- **KrakenUniq** output of `krakenuniq-build` command(s) A directory containing: - - `opts.k2d` - - `hash.k2d` - - `taxo.k2d` - - `database.idx` - - `taxDB` -- **Centrifuge** output of `centrifuge-build`. A directory containing: - - `..cf` - - `..cf` - - `..cf` - - `..cf` -- **MetaPhlAn3** generated with `metaphlan --install` or downloaded from links on the [MetaPhlAn3 wiki](https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-3.0#customizing-the-database). A directory containing: - - `mpa_v30_CHOCOPhlAn_201901.pkl` - - `mpa_v30_CHOCOPhlAn_201901.pkl` - - `mpa_v30_CHOCOPhlAn_201901.fasta` - - `mpa_v30_CHOCOPhlAn_201901.3.bt2` - - `mpa_v30_CHOCOPhlAn_201901.4.bt2` - - `mpa_v30_CHOCOPhlAn_201901.1.bt2` - - `mpa_v30_CHOCOPhlAn_201901.2.bt2` - - `mpa_v30_CHOCOPhlAn_201901.rev.1.bt2` - - `mpa_v30_CHOCOPhlAn_201901.rev.2.bt2` - - `mpa_latest` -- **Kaiju** output of `kaiju-makedb`. A directory containing: - - `kaiju_db_*.fmi` - - `nodes.dmp` - - `names.dmp` -- **DIAMOND** output of `diamond makedb`. Note: requires building with taxonomy files - to generate taxonomic profile. See [DIAMOND documentation](https://github.com/bbuchfink/diamond/wiki/3.-Command-line-options#makedb-options). A file named: - - `.dmnd` -- **mOTUs** is composed of code and database together. The mOTUs tools +- [**Bracken** output](#bracken) of a combined `kraken2-` and `bracken-build` process. Please see the [documentation on Bracken](https://github.com/jenniferlu717/Bracken#running-bracken-easy-version) for details. The output is a directory containing files per expected sequencing read length. +- [**Centrifuge** output](#centrifuge) of `centrifuge-build`. +- [**DIAMOND** output](#diamond) of `diamond makedb`. Note: requires building with taxonomy files + to generate taxonomic profile. See [DIAMOND documentation](https://github.com/bbuchfink/diamond/wiki/3.-Command-line-options#makedb-options). +- [**Kaiju** output](#kaiju) of `kaiju-makedb`. +- [**Kraken2** output](#kraken2) of `kraken2-build` command(s). +- [**KrakenUniq** output](#krakenuniq) of `krakenuniq-build` command(s). +- [**MALT** output](#malt) of `malt-build`. +- [**MetaPhlAn3**](#metaphlan3) generated with `metaphlan --install` or downloaded from links on the [MetaPhlAn3 wiki](https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-3.0#customizing-the-database). +- [**mOTUs**](#motus) is composed of code and database together. The mOTUs tools [`downloadDB`](https://github.com/motu-tool/mOTUs/blob/master/motus/downloadDB.py) is used to prepare the mOTUs database and create a file with the version information. The database download step can be time consuming and the database will be consisting with same release version of the mOTUs tools. The database for same version tools can be thus reused for multiple runs. Users can download the database once using the script above and specify the path the database to the TSV table provided to `--databases`. -- **KrakenUniq** WIP ## Running the pipeline @@ -489,8 +445,121 @@ NXF_OPTS='-Xms1g -Xmx4g' Here we will give brief guidance on how to build databases for each supported taxonomic profiler. You should always consult the documentation of each toolfor more information, how we provide these as quick reference guides. The following tutorial assumes you already have the tool available (e.g. installed locally, or via conda, docker etc.), and you have already downloaded the FASTA files you wish to build into a database. +#### Bracken + +
+Output files + +- `bracken` + - `hash.k2d` + - `opts.k2d` + - `taxo.k2d` + - `database.kraken` + - `database100mers.kmer_distrib` + - `database100mers.kraken` + - `database150mers.kmer_distrib` + - `database150mers.kraken` + +
+ +Bracken does not provide any default databases for profiling, but rather building upon Kraken2 databases. See [Kraken2](#kraken2) for more information on how to build these. + +In addition to a Kraken2 database, you also need to have the (average) read lengths (in bp) of your sequencing experiment, the K-mer size used to build the Kraken2 database, and Kraken2 available on your machine. + +```bash +bracken-build -d -k -l +``` + +> 🛈 You can speed up database construction by supplying the threads parameter (`-t`). + +> 🛈 If you do not have Kraken2 in your `$PATH` you can point to the binary with `-x ///kraken2`. + +You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.shtml?t=manual) for more information. Alternatively, you can use one of the indexes that can be found [here](https://benlangmead.github.io/aws-indexes/k2). + +#### Centrifuge + +
+Output files + +- `centrifuge` + - `..cf` + - `..cf` + - `..cf` + - `..cf` + +
+ +Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). The user should download taxonomy files, make custom `seqid2taxid.map` and combine the fasta files together. + +```bash +centrifuge-download -o taxonomy taxonomy + +## custom seqid2taxid.map +NC_001133.9 4392 +NC_012920.1 9606 +NC_001134.8 4392 +NC_001135.5 4392 + +cat *.{fa,fna} > input-sequences.fna +centrifuge-build -p 4 --conversion-table seqid2taxid.map --taxonomy-tree taxonomy/nodes.dmp --name-table taxonomy/names.dmp input-sequences.fna taxprofiler_cf +``` + +#### DIAMOND + +
+Output files + +- `diamond` + - `.dmnd` + +
+ +To create a custom database for DIAMOND, the user should download and unzip the NCBI's taxonomy files. The `makedb` needs to be executed afterwards. A detailed description can be found [here](https://github.com/bbuchfink/diamond/wiki/1.-Tutorial) + +```bash +wget ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip +unzip taxdmp.zip + +## warning: large file! +wget ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/prot.accession2taxid.FULL.gz + +## warning: takes a long time! +cat ../raw/*.faa | diamond makedb -d testdb-diamond --taxonmap prot.accession2taxid.FULL.gz --taxonnodes nodes.dmp --taxonnames names.dmp + +rm *dmp *txt *gz *prt *zip +``` + +#### Kaiju + +
+Output files + +- `kaiju` + - `kaiju_db_*.fmi` + - `nodes.dmp` + - `names.dmp` + +
+ +It is possible to [create custom databases](https://github.com/bioinformatics-centre/kaiju#custom-database) with Kaiju. + +```bash +kaiju-mkbwt -n 5 -a ACDEFGHIKLMNPQRSTVWY -o proteins proteins.faa +kaiju-mkfmi proteins +``` + #### Kraken2 +
+Output files + +- `kraken2` + - `opts.k2d` + - `hash.k2d` + - `taxo.k2d` + +
+ > These are instructions are based on Kraken 2.1.2 > To build a Kraken2 database you need two components: a taxonomy (consisting of `names.dmp`, `nodes.dmp`, and `*accession2taxid`) files, and the FASTA files you wish to include. > To install pull the NCBI taxonomy you can run the following: @@ -524,34 +593,41 @@ You can then add the / path to your nf-core/taxprofiler database i You can follow the Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#custom-databases) for a more detailed description. -#### Centrifuge +#### KrakenUniq -Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). The user should download taxonomy files, make custom `seqid2taxid.map` and combine the fasta files together. +
+Output files -```bash -centrifuge-download -o taxonomy taxonomy +- `krakenuniq` + - `opts.k2d` + - `hash.k2d` + - `taxo.k2d` + - `database.idx` + - `taxDB` -## custom seqid2taxid.map -NC_001133.9 4392 -NC_012920.1 9606 -NC_001134.8 4392 -NC_001135.5 4392 +
-cat *.{fa,fna} > input-sequences.fna -centrifuge-build -p 4 --conversion-table seqid2taxid.map --taxonomy-tree taxonomy/nodes.dmp --name-table taxonomy/names.dmp input-sequences.fna taxprofiler_cf -``` +For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2). But if you wish to build your own, please see the [documentation](https://github.com/fbreitwieser/krakenuniq/blob/master/README.md#custom-databases-with-ncbi-taxonomy). -#### Kaiju - -It is possible to [create custom databases](https://github.com/bioinformatics-centre/kaiju#custom-database) with Kaiju. - -```bash -kaiju-mkbwt -n 5 -a ACDEFGHIKLMNPQRSTVWY -o proteins proteins.faa -kaiju-mkfmi proteins -``` #### MALT +
+Output files + +- `malt` + - `ref.idx` + - `taxonomy.idx` + - `taxonomy.map` + - `index0.idx` + - `table0.idx` + - `table0.db` + - `ref.inf` + - `ref.db` + - `taxonomy.tre` + +
+ MALT does not provide any default databases for profiling, therefore you must build your own. You need FASTA files to include, and an (unzipped) [MEGAN mapping 'db' file](https://software-ab.informatik.uni-tuebingen.de/download/megan6/) for your FASTA type. In addition to the input directory, output directory, and the mapping file database, you also need to specify the sequence type (DNA or Protein) with the `-s` flag. @@ -568,42 +644,25 @@ MALT-build can be multi-threaded with `-t` to speed up building. See the [MALT manual](https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf) for more information. -#### Bracken -Bracken does not provide any default databases for profiling, but rather building upon Kraken2 databases. See [Kraken2](#kraken2) for more information on how to build these. +#### MetaPhlAn3 -In addition to a Kraken2 database, you also need to have the (average) read lengths (in bp) of your sequencing experiment, the K-mer size used to build the Kraken2 database, and Kraken2 available on your machine. +
+Output files -```bash -bracken-build -d -k -l -``` +- `metaphlan3` + - `mpa_v30_CHOCOPhlAn_201901.pkl` + - `mpa_v30_CHOCOPhlAn_201901.pkl` + - `mpa_v30_CHOCOPhlAn_201901.fasta` + - `mpa_v30_CHOCOPhlAn_201901.3.bt2` + - `mpa_v30_CHOCOPhlAn_201901.4.bt2` + - `mpa_v30_CHOCOPhlAn_201901.1.bt2` + - `mpa_v30_CHOCOPhlAn_201901.2.bt2` + - `mpa_v30_CHOCOPhlAn_201901.rev.1.bt2` + - `mpa_v30_CHOCOPhlAn_201901.rev.2.bt2` + - `mpa_latest` -> 🛈 You can speed up database construction by supplying the threads parameter (`-t`). - -> 🛈 If you do not have Kraken2 in your `$PATH` you can point to the binary with `-x ///kraken2`. - -You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.shtml?t=manual) for more information. Alternatively, you can use one of the indexes that can be found [here](https://benlangmead.github.io/aws-indexes/k2). - -#### KrakenUniq - -For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2). But if you wish to build your own, please see the [documentation](https://github.com/fbreitwieser/krakenuniq/blob/master/README.md#custom-databases-with-ncbi-taxonomy). - -#### DIAMOND - -To create a custom database for DIAMOND, the user should download and unzip the NCBI's taxonomy files. The `makedb` needs to be executed afterwards. A detailed description can be found [here](https://github.com/bbuchfink/diamond/wiki/1.-Tutorial) - -```bash -wget ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip -unzip taxdmp.zip - -## warning: large file! -wget ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/prot.accession2taxid.FULL.gz - -## warning: takes a long time! -cat ../raw/*.faa | diamond makedb -d testdb-diamond --taxonmap prot.accession2taxid.FULL.gz --taxonnodes nodes.dmp --taxonnames names.dmp - -rm *dmp *txt *gz *prt *zip -``` +
#### mOTUs From 3282f5944b45482ed00f1187fdaf9cc21e469bcf Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Tue, 13 Dec 2022 11:28:17 +0100 Subject: [PATCH 16/23] Apply prettier --- docs/usage.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index f6168a6..77f5483 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -609,7 +609,6 @@ You can follow the Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blo For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2). But if you wish to build your own, please see the [documentation](https://github.com/fbreitwieser/krakenuniq/blob/master/README.md#custom-databases-with-ncbi-taxonomy). - #### MALT
@@ -644,7 +643,6 @@ MALT-build can be multi-threaded with `-t` to speed up building. See the [MALT manual](https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf) for more information. - #### MetaPhlAn3
From 644c4ab83115629ae0b08719d636601824d018bb Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Tue, 13 Dec 2022 12:00:32 +0100 Subject: [PATCH 17/23] Review suggestions --- docs/usage.md | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 77f5483..d5ec101 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -440,7 +440,7 @@ NXF_OPTS='-Xms1g -Xmx4g' ## Tutorials -### Tutorial - How to create your custom database +### Retrieving databases or building custom databases Here we will give brief guidance on how to build databases for each supported taxonomic profiler. You should always consult the documentation of each toolfor more information, how we provide these as quick reference guides. The following tutorial assumes you already have the tool available (e.g. installed locally, or via conda, docker etc.), and you have already downloaded the FASTA files you wish to build into a database. @@ -448,7 +448,7 @@ The following tutorial assumes you already have the tool available (e.g. install #### Bracken
-Output files +Expected files in database directory - `bracken` - `hash.k2d` @@ -479,7 +479,7 @@ You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.sht #### Centrifuge
-Output files +Expected files in database directory - `centrifuge` - `..cf` @@ -507,7 +507,7 @@ centrifuge-build -p 4 --conversion-table seqid2taxid.map --taxonomy-tree taxonom #### DIAMOND
-Output files +Expected files in database directory - `diamond` - `.dmnd` @@ -532,7 +532,7 @@ rm *dmp *txt *gz *prt *zip #### Kaiju
-Output files +Expected files in database directory - `kaiju` - `kaiju_db_*.fmi` @@ -551,7 +551,7 @@ kaiju-mkfmi proteins #### Kraken2
-Output files +Expected files in database directory - `kraken2` - `opts.k2d` @@ -596,7 +596,7 @@ You can follow the Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blo #### KrakenUniq
-Output files +Expected files in database directory - `krakenuniq` - `opts.k2d` @@ -612,7 +612,7 @@ For KrakenUniq, we recommend using one of the available databases [here](https:/ #### MALT
-Output files +Expected files in database directory - `malt` - `ref.idx` @@ -645,8 +645,19 @@ See the [MALT manual](https://software-ab.informatik.uni-tuebingen.de/download/m #### MetaPhlAn3 +MetaPhlAn3 provides a prebuilt database of marker genes. +This must be downloaded by the user. To do this you need to have `MetaPhlAn3` installed on your machine. + +```bash +metaphlan --install --bowtie2db / +``` + +You can then add the `/` path to your nf-core/taxprofiler database input sheet. + +> 🛈 It is generally not recommended to modify this database yourself, thus this is currently not supported in the pipeline. However, it is possible to customise the existing database by adding your own marker genomes following the instructions [here](https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-3.1#customizing-the-database). If using your own database is relevant for you, please contact the nf-core/taxprofiler developers on the [nf-core slack](https://nf-co.re/join) and we will investigate supporting this. +
-Output files +Expected files in database directory - `metaphlan3` - `mpa_v30_CHOCOPhlAn_201901.pkl` @@ -662,9 +673,25 @@ See the [MALT manual](https://software-ab.informatik.uni-tuebingen.de/download/m
+More information on the MetaPhlAn3 database can be found [here](https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-3.1#installation). + #### mOTUs -A detailed description on how to download mOTUs database can be found [here](https://github.com/motu-tool/mOTUs) +mOTUs provides a prebuilt database of marker genes. + +This must be downloaded by the user. To do this you need to have `mOTUs` installed on your machine. + +```bash +motus downloadDB +``` + +Then supply the `db_mOTU/` path to your nf-core/taxprofiler database input sheet. + +> ⚠️ The `db_mOTU/` directory may be downloaded to somewhere in your Python's `site-package` directory. You will have to find this yourself as the exact location varies depends on installation method. + +It is not possible to create a custom mOTUs database. + +More information on the mOTUs database can be found [here](https://motu-tool.org/installation.html). ## Troubleshooting and FAQs From 7be3cfc4509b9a5fd827d154a84967a2a96c266d Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Tue, 20 Dec 2022 15:00:17 +0100 Subject: [PATCH 18/23] Review suggestions --- docs/usage.md | 213 ++++++++++++++++++++++++++++---------------------- 1 file changed, 121 insertions(+), 92 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index d5ec101..c61c580 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -103,22 +103,16 @@ nf-core/taxprofiler will automatically decompress and extract any compressed arc Expected (uncompressed) database files for each tool are as follows: -- [**Bracken** output](#bracken) of a combined `kraken2-` and `bracken-build` process. Please see the [documentation on Bracken](https://github.com/jenniferlu717/Bracken#running-bracken-easy-version) for details. The output is a directory containing files per expected sequencing read length. -- [**Centrifuge** output](#centrifuge) of `centrifuge-build`. -- [**DIAMOND** output](#diamond) of `diamond makedb`. Note: requires building with taxonomy files +- [**Bracken** output](#bracken-custom-database) of a combined `kraken2-` and `bracken-build` process. +- [**Centrifuge** output](#centrifuge-custom-database) of `centrifuge-build`. +- [**DIAMOND** output](#diamond-custom-database) of `diamond makedb`. to generate taxonomic profile. See [DIAMOND documentation](https://github.com/bbuchfink/diamond/wiki/3.-Command-line-options#makedb-options). -- [**Kaiju** output](#kaiju) of `kaiju-makedb`. -- [**Kraken2** output](#kraken2) of `kraken2-build` command(s). -- [**KrakenUniq** output](#krakenuniq) of `krakenuniq-build` command(s). -- [**MALT** output](#malt) of `malt-build`. -- [**MetaPhlAn3**](#metaphlan3) generated with `metaphlan --install` or downloaded from links on the [MetaPhlAn3 wiki](https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-3.0#customizing-the-database). -- [**mOTUs**](#motus) is composed of code and database together. The mOTUs tools - [`downloadDB`](https://github.com/motu-tool/mOTUs/blob/master/motus/downloadDB.py) - is used to prepare the mOTUs database and create a file with the version information. - The database download step can be time consuming and the database will be consisting - with same release version of the mOTUs tools. The database for same version tools - can be thus reused for multiple runs. Users can download the database once using the script above and - specify the path the database to the TSV table provided to `--databases`. +- [**Kaiju** output](#kaiju-custom-database) of `kaiju-makedb`. +- [**Kraken2** output](#kraken2-custom-database) of `kraken2-build` command(s). +- [**KrakenUniq** output](#krakenuniq-custom-database) of `krakenuniq-build` command(s). +- [**MALT** output](#malt-custom-database) of `malt-build`. +- [**MetaPhlAn3**](#metaphlan3-custom-database) generated with `metaphlan --install` or downloaded from links on the [MetaPhlAn3 wiki](https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-3.0#customizing-the-database). +- [**mOTUs**](#motus-custom-database) is composed of code and database together. ## Running the pipeline @@ -130,7 +124,7 @@ nextflow run nf-core/taxprofiler --input samplesheet.csv --databases databases.c This will launch the pipeline with the `docker` configuration profile. See below for more information about profiles. -When running nf-core/taxprofiler, every step and tool is 'opt in'. To run a given profiler you must make sure to supply both a database in your `.csv` and supply `--run_` flag to your command. Omitting either will result in the profiling tool not executing. If you wish to perform pre-processing (adapter clipping, merge running etc.) or post-processing (visualisation) steps, these are also opt in `--perform_` and in some cases may also require additional files. Please check the parameters tab of this documentation for more information. +When running nf-core/taxprofiler, every step and tool is 'opt in'. To run a given profiler you must make sure to supply both a database in your `.csv` and supply `--run_` flag to your command. Omitting either will result in the profiling tool not executing. If you wish to perform pre-processing (adapter clipping, merge running etc.) or post-processing (visualisation) steps, these are also opt in with a `--perform_` flag. In some cases, the pre- and post-processing steps may also require additional files. Please check the parameters tab of this documentation for more information. Note that the pipeline will create the following files in your working directory: @@ -158,12 +152,12 @@ nf-core/taxprofiler offers four main preprocessing steps Raw sequencing read processing in the form of adapter clipping and paired-end read merging can be activated via the `--perform_shortread_qc` or `--perform_longread_qc` flags. -It is highly recommended to run this on raw reads to remove artifacts from sequencing that can cause false positive identification of taxa (e.g. contaminated reference genomes) and/or skews in taxonomic abundance profiles. +It is highly recommended to run this on raw reads to remove artifacts from sequencing that can cause false positive identification of taxa (e.g. contaminated reference genomes) and/or skews in taxonomic abundance profiles. If you have public data, normally these should have been corrected for however you should still check this is the case. There are currently two options for short-read preprocessing: [`fastp`](https://github.com/OpenGene/fastp) or [`adapterremoval`](https://github.com/MikkelSchubert/adapterremoval). -For adapter clipping, you can either rely on tool default adapter sequences, or supply your own adapters (`--shortread_qc_adapter1` and `--shortread_qc_adapter2`) -By default, paired-end merging is not activated and paired-end profiling is performed where supported otherwise pairs will be independently profiled. If paired-end merging is activated you can also specify whether to include unmerged reads in the reads sent for profiling (`--shortread_qc_mergepairs` and `--shortread_qc_includeunmerged`). +For adapter clipping, you can either rely on the tool's default adapter sequences, or supply your own adapters (`--shortread_qc_adapter1` and `--shortread_qc_adapter2`) +By default, paired-end merging is not activated. In this case paired-end 'alignment' against the reference databases is performed where supported, and if not, supported pairs will be independently profiled. If paired-end merging is activated you can also specify whether to include unmerged reads in the reads sent for profiling (`--shortread_qc_mergepairs` and `--shortread_qc_includeunmerged`). You can also turn off clipping and only perform paired-end merging, if requested. This can be useful when processing data downloaded from the ENA, SRA, or DDBJ (`--shortread_qc_skipadaptertrim`). Both tools support length filtering of reads and can be tuned with `--shortread_qc_minlength`. Performing length filtering can be useful to remove short (often low sequencing complexity) sequences that result in unspecific classification and therefore slow down runtime during profiling, with minimal gain. @@ -211,9 +205,11 @@ You can optionally save the FASTQ output of the run merging with the `--save_run #### Profiling +The following suggestion gives you some tips and suggestions regarding running some of the different tools specifically _within the pipeline_. For advice as to which tool to run in your context, please see the documentation of each tool. + ###### Bracken -It is unclear whether Bracken is suitable for running long reads, as it makes certain assumptions about read lengths. Furthemore, during testing we found issues where Bracken would fail on the long-read test data. Therefore nf-core/taxprofiler does not run Bracken on data specified as being sequenced with `OXFORD_NANOPORE` in the input samplesheet. If you believe this to be wrong, please contact us on the nf-core slack and we can discuss this. +It is unclear whether Bracken is suitable for running long reads, as it makes certain assumptions about read lengths. Furthemore, during testing we found issues where Bracken would fail on the long-read test data. Therefore nf-core/taxprofiler does not run Bracken on data specified as being sequenced with `OXFORD_NANOPORE` in the input samplesheet. If you would like to change this behaviour, please contact us on the nf-core slack and we can discuss this. ###### Centrifuge @@ -221,13 +217,13 @@ Centrifuge currently does not accept FASTA files as input, therefore no output w ###### DIAMOND -DIAMOND only allows output of a single format at a time, therefore parameters such --diamond_save_reads supplied will result in only aligned reads in SAM format will be produced, no taxonomic profiles will be available. Be aware of this when setting up your pipeline runs, depending n your particular use case. +DIAMOND only allows output of a single format at a time, therefore parameters such --diamond_save_reads supplied will result in only aligned reads in SAM format will be produced, no taxonomic profiles will be available. Be aware of this when setting up your pipeline runs, depending on your particular use case. ###### MALT MALT does not support paired-end reads alignment (unlike other tools), therefore nf-core/taxprofiler aligns these as indepenent files if read-merging is skipped. If you skip merging, you can sum or average the results of the counts of the pairs. -Krona can only be run on MALT output if path to Krona taxonomy database supplied to `--krona_taxonomy_directory`. Therefore if you do not supply the a KRona directory, Krona plots will not be produced for MALT. +Krona can only be run on MALT output if path to Krona taxonomy database supplied to `--krona_taxonomy_directory`. Therefore if you do not supply the a Krona directory, Krona plots will not be produced for MALT. ###### MetaPhlAn3 @@ -443,9 +439,21 @@ NXF_OPTS='-Xms1g -Xmx4g' ### Retrieving databases or building custom databases Here we will give brief guidance on how to build databases for each supported taxonomic profiler. You should always consult the documentation of each toolfor more information, how we provide these as quick reference guides. -The following tutorial assumes you already have the tool available (e.g. installed locally, or via conda, docker etc.), and you have already downloaded the FASTA files you wish to build into a database. +The following tutorials assumes you already have the tool available (e.g. installed locally, or via conda, docker etc.), and you have already downloaded the FASTA files you wish to build into a database. -#### Bracken +#### Bracken custom database + +Bracken does not provide any default databases for profiling, but rather building upon Kraken2 databases. See [Kraken2](#kraken2-custom-database) for more information on how to build these. + +In addition to a Kraken2 database, you also need to have the (average) read lengths (in bp) of your sequencing experiment, the K-mer size used to build the Kraken2 database, and Kraken2 available on your machine. + +```bash +bracken-build -d -k -l +``` + +> 🛈 You can speed up database construction by supplying the threads parameter (`-t`). + +> 🛈 If you do not have Kraken2 in your `$PATH` you can point to the binary with `-x ///kraken2`.
Expected files in database directory @@ -462,32 +470,9 @@ The following tutorial assumes you already have the tool available (e.g. install
-Bracken does not provide any default databases for profiling, but rather building upon Kraken2 databases. See [Kraken2](#kraken2) for more information on how to build these. - -In addition to a Kraken2 database, you also need to have the (average) read lengths (in bp) of your sequencing experiment, the K-mer size used to build the Kraken2 database, and Kraken2 available on your machine. - -```bash -bracken-build -d -k -l -``` - -> 🛈 You can speed up database construction by supplying the threads parameter (`-t`). - -> 🛈 If you do not have Kraken2 in your `$PATH` you can point to the binary with `-x ///kraken2`. - You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.shtml?t=manual) for more information. Alternatively, you can use one of the indexes that can be found [here](https://benlangmead.github.io/aws-indexes/k2). -#### Centrifuge - -
-Expected files in database directory - -- `centrifuge` - - `..cf` - - `..cf` - - `..cf` - - `..cf` - -
+#### Centrifuge custom database Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). The user should download taxonomy files, make custom `seqid2taxid.map` and combine the fasta files together. @@ -504,16 +489,19 @@ cat *.{fa,fna} > input-sequences.fna centrifuge-build -p 4 --conversion-table seqid2taxid.map --taxonomy-tree taxonomy/nodes.dmp --name-table taxonomy/names.dmp input-sequences.fna taxprofiler_cf ``` -#### DIAMOND -
Expected files in database directory -- `diamond` - - `.dmnd` +- `centrifuge` + - `..cf` + - `..cf` + - `..cf` + - `..cf`
+#### DIAMOND custom database + To create a custom database for DIAMOND, the user should download and unzip the NCBI's taxonomy files. The `makedb` needs to be executed afterwards. A detailed description can be found [here](https://github.com/bbuchfink/diamond/wiki/1.-Tutorial) ```bash @@ -529,7 +517,22 @@ cat ../raw/*.faa | diamond makedb -d testdb-diamond --taxonmap prot.accession2ta rm *dmp *txt *gz *prt *zip ``` -#### Kaiju +
+Expected files in database directory + +- `diamond` + - `.dmnd` + +
+ +#### Kaiju custom database + +It is possible to [create custom databases](https://github.com/bioinformatics-centre/kaiju#custom-database) with Kaiju. To build a kaiju database, you need three components: a FASTA file with the protein sequences (the headers are the numeric NCBI taxon identifiers of the protein sequences), number of threads and you need to define the uppercase characters of the standard 20 amino acids. + +```bash +kaiju-mkbwt -n 5 -a ACDEFGHIKLMNPQRSTVWY -o proteins proteins.faa +kaiju-mkfmi proteins +```
Expected files in database directory @@ -541,28 +544,11 @@ rm *dmp *txt *gz *prt *zip
-It is possible to [create custom databases](https://github.com/bioinformatics-centre/kaiju#custom-database) with Kaiju. +#### Kraken2 custom database -```bash -kaiju-mkbwt -n 5 -a ACDEFGHIKLMNPQRSTVWY -o proteins proteins.faa -kaiju-mkfmi proteins -``` +To build a Kraken2 database you need two components: a taxonomy (consisting of `names.dmp`, `nodes.dmp`, and `*accession2taxid`) files, and the FASTA files you wish to include. -#### Kraken2 - -
-Expected files in database directory - -- `kraken2` - - `opts.k2d` - - `hash.k2d` - - `taxo.k2d` - -
- -> These are instructions are based on Kraken 2.1.2 -> To build a Kraken2 database you need two components: a taxonomy (consisting of `names.dmp`, `nodes.dmp`, and `*accession2taxid`) files, and the FASTA files you wish to include. -> To install pull the NCBI taxonomy you can run the following: +To install pulling the NCBI taxonomy, you can run the following: ```bash kraken2-build --download-taxonomy --db @@ -591,9 +577,50 @@ kraken2-build --clean--db You can then add the / path to your nf-core/taxprofiler database input sheet. +
+Expected files in database directory + +- `kraken2` + - `opts.k2d` + - `hash.k2d` + - `taxo.k2d` + +
+ You can follow the Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown#custom-databases) for a more detailed description. -#### KrakenUniq +#### KrakenUniq custom database + +KrakenUniq allows to re-use Kraken(2) databases ([see above](#kraken2)) however with some restrictions. KrakenUniq also provides you with the ability to auto-download and build 'standard' NCBI reference datasets. + +For any KrakenUniq databases, you require: taxonomy files, the FASTA files you wish to include, a `seqid2mapid` file, and a k-mer length. + +To auto-download and build a 'standard' database of Bacteria and Archaea genomes from RefSeq, you can run something like: + +```bash +krakenuniq-download --db taxonomy +krakenuniq-download --db --threads 10 --dust refseq/bacteria refseq/archaea +krakenuniq-build --db --kmer-len 31 --threads 10 --taxids-for-genomes --taxids-for-sequences +``` + +This will download all the required files for you and build the database. + +Alternatively, if you want to build your own you first must make a `seqid2taxid.map` file which is a two column text file containing the FASTA sequence header and the NCBI taxonomy ID for each sequence: + +``` +MT192765.1 2697049 +``` + +Then make a directory (`/`), containing the `seqid2taxid.map` file and your FASTA files in a subdirectory called `library/`. You must then run the `taxonomy` command on the `/` directory, and then build it. + +``` +mkdir -p /library +mv `seqid2taxid.map` / +mv *.fna /library +krakenuniq-build --db --kmer-len 31 +``` + +> 🛈 You can speed up database construction by supplying the threads parameter (`--threads`).
Expected files in database directory @@ -607,9 +634,25 @@ You can follow the Kraken2 [tutorial](https://github.com/DerrickWood/kraken2/blo
-For KrakenUniq, we recommend using one of the available databases [here](https://benlangmead.github.io/aws-indexes/k2). But if you wish to build your own, please see the [documentation](https://github.com/fbreitwieser/krakenuniq/blob/master/README.md#custom-databases-with-ncbi-taxonomy). +Please see the [KrakenUniq documentation](https://github.com/fbreitwieser/krakenuniq#database-building) for more information. -#### MALT +```` + +#### MALT custom database + +MALT does not provide any default databases for profiling, therefore you must build your own. +You need FASTA files to include, and an (unzipped) [MEGAN mapping 'db' file](https://software-ab.informatik.uni-tuebingen.de/download/megan6/) for your FASTA type. +In addition to the input directory, output directory, and the mapping file database, you also need to specify the sequence type (DNA or Protein) with the `-s` flag. + +```bash +malt-build -i ///*.{fna,fa,fasta} -a2t //.db -d / -s DNA +```` + +You can then add the / path to your nf-core/taxprofiler database input sheet. + +⚠️ MALT generates very large database files and requires large amounts of RAM. You can reduce both by increasing the step size `-st` (with a reduction in sensitivity). + +> 🛈 MALT-build can be multi-threaded with `-t` to speed up building.
Expected files in database directory @@ -627,23 +670,9 @@ For KrakenUniq, we recommend using one of the available databases [here](https:/
-MALT does not provide any default databases for profiling, therefore you must build your own. -You need FASTA files to include, and an (unzipped) [MEGAN mapping 'db' file](https://software-ab.informatik.uni-tuebingen.de/download/megan6/) for your FASTA type. -In addition to the input directory, output directory, and the mapping file database, you also need to specify the sequence type (DNA or Protein) with the `-s` flag. - -```bash -malt-build -i ///*.{fna,fa,fasta} -a2t //.db -d / -s DNA -``` - -You can then add the / path to your nf-core/taxprofiler database input sheet. - -⚠️ MALT generates very large database files and requires large amounts of RAM. You can reduce both by increasing the step size `-st` (with a reduction in sensitivity). - -MALT-build can be multi-threaded with `-t` to speed up building. - See the [MALT manual](https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf) for more information. -#### MetaPhlAn3 +#### MetaPhlAn3 custom database MetaPhlAn3 provides a prebuilt database of marker genes. This must be downloaded by the user. To do this you need to have `MetaPhlAn3` installed on your machine. @@ -675,7 +704,7 @@ You can then add the `/` path to your nf-core/taxprofiler database More information on the MetaPhlAn3 database can be found [here](https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-3.1#installation). -#### mOTUs +#### mOTUs custom database mOTUs provides a prebuilt database of marker genes. From ba43b0daa450432ef3b492cfb34b2f9fbeaf2a17 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Wed, 21 Dec 2022 09:26:38 +0100 Subject: [PATCH 19/23] Update docs/usage.md Co-authored-by: James A. Fellows Yates --- docs/usage.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/usage.md b/docs/usage.md index c61c580..c2dc6e9 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -617,6 +617,7 @@ Then make a directory (`/`), containing the `seqid2taxid.map` file mkdir -p /library mv `seqid2taxid.map` / mv *.fna /library +krakenuniq-download --db taxonomy krakenuniq-build --db --kmer-len 31 ``` From d6e0d404e38b0cb1ce25581a0db6c7ad52391686 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Thu, 22 Dec 2022 09:18:00 +0100 Subject: [PATCH 20/23] Update docs/usage.md Co-authored-by: James A. Fellows Yates --- docs/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index c2dc6e9..7b451e7 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -438,7 +438,7 @@ NXF_OPTS='-Xms1g -Xmx4g' ### Retrieving databases or building custom databases -Here we will give brief guidance on how to build databases for each supported taxonomic profiler. You should always consult the documentation of each toolfor more information, how we provide these as quick reference guides. +Here we will give brief guidance on how to build databases for each supported taxonomic profiler. You should always consult the documentation of each tool for more information, here we provide these as quick reference guides (with no guarantee they are up to date). The following tutorials assumes you already have the tool available (e.g. installed locally, or via conda, docker etc.), and you have already downloaded the FASTA files you wish to build into a database. #### Bracken custom database From 29978d83b9177942c00d89b175f39053c99aa39c Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Thu, 22 Dec 2022 11:03:49 +0100 Subject: [PATCH 21/23] Update centrifuge section --- docs/usage.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 7b451e7..e64726e 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -474,7 +474,9 @@ You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.sht #### Centrifuge custom database -Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). The user should download taxonomy files, make custom `seqid2taxid.map` and combine the fasta files together. +Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). You need four file: a tab-separated file mapping sequence IDs to taxonomy IDs (`--conversion-table`), a \t|\t-separated file mapping taxonomy IDs to their parents and rank, up to the root of the tree (`--taxonomy-tree`), a '|'-separated file mapping taxonomy IDs to a name (`--name-table`) and the reference sequences. + + The user should download taxonomy files, make custom `seqid2taxid.map` and combine the fasta files together. ```bash centrifuge-download -o taxonomy taxonomy From 1eeb3b337aaa557e3278e86cd4f47bcfd2bc4879 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Thu, 22 Dec 2022 11:07:09 +0100 Subject: [PATCH 22/23] Update usage.md --- docs/usage.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index e64726e..e51656d 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -474,19 +474,18 @@ You can follow Bracken [tutorial](https://ccb.jhu.edu/software/bracken/index.sht #### Centrifuge custom database -Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). You need four file: a tab-separated file mapping sequence IDs to taxonomy IDs (`--conversion-table`), a \t|\t-separated file mapping taxonomy IDs to their parents and rank, up to the root of the tree (`--taxonomy-tree`), a '|'-separated file mapping taxonomy IDs to a name (`--name-table`) and the reference sequences. +Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/software/centrifuge/manual.shtml#custom-database). The user should download taxonomy files, make custom `seqid2taxid.map` and combine the fasta files together. You need four components: a tab-separated file mapping sequence IDs to taxonomy IDs (`--conversion-table`), a \t|\t-separated file mapping taxonomy IDs to their parents and rank, up to the root of the tree (`--taxonomy-tree`), a '|'-separated file mapping taxonomy IDs to a name (`--name-table`) and the reference sequences. - The user should download taxonomy files, make custom `seqid2taxid.map` and combine the fasta files together. +An example of custom `seqid2taxid.map`: -```bash -centrifuge-download -o taxonomy taxonomy - -## custom seqid2taxid.map NC_001133.9 4392 NC_012920.1 9606 NC_001134.8 4392 NC_001135.5 4392 +```bash +centrifuge-download -o taxonomy taxonomy + cat *.{fa,fna} > input-sequences.fna centrifuge-build -p 4 --conversion-table seqid2taxid.map --taxonomy-tree taxonomy/nodes.dmp --name-table taxonomy/names.dmp input-sequences.fna taxprofiler_cf ``` From ec9c7cfedc7bf3b16acc27827e8bc992f2f08840 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Thu, 22 Dec 2022 11:10:54 +0100 Subject: [PATCH 23/23] Prettier --- docs/usage.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index d4eb5db..9539a5a 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -471,10 +471,10 @@ Centrifuge allows the user to [build custom databases](https://ccb.jhu.edu/softw An example of custom `seqid2taxid.map`: -NC_001133.9 4392 -NC_012920.1 9606 -NC_001134.8 4392 -NC_001135.5 4392 +NC_001133.9 4392 +NC_012920.1 9606 +NC_001134.8 4392 +NC_001135.5 4392 ```bash centrifuge-download -o taxonomy taxonomy