diff --git a/CHANGELOG.md b/CHANGELOG.md index c9381a95..a8fc4eae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` +- [#655](https://github.com/nf-core/ampliseq/pull/655) - Added `NUMBA_CACHE_DIR` to fix downstream analysis with QIIME2 that failed on some systems - [#656](https://github.com/nf-core/ampliseq/pull/656) - Moved conda-check to script-section and replaced `exit 1` with `error()` ### `Dependencies` diff --git a/modules/local/qiime2_alphararefaction.nf b/modules/local/qiime2_alphararefaction.nf index 44319b94..23dfe602 100644 --- a/modules/local/qiime2_alphararefaction.nf +++ b/modules/local/qiime2_alphararefaction.nf @@ -22,7 +22,9 @@ process QIIME2_ALPHARAREFACTION { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" maxdepth=\$(count_table_minmax_reads.py $stats maximum 2>&1) diff --git a/modules/local/qiime2_ancom_asv.nf b/modules/local/qiime2_ancom_asv.nf index 54ccd6c4..c6584f0a 100644 --- a/modules/local/qiime2_ancom_asv.nf +++ b/modules/local/qiime2_ancom_asv.nf @@ -23,7 +23,9 @@ process QIIME2_ANCOM_ASV { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" qiime composition add-pseudocount \\ --i-table ${table} \\ diff --git a/modules/local/qiime2_ancom_tax.nf b/modules/local/qiime2_ancom_tax.nf index 91567c0e..1e3d320b 100644 --- a/modules/local/qiime2_ancom_tax.nf +++ b/modules/local/qiime2_ancom_tax.nf @@ -21,7 +21,9 @@ process QIIME2_ANCOM_TAX { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" mkdir ancom # Sum data at the specified level diff --git a/modules/local/qiime2_barplot.nf b/modules/local/qiime2_barplot.nf index d66ef4ee..55596db5 100644 --- a/modules/local/qiime2_barplot.nf +++ b/modules/local/qiime2_barplot.nf @@ -24,7 +24,9 @@ process QIIME2_BARPLOT { suffix = setting ? "_${table.baseName}" : "" def metadata_cmd = metadata ? "--m-metadata-file ${metadata}": "" """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" qiime taxa barplot \\ --i-table ${table} \\ diff --git a/modules/local/qiime2_classify.nf b/modules/local/qiime2_classify.nf index d7cf1929..4b89cdb2 100644 --- a/modules/local/qiime2_classify.nf +++ b/modules/local/qiime2_classify.nf @@ -22,7 +22,9 @@ process QIIME2_CLASSIFY { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" qiime feature-classifier classify-sklearn \\ --i-classifier ${trained_classifier} \\ diff --git a/modules/local/qiime2_diversity_adonis.nf b/modules/local/qiime2_diversity_adonis.nf index 24b7afe8..0672aa4f 100644 --- a/modules/local/qiime2_diversity_adonis.nf +++ b/modules/local/qiime2_diversity_adonis.nf @@ -21,7 +21,9 @@ process QIIME2_DIVERSITY_ADONIS { } def args = task.ext.args ?: '' """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" qiime diversity adonis \\ --p-n-jobs $task.cpus \\ diff --git a/modules/local/qiime2_diversity_alpha.nf b/modules/local/qiime2_diversity_alpha.nf index 237c9664..743ed518 100644 --- a/modules/local/qiime2_diversity_alpha.nf +++ b/modules/local/qiime2_diversity_alpha.nf @@ -20,7 +20,9 @@ process QIIME2_DIVERSITY_ALPHA { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" qiime diversity alpha-group-significance \\ --i-alpha-diversity ${core} \\ diff --git a/modules/local/qiime2_diversity_beta.nf b/modules/local/qiime2_diversity_beta.nf index dbc6cd18..c48b6b4c 100644 --- a/modules/local/qiime2_diversity_beta.nf +++ b/modules/local/qiime2_diversity_beta.nf @@ -20,7 +20,9 @@ process QIIME2_DIVERSITY_BETA { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" qiime diversity beta-group-significance \\ --i-distance-matrix ${core} \\ diff --git a/modules/local/qiime2_diversity_betaord.nf b/modules/local/qiime2_diversity_betaord.nf index 3c199740..658cf765 100644 --- a/modules/local/qiime2_diversity_betaord.nf +++ b/modules/local/qiime2_diversity_betaord.nf @@ -20,7 +20,9 @@ process QIIME2_DIVERSITY_BETAORD { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" mkdir beta_diversity qiime emperor plot \\ diff --git a/modules/local/qiime2_diversity_core.nf b/modules/local/qiime2_diversity_core.nf index c1866ead..b06fd523 100644 --- a/modules/local/qiime2_diversity_core.nf +++ b/modules/local/qiime2_diversity_core.nf @@ -30,7 +30,9 @@ process QIIME2_DIVERSITY_CORE { # COMMENT: might be fixed in version after QIIME2 2023.5 export UNIFRAC_USE_GPU=N - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" mindepth=\$(count_table_minmax_reads.py $stats minimum 2>&1) if [ \"\$mindepth\" -lt \"$mindepth\" ]; then mindepth=$mindepth; fi diff --git a/modules/local/qiime2_export_absolute.nf b/modules/local/qiime2_export_absolute.nf index 75fe7f09..bf9c947e 100644 --- a/modules/local/qiime2_export_absolute.nf +++ b/modules/local/qiime2_export_absolute.nf @@ -28,7 +28,9 @@ process QIIME2_EXPORT_ABSOLUTE { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" #produce raw count table in biom format "table/feature-table.biom" qiime tools export \\ diff --git a/modules/local/qiime2_export_relasv.nf b/modules/local/qiime2_export_relasv.nf index c9e0b139..19977f5e 100644 --- a/modules/local/qiime2_export_relasv.nf +++ b/modules/local/qiime2_export_relasv.nf @@ -19,7 +19,9 @@ process QIIME2_EXPORT_RELASV { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" #convert to relative abundances qiime feature-table relative-frequency \\ diff --git a/modules/local/qiime2_export_reltax.nf b/modules/local/qiime2_export_reltax.nf index f8849ed3..6309e674 100644 --- a/modules/local/qiime2_export_reltax.nf +++ b/modules/local/qiime2_export_reltax.nf @@ -22,7 +22,9 @@ process QIIME2_EXPORT_RELTAX { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" ##on several taxa level array=(\$(seq ${tax_agglom_min} 1 ${tax_agglom_max})) diff --git a/modules/local/qiime2_extract.nf b/modules/local/qiime2_extract.nf index 3ba5a99c..f3a61b6e 100644 --- a/modules/local/qiime2_extract.nf +++ b/modules/local/qiime2_extract.nf @@ -21,7 +21,9 @@ process QIIME2_EXTRACT { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" ### Import qiime tools import \\ diff --git a/modules/local/qiime2_featuretable_group.nf b/modules/local/qiime2_featuretable_group.nf index 11f74f94..0890a5f2 100644 --- a/modules/local/qiime2_featuretable_group.nf +++ b/modules/local/qiime2_featuretable_group.nf @@ -20,7 +20,9 @@ process QIIME2_FEATURETABLE_GROUP { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" qiime feature-table filter-samples \\ --i-table "${table}" \\ diff --git a/modules/local/qiime2_filtersamples.nf b/modules/local/qiime2_filtersamples.nf index c4bad400..46a58529 100644 --- a/modules/local/qiime2_filtersamples.nf +++ b/modules/local/qiime2_filtersamples.nf @@ -22,7 +22,9 @@ process QIIME2_FILTERSAMPLES { def args = task.ext.args ?: "--p-where \'${filter}<>\"\"\'" def prefix = task.ext.prefix ?: "${filter}" """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" qiime feature-table filter-samples \\ --i-table ${table} \\ diff --git a/modules/local/qiime2_filtertaxa.nf b/modules/local/qiime2_filtertaxa.nf index 4ffb0fa9..404552dd 100644 --- a/modules/local/qiime2_filtertaxa.nf +++ b/modules/local/qiime2_filtertaxa.nf @@ -27,7 +27,9 @@ process QIIME2_FILTERTAXA { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" if ! [ \"${exclude_taxa}\" = \"none\" ]; then #filter sequences diff --git a/modules/local/qiime2_inasv.nf b/modules/local/qiime2_inasv.nf index 28a44821..4ef660d7 100644 --- a/modules/local/qiime2_inasv.nf +++ b/modules/local/qiime2_inasv.nf @@ -20,6 +20,9 @@ process QIIME2_INASV { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" + # remove first line if needed sed '/^# Constructed from biom file/d' "$asv" > biom-table.txt diff --git a/modules/local/qiime2_inseq.nf b/modules/local/qiime2_inseq.nf index fbb3eecb..53b43970 100644 --- a/modules/local/qiime2_inseq.nf +++ b/modules/local/qiime2_inseq.nf @@ -20,6 +20,9 @@ process QIIME2_INSEQ { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" + qiime tools import \\ --input-path "$seq" \\ --type 'FeatureData[Sequence]' \\ diff --git a/modules/local/qiime2_intax.nf b/modules/local/qiime2_intax.nf index 42715945..1b1ce8b4 100644 --- a/modules/local/qiime2_intax.nf +++ b/modules/local/qiime2_intax.nf @@ -22,6 +22,9 @@ process QIIME2_INTAX { } def script_cmd = script ? "$script $tax" : "cp $tax tax.tsv" """ + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" + $script_cmd qiime tools import \\ diff --git a/modules/local/qiime2_intree.nf b/modules/local/qiime2_intree.nf index 3e13879c..70d48331 100644 --- a/modules/local/qiime2_intree.nf +++ b/modules/local/qiime2_intree.nf @@ -20,6 +20,9 @@ process QIIME2_INTREE { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" + qiime tools import \\ --type 'Phylogeny[Rooted]' \\ --input-path $tree \\ diff --git a/modules/local/qiime2_train.nf b/modules/local/qiime2_train.nf index d07945c8..ca763c50 100644 --- a/modules/local/qiime2_train.nf +++ b/modules/local/qiime2_train.nf @@ -21,7 +21,9 @@ process QIIME2_TRAIN { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" #Train classifier qiime feature-classifier fit-classifier-naive-bayes \\ diff --git a/modules/local/qiime2_tree.nf b/modules/local/qiime2_tree.nf index 89f30f60..d8b9cff8 100644 --- a/modules/local/qiime2_tree.nf +++ b/modules/local/qiime2_tree.nf @@ -20,7 +20,9 @@ process QIIME2_TREE { error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." } """ - export XDG_CONFIG_HOME="\${PWD}/HOME" + export XDG_CONFIG_HOME="./xdgconfig" + export MPLCONFIGDIR="./mplconfigdir" + export NUMBA_CACHE_DIR="./numbacache" qiime alignment mafft \\ --i-sequences ${repseq} \\ diff --git a/subworkflows/local/dada2_taxonomy_wf.nf b/subworkflows/local/dada2_taxonomy_wf.nf index 9673b45e..c0e5a85d 100644 --- a/subworkflows/local/dada2_taxonomy_wf.nf +++ b/subworkflows/local/dada2_taxonomy_wf.nf @@ -83,7 +83,7 @@ workflow DADA2_TAXONOMY_WF { //set file name prefix for SH assignments if (!params.skip_dada_addspecies) { ASV_SH_name = "ASV_tax_species_SH" - } else { + } else { ASV_SH_name = "ASV_tax_SH" } //find SHs