Skip to content

Commit

Permalink
move conda check to script section
Browse files Browse the repository at this point in the history
  • Loading branch information
d4straub committed Nov 7, 2023
1 parent ea50aeb commit 2326b7e
Show file tree
Hide file tree
Showing 24 changed files with 94 additions and 115 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
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="\${PWD}/HOME"
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="\${PWD}/HOME"
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="\${PWD}/HOME"
mkdir ancom
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="\${PWD}/HOME"
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="\${PWD}/HOME"
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="\${PWD}/HOME"
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="\${PWD}/HOME"
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="\${PWD}/HOME"
mkdir beta_diversity
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="\${PWD}/HOME"
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="\${PWD}/HOME"
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="\${PWD}/HOME"
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="\${PWD}/HOME"
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="\${PWD}/HOME"
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="\${PWD}/HOME"
Expand Down
Loading

0 comments on commit 2326b7e

Please sign in to comment.