From 2326b7ef4ab9c5cc01924eeb00f94ee2cc820f79 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 7 Nov 2023 14:44:57 +0100 Subject: [PATCH] move conda check to script section --- CHANGELOG.md | 2 ++ modules/local/qiime2_alphararefaction.nf | 9 ++++----- modules/local/qiime2_ancom_asv.nf | 9 ++++----- modules/local/qiime2_ancom_tax.nf | 9 ++++----- modules/local/qiime2_barplot.nf | 9 ++++----- modules/local/qiime2_classify.nf | 9 ++++----- modules/local/qiime2_diversity_adonis.nf | 9 ++++----- modules/local/qiime2_diversity_alpha.nf | 9 ++++----- modules/local/qiime2_diversity_beta.nf | 9 ++++----- modules/local/qiime2_diversity_betaord.nf | 9 ++++----- modules/local/qiime2_diversity_core.nf | 9 ++++----- modules/local/qiime2_export_absolute.nf | 9 ++++----- modules/local/qiime2_export_relasv.nf | 9 ++++----- modules/local/qiime2_export_reltax.nf | 9 ++++----- modules/local/qiime2_extract.nf | 9 ++++----- modules/local/qiime2_featuretable_group.nf | 9 ++++----- modules/local/qiime2_filtersamples.nf | 9 ++++----- modules/local/qiime2_filtertaxa.nf | 9 ++++----- modules/local/qiime2_inasv.nf | 9 ++++----- modules/local/qiime2_inseq.nf | 9 ++++----- modules/local/qiime2_intax.nf | 9 ++++----- modules/local/qiime2_intree.nf | 9 ++++----- modules/local/qiime2_train.nf | 9 ++++----- modules/local/qiime2_tree.nf | 9 ++++----- 24 files changed, 94 insertions(+), 115 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddb0e72c..c9381a95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` +- [#656](https://github.com/nf-core/ampliseq/pull/656) - Moved conda-check to script-section and replaced `exit 1` with `error()` + ### `Dependencies` ### `Removed` diff --git a/modules/local/qiime2_alphararefaction.nf b/modules/local/qiime2_alphararefaction.nf index 273749ba..44319b94 100644 --- a/modules/local/qiime2_alphararefaction.nf +++ b/modules/local/qiime2_alphararefaction.nf @@ -3,11 +3,6 @@ process QIIME2_ALPHARAREFACTION { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(metadata) path(table) @@ -22,6 +17,10 @@ process QIIME2_ALPHARAREFACTION { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_ancom_asv.nf b/modules/local/qiime2_ancom_asv.nf index 52c599c4..54ccd6c4 100644 --- a/modules/local/qiime2_ancom_asv.nf +++ b/modules/local/qiime2_ancom_asv.nf @@ -7,11 +7,6 @@ process QIIME2_ANCOM_ASV { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple path(metadata), path(table) @@ -23,6 +18,10 @@ process QIIME2_ANCOM_ASV { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_ancom_tax.nf b/modules/local/qiime2_ancom_tax.nf index 3c065bb3..91567c0e 100644 --- a/modules/local/qiime2_ancom_tax.nf +++ b/modules/local/qiime2_ancom_tax.nf @@ -5,11 +5,6 @@ process QIIME2_ANCOM_TAX { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple path(metadata), path(table), path(taxonomy) ,val(taxlevel) @@ -21,6 +16,10 @@ process QIIME2_ANCOM_TAX { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" mkdir ancom diff --git a/modules/local/qiime2_barplot.nf b/modules/local/qiime2_barplot.nf index a06100d4..d66ef4ee 100644 --- a/modules/local/qiime2_barplot.nf +++ b/modules/local/qiime2_barplot.nf @@ -3,11 +3,6 @@ process QIIME2_BARPLOT { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(metadata) path(table) @@ -22,6 +17,10 @@ process QIIME2_BARPLOT { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } suffix = setting ? "_${table.baseName}" : "" def metadata_cmd = metadata ? "--m-metadata-file ${metadata}": "" """ diff --git a/modules/local/qiime2_classify.nf b/modules/local/qiime2_classify.nf index 96910c9a..d7cf1929 100644 --- a/modules/local/qiime2_classify.nf +++ b/modules/local/qiime2_classify.nf @@ -4,11 +4,6 @@ process QIIME2_CLASSIFY { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(trained_classifier) path(repseq) @@ -22,6 +17,10 @@ process QIIME2_CLASSIFY { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_diversity_adonis.nf b/modules/local/qiime2_diversity_adonis.nf index 6b81f00e..24b7afe8 100644 --- a/modules/local/qiime2_diversity_adonis.nf +++ b/modules/local/qiime2_diversity_adonis.nf @@ -4,11 +4,6 @@ process QIIME2_DIVERSITY_ADONIS { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple path(metadata), path(core), val(formula) @@ -20,6 +15,10 @@ process QIIME2_DIVERSITY_ADONIS { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + 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="\${PWD}/HOME" diff --git a/modules/local/qiime2_diversity_alpha.nf b/modules/local/qiime2_diversity_alpha.nf index baebc03e..237c9664 100644 --- a/modules/local/qiime2_diversity_alpha.nf +++ b/modules/local/qiime2_diversity_alpha.nf @@ -4,11 +4,6 @@ process QIIME2_DIVERSITY_ALPHA { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple path(metadata), path(core) @@ -20,6 +15,10 @@ process QIIME2_DIVERSITY_ALPHA { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_diversity_beta.nf b/modules/local/qiime2_diversity_beta.nf index 44df25f9..dbc6cd18 100644 --- a/modules/local/qiime2_diversity_beta.nf +++ b/modules/local/qiime2_diversity_beta.nf @@ -4,11 +4,6 @@ process QIIME2_DIVERSITY_BETA { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple path(metadata), path(core), val(category) @@ -20,6 +15,10 @@ process QIIME2_DIVERSITY_BETA { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_diversity_betaord.nf b/modules/local/qiime2_diversity_betaord.nf index b29bd99e..3c199740 100644 --- a/modules/local/qiime2_diversity_betaord.nf +++ b/modules/local/qiime2_diversity_betaord.nf @@ -4,11 +4,6 @@ process QIIME2_DIVERSITY_BETAORD { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple path(metadata), path(core) @@ -20,6 +15,10 @@ process QIIME2_DIVERSITY_BETAORD { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" mkdir beta_diversity diff --git a/modules/local/qiime2_diversity_core.nf b/modules/local/qiime2_diversity_core.nf index 22235dfb..c1866ead 100644 --- a/modules/local/qiime2_diversity_core.nf +++ b/modules/local/qiime2_diversity_core.nf @@ -3,11 +3,6 @@ process QIIME2_DIVERSITY_CORE { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(metadata) path(table) @@ -26,6 +21,10 @@ process QIIME2_DIVERSITY_CORE { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ # FIX: detecting a viable GPU on your system, but the GPU is unavailable for compute, causing UniFrac to fail. # COMMENT: might be fixed in version after QIIME2 2023.5 diff --git a/modules/local/qiime2_export_absolute.nf b/modules/local/qiime2_export_absolute.nf index 57c03a5e..75fe7f09 100644 --- a/modules/local/qiime2_export_absolute.nf +++ b/modules/local/qiime2_export_absolute.nf @@ -3,11 +3,6 @@ process QIIME2_EXPORT_ABSOLUTE { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(table) path(repseq) @@ -28,6 +23,10 @@ process QIIME2_EXPORT_ABSOLUTE { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_export_relasv.nf b/modules/local/qiime2_export_relasv.nf index 58e05b58..c9e0b139 100644 --- a/modules/local/qiime2_export_relasv.nf +++ b/modules/local/qiime2_export_relasv.nf @@ -3,11 +3,6 @@ process QIIME2_EXPORT_RELASV { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(table) @@ -19,6 +14,10 @@ process QIIME2_EXPORT_RELASV { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_export_reltax.nf b/modules/local/qiime2_export_reltax.nf index c5b93d7c..f8849ed3 100644 --- a/modules/local/qiime2_export_reltax.nf +++ b/modules/local/qiime2_export_reltax.nf @@ -3,11 +3,6 @@ process QIIME2_EXPORT_RELTAX { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(table) path(taxonomy) @@ -22,6 +17,10 @@ process QIIME2_EXPORT_RELTAX { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_extract.nf b/modules/local/qiime2_extract.nf index 6889befb..3ba5a99c 100644 --- a/modules/local/qiime2_extract.nf +++ b/modules/local/qiime2_extract.nf @@ -5,11 +5,6 @@ process QIIME2_EXTRACT { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple val(meta), path(database) @@ -21,6 +16,10 @@ process QIIME2_EXTRACT { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_featuretable_group.nf b/modules/local/qiime2_featuretable_group.nf index d47ee14f..11f74f94 100644 --- a/modules/local/qiime2_featuretable_group.nf +++ b/modules/local/qiime2_featuretable_group.nf @@ -4,11 +4,6 @@ process QIIME2_FEATURETABLE_GROUP { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple path(table), path(metadata), val(category) @@ -20,6 +15,10 @@ process QIIME2_FEATURETABLE_GROUP { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_filtersamples.nf b/modules/local/qiime2_filtersamples.nf index 7f64e7e2..c4bad400 100644 --- a/modules/local/qiime2_filtersamples.nf +++ b/modules/local/qiime2_filtersamples.nf @@ -4,11 +4,6 @@ process QIIME2_FILTERSAMPLES { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple path(metadata), path(table), val(filter) @@ -20,6 +15,10 @@ process QIIME2_FILTERSAMPLES { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + 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 ?: "--p-where \'${filter}<>\"\"\'" def prefix = task.ext.prefix ?: "${filter}" """ diff --git a/modules/local/qiime2_filtertaxa.nf b/modules/local/qiime2_filtertaxa.nf index 39cbb82c..4ffb0fa9 100644 --- a/modules/local/qiime2_filtertaxa.nf +++ b/modules/local/qiime2_filtertaxa.nf @@ -4,11 +4,6 @@ process QIIME2_FILTERTAXA { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(table) path(repseq) @@ -27,6 +22,10 @@ process QIIME2_FILTERTAXA { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_inasv.nf b/modules/local/qiime2_inasv.nf index d4848ba7..28a44821 100644 --- a/modules/local/qiime2_inasv.nf +++ b/modules/local/qiime2_inasv.nf @@ -4,11 +4,6 @@ process QIIME2_INASV { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(asv) @@ -20,6 +15,10 @@ process QIIME2_INASV { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ # 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 7c7c2007..fbb3eecb 100644 --- a/modules/local/qiime2_inseq.nf +++ b/modules/local/qiime2_inseq.nf @@ -4,11 +4,6 @@ process QIIME2_INSEQ { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(seq) @@ -20,6 +15,10 @@ process QIIME2_INSEQ { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ qiime tools import \\ --input-path "$seq" \\ diff --git a/modules/local/qiime2_intax.nf b/modules/local/qiime2_intax.nf index b9c3b039..42715945 100644 --- a/modules/local/qiime2_intax.nf +++ b/modules/local/qiime2_intax.nf @@ -4,11 +4,6 @@ process QIIME2_INTAX { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(tax) //ASV_tax_species.tsv val(script) @@ -21,6 +16,10 @@ process QIIME2_INTAX { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } def script_cmd = script ? "$script $tax" : "cp $tax tax.tsv" """ $script_cmd diff --git a/modules/local/qiime2_intree.nf b/modules/local/qiime2_intree.nf index a7a3ff3b..3e13879c 100644 --- a/modules/local/qiime2_intree.nf +++ b/modules/local/qiime2_intree.nf @@ -4,11 +4,6 @@ process QIIME2_INTREE { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple val(meta), path(tree) @@ -20,6 +15,10 @@ process QIIME2_INTREE { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ qiime tools import \\ --type 'Phylogeny[Rooted]' \\ diff --git a/modules/local/qiime2_train.nf b/modules/local/qiime2_train.nf index 4c4d69b2..d07945c8 100644 --- a/modules/local/qiime2_train.nf +++ b/modules/local/qiime2_train.nf @@ -5,11 +5,6 @@ process QIIME2_TRAIN { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: tuple val(meta), path(qza) @@ -21,6 +16,10 @@ process QIIME2_TRAIN { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME" diff --git a/modules/local/qiime2_tree.nf b/modules/local/qiime2_tree.nf index 6e7a89fe..89f30f60 100644 --- a/modules/local/qiime2_tree.nf +++ b/modules/local/qiime2_tree.nf @@ -3,11 +3,6 @@ process QIIME2_TREE { container "qiime2/core:2023.7" - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." - } - input: path(repseq) @@ -20,6 +15,10 @@ process QIIME2_TREE { task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead." + } """ export XDG_CONFIG_HOME="\${PWD}/HOME"