Skip to content

Commit

Permalink
Move conda-checks (second batch) (nf-core#3690)
Browse files Browse the repository at this point in the history
Moving conda-check and replacing exit 1 with error-cmd

Ignoring linting errors due to GHCR - will be fixed later.
  • Loading branch information
asp8200 authored Aug 3, 2023
1 parent b9172e8 commit ed67f2f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 25 deletions.
9 changes: 4 additions & 5 deletions modules/nf-core/cellranger/multi/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process CELLRANGER_MULTI {

container "nf-core/cellranger:7.1.0"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "CELLRANGER_MULTI module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
val meta
tuple val(meta_gex) , path (gex_fastqs , stageAs: "fastqs/gex/*")
Expand Down Expand Up @@ -38,6 +33,10 @@ process CELLRANGER_MULTI {
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 "CELLRANGER_MULTI module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

Expand Down
13 changes: 8 additions & 5 deletions modules/nf-core/cellranger/vdj/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process CELLRANGER_VDJ {

container "nf-core/cellranger:7.1.0"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "CELLRANGER_VDJ module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple val(meta), path(reads)
path reference
Expand All @@ -21,6 +16,10 @@ process CELLRANGER_VDJ {
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 "CELLRANGER_VDJ module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def reference_name = reference.name
Expand All @@ -41,6 +40,10 @@ process CELLRANGER_VDJ {
"""

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "CELLRANGER_VDJ module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p "${meta.id}/outs/"
Expand Down
13 changes: 8 additions & 5 deletions modules/nf-core/deepvariant/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process DEEPVARIANT {

container "nf-core/deepvariant:1.5.0"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple val(meta), path(input), path(index), path(intervals)
tuple val(meta2), path(fasta)
Expand All @@ -26,6 +21,10 @@ process DEEPVARIANT {
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 "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def regions = intervals ? "--regions=${intervals}" : ""
Expand All @@ -48,6 +47,10 @@ process DEEPVARIANT {
"""

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead."
}
prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.vcf.gz
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/fastk/fastk/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ process FASTK_FASTK {
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
container 'ghcr.io/nbisweden/fastk_genescopefk_merquryfk:1.2'

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "FASTK_FASTK module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple val(meta), path(reads)

Expand All @@ -23,6 +18,10 @@ process FASTK_FASTK {
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 "FASTK_FASTK module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def FASTK_VERSION = 'f18a4e6d2207539f7b84461daebc54530a9559b0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/fastk/histex/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ process FASTK_HISTEX {
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
container 'ghcr.io/nbisweden/fastk_genescopefk_merquryfk:1.2'

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "FASTK_HISTEX module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple val(meta), path(histogram)

Expand All @@ -21,6 +16,10 @@ process FASTK_HISTEX {
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 "FASTK_HISTEX module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def FASTK_VERSION = 'f18a4e6d2207539f7b84461daebc54530a9559b0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
Expand Down

0 comments on commit ed67f2f

Please sign in to comment.