Skip to content

Commit

Permalink
activate multi-cpu use in QIIME2_EXTRACT
Browse files Browse the repository at this point in the history
  • Loading branch information
d4straub committed Jan 11, 2024
1 parent 815e62b commit 70b2e01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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' ) }
}
}
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

0 comments on commit 70b2e01

Please sign in to comment.