Skip to content

Commit

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

Forcing merge because these are existing errors that can't really be fixed in the scope of this PR (@adamrtalbot will take the blame).

Co-authored-by: Adam Talbot <[email protected]>
  • Loading branch information
asp8200 and adamrtalbot authored Aug 7, 2023
1 parent 4375e5a commit 8c4542e
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 40 deletions.
9 changes: 4 additions & 5 deletions modules/nf-core/fastk/merge/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ process FASTK_MERGE {
// 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_MERGE module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple val(meta), path(hist), path(ktab), path(prof)

Expand All @@ -23,6 +18,10 @@ process FASTK_MERGE {
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_MERGE 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/fcs/fcsadaptor/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ process FCS_FCSADAPTOR {
'https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/releases/0.2.3/fcs-adaptor.0.2.3.sif':
'docker.io/ncbi/fcs-adaptor:0.2.3' }"

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

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

Expand All @@ -27,6 +22,10 @@ process FCS_FCSADAPTOR {
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 "FCS_FCSADAPTOR module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: '--prok' // --prok || --euk
def prefix = task.ext.prefix ?: "${meta.id}"
def FCSADAPTOR_VERSION = '0.2.3' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
Expand Down
13 changes: 8 additions & 5 deletions modules/nf-core/fcs/fcsgx/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ process FCS_FCSGX {
'https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/releases/0.4.0/fcs-gx.sif':
'docker.io/ncbi/fcs-gx:0.4.0' }"

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

input:
tuple val(meta), path(assembly)
path gxdb
Expand All @@ -24,6 +19,10 @@ process FCS_FCSGX {
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 "FCS_FCSGX module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def FCSGX_VERSION = '0.4.0'
Expand All @@ -44,6 +43,10 @@ process FCS_FCSGX {
"""

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "FCS_FCSGX module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def prefix = task.ext.prefix ?: "${meta.id}"
def FCSGX_VERSION = '0.4.0'

Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/gatk4/cnnscorevariants/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ process GATK4_CNNSCOREVARIANTS {
//Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811
container "nf-core/gatk:4.4.0.0" //Biocontainers is missing a package

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

input:
tuple val(meta), path(vcf), path(tbi), path(aligned_input), path(intervals)
path fasta
Expand All @@ -27,6 +22,10 @@ process GATK4_CNNSCOREVARIANTS {
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 "GATK4_CNNSCOREVARIANTS module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def aligned_input = aligned_input ? "--input $aligned_input" : ""
Expand Down
13 changes: 8 additions & 5 deletions modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ process GATK4_DETERMINEGERMLINECONTIGPLOIDY {
//Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811
container "nf-core/gatk:4.4.0.0" //Biocontainers is missing a package

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

input:
tuple val(meta), path(counts), path(bed), path(exclude_beds)
tuple val(meta2), path(ploidy_model)
Expand All @@ -25,6 +20,10 @@ process GATK4_DETERMINEGERMLINECONTIGPLOIDY {
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 "GATK4_DETERMINEGERMLINECONTIGPLOIDY module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def intervals = bed ? "--intervals ${bed}" : ""
Expand Down Expand Up @@ -58,6 +57,10 @@ process GATK4_DETERMINEGERMLINECONTIGPLOIDY {
"""

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "GATK4_DETERMINEGERMLINECONTIGPLOIDY module does not support Conda. Please use Docker / Singularity / Podman instead."
}
prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}-calls
Expand Down
13 changes: 8 additions & 5 deletions modules/nf-core/gatk4/germlinecnvcaller/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ process GATK4_GERMLINECNVCALLER {
//Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811
container "nf-core/gatk:4.4.0.0" //Biocontainers is missing a package

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

input:
tuple val(meta), path(tsv), path(intervals), path(ploidy), path(model)

Expand All @@ -22,6 +17,10 @@ process GATK4_GERMLINECNVCALLER {
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 "GATK4_GERMLINECNVCALLER module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def intervals_command = intervals ? "--intervals ${intervals}" : ""
Expand Down Expand Up @@ -53,6 +52,10 @@ process GATK4_GERMLINECNVCALLER {
"""

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "GATK4_GERMLINECNVCALLER module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p ${prefix}-cnv-calls/${prefix}-calls
Expand Down
13 changes: 8 additions & 5 deletions modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ process GATK4_POSTPROCESSGERMLINECNVCALLS {
//Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811
container "nf-core/gatk:4.4.0.0" //Biocontainers is missing a package

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

input:
tuple val(meta), path(calls), path(model), path(ploidy)

Expand All @@ -23,6 +18,10 @@ process GATK4_POSTPROCESSGERMLINECNVCALLS {
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 "GATK4_POSTPROCESSGERMLINECNVCALLS module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def calls_command = calls ? calls.collect{"--calls-shard-path $it"}.join(' ') : ""
Expand Down Expand Up @@ -51,6 +50,10 @@ process GATK4_POSTPROCESSGERMLINECNVCALLS {
"""

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

container "docker.io/nfcore/spaceranger:2.1.0"

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

input:
path gtf

Expand All @@ -20,6 +15,10 @@ process SPACERANGER_MKGTF {
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 "SPACERANGER_MKGTF module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${gtf.baseName}.filtered"
"""
Expand Down

0 comments on commit 8c4542e

Please sign in to comment.