Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greengenes2 2022.10 Support #666

Merged
merged 10 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Added`

- [#666](https://github.com/nf-core/ampliseq/pull/666) - Added Greengenes2 database, version 2022.10, support for QIIME2 taxonomic classification.
- [#667](https://github.com/nf-core/ampliseq/pull/667) - Added `--qiime_ref_tax_custom` to permit custom reference database for QIIME2 taxonomic classification
- [#674](https://github.com/nf-core/ampliseq/pull/674) - Add PhytoRef database for DADA2 taxonomy assignment using `--dada_ref_taxonomy phytoref`
- [#675](https://github.com/nf-core/ampliseq/pull/675) - Add the Zehr lab nifH database for DADA2 taxonomy assignment using `--dada_ref_taxonomy zehr-nifh`
Expand Down
5 changes: 5 additions & 0 deletions bin/taxref_reformat_qiime_greengenes2022.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

# Decompress files.
gzip -c -d *.seqs.fna.gz > greengenes2.fna
gzip -c -d *.taxonomy.md5.tsv.gz > greengenes2.tax
5 changes: 5 additions & 0 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,9 @@ process {
withName:CUSTOM_DUMPSOFTWAREVERSIONS {
cache = false
}
withName:QIIME2_EXTRACT {
cpus = { check_max( 12 * task.attempt, 'cpus' ) }
memory = { check_max( 12.GB * task.attempt, 'memory' ) }
time = { check_max( 24.h * task.attempt, 'time' ) }
}
}
12 changes: 12 additions & 0 deletions conf/ref_databases.config
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,18 @@ params {
citation = "McDonald, D., Price, M., Goodrich, J. et al. An improved Greengenes taxonomy with explicit ranks for ecological and evolutionary analyses of bacteria and archaea. ISME J 6, 610–618 (2012). https://doi.org/10.1038/ismej.2011.139"
fmtscript = "taxref_reformat_qiime_greengenes85.sh"
}
'greengenes2' {
title = "Greengenes2 16S - Version 2022.10"
file = [ "http://ftp.microbio.me/greengenes_release/2022.10/2022.10.seqs.fna.gz", "http://ftp.microbio.me/greengenes_release/2022.10/2022.10.taxonomy.md5.tsv.gz" ]
citation = "McDonald, D., Jiang, Y., Balaban, M. et al. Greengenes2 unifies microbial data in a single reference tree. Nat Biotechnol (2023). https://doi.org/10.1038/s41587-023-01845-1"
fmtscript = "taxref_reformat_qiime_greengenes2022.sh"
}
'greengenes2=2022.10' {
title = "Greengenes2 16S - Version 2022.10"
file = [ "http://ftp.microbio.me/greengenes_release/2022.10/2022.10.seqs.fna.gz", "http://ftp.microbio.me/greengenes_release/2022.10/2022.10.taxonomy.md5.tsv.gz" ]
citation = "McDonald, D., Jiang, Y., Balaban, M. et al. Greengenes2 unifies microbial data in a single reference tree. Nat Biotechnol (2023). https://doi.org/10.1038/s41587-023-01845-1"
fmtscript = "taxref_reformat_qiime_greengenes2022.sh"
}
}
//Sintax taxonomic reference databases
sintax_ref_databases {
Expand Down
1 change: 1 addition & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ Pre-configured reference taxonomy databases are:
| sbdi-gtdb | + | - | - | - | 16S rRNA |
| rdp | + | - | + | - | 16S rRNA |
| greengenes | - | - | + | (+)² | 16S rRNA |
| greengenes2 | - | - | - | + | 16S rRNA |
| pr2 | + | - | - | - | 18S rRNA |
| unite-fungi | + | + | - | + | eukaryotic nuclear ribosomal ITS region |
| unite-alleuk | + | + | - | + | eukaryotic nuclear ribosomal ITS region |
Expand Down
5 changes: 3 additions & 2 deletions modules/local/qiime2_extract.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
process QIIME2_EXTRACT {
tag "${meta.FW_primer}-${meta.RV_primer}"
label 'process_low'
label 'single_cpu'

container "qiime2/core:2023.7"

Expand All @@ -20,6 +18,7 @@ process QIIME2_EXTRACT {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
"""
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand All @@ -37,9 +36,11 @@ process QIIME2_EXTRACT {
--output-path ref-taxonomy.qza
#Extract sequences based on primers
qiime feature-classifier extract-reads \\
--p-n-jobs ${task.cpus} \\
--i-sequences ref-seq.qza \\
--p-f-primer ${meta.FW_primer} \\
--p-r-primer ${meta.RV_primer} \\
$args \\
--o-reads ${meta.FW_primer}-${meta.RV_primer}-ref-seq.qza \\
--quiet

Expand Down
4 changes: 3 additions & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,9 @@
"unite-alleuk=8.3",
"unite-alleuk=8.2",
"unite-alleuk",
"greengenes85"
"greengenes85",
"greengenes2",
"greengenes2=2022.10"
]
},
"qiime_ref_tax_custom": {
Expand Down
Loading