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

Move conda check to script section #656

Merged
merged 2 commits into from
Nov 9, 2023
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 @@ -12,6 +12,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`

Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_alphararefaction.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_ancom_asv.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_ancom_tax.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_barplot.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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}": ""
"""
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_classify.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_diversity_adonis.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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="./xdgconfig"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_diversity_alpha.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_diversity_beta.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_diversity_betaord.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_diversity_core.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_export_absolute.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_export_relasv.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_export_reltax.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_extract.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_featuretable_group.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_filtersamples.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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}"
"""
Expand Down
9 changes: 4 additions & 5 deletions modules/local/qiime2_filtertaxa.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
Expand Down
Loading
Loading