Skip to content

Commit

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

* Disabling conda-based pytests for parabricks modules
  • Loading branch information
asp8200 authored Aug 10, 2023
1 parent b28e4dd commit ebb2771
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 22 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ jobs:
tags: merquryfk/ploidyplot
- profile: "conda"
tags: mitohifi/findmitoreference
- profile: "conda"
tags: parabricks/applybqsr
- profile: "conda"
tags: parabricks/fq2bam
- profile: "conda"
tags: scimap/mcmicro
- profile: "conda"
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/merquryfk/ploidyplot/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ process MERQURYFK_PLOIDYPLOT {
// 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, "MERQURYFK_PLOIDYPLOT module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple val(meta), path(fastk_hist), path(fastk_ktab)

Expand All @@ -26,6 +21,10 @@ process MERQURYFK_PLOIDYPLOT {
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 "MERQURYFK_PLOIDYPLOT 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
4 changes: 2 additions & 2 deletions modules/nf-core/mosdepth/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ process MOSDEPTH {
def reference = fasta ? "--fasta ${fasta}" : ""
def interval = bed ? "--by ${bed}" : ""
if (bed && args.contains("--by")) {
exit 1, "'--by' can only be specified once when running mosdepth! Either remove input BED file definition or remove '--by' from 'ext.args' definition"
error "'--by' can only be specified once when running mosdepth! Either remove input BED file definition or remove '--by' from 'ext.args' definition"
}
if (!bed && args.contains("--thresholds")) {
exit 1, "'--thresholds' can only be specified in conjunction with '--by'"
error "'--thresholds' can only be specified in conjunction with '--by'"
}

"""
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/parabricks/applybqsr/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ process PARABRICKS_APPLYBQSR {
tag "$meta.id"
label 'process_high'

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

container "nvcr.io/nvidia/clara/clara-parabricks:4.0.1-1"

input:
Expand All @@ -22,6 +17,10 @@ process PARABRICKS_APPLYBQSR {
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 "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def interval_command = intervals ? intervals.collect{"--interval-file $it"}.join(' ') : ""
Expand Down
13 changes: 8 additions & 5 deletions modules/nf-core/parabricks/fq2bam/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ process PARABRICKS_FQ2BAM {
tag "$meta.id"
label 'process_high'

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

container "nvcr.io/nvidia/clara/clara-parabricks:4.0.1-1"

input:
Expand All @@ -27,6 +22,10 @@ process PARABRICKS_FQ2BAM {
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 "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def in_fq_command = meta.single_end ? "--in-se-fq $reads" : "--in-fq $reads"
Expand Down Expand Up @@ -65,6 +64,10 @@ process PARABRICKS_FQ2BAM {
"""

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def in_fq_command = meta.single_end ? "--in-se-fq $reads" : "--in-fq $reads"
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/scimap/mcmicro/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ process SCIMAP_MCMICRO {
tag "$meta.id"
label 'process_single'

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

container "docker.io/labsyspharm/scimap:0.22.0"

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

0 comments on commit ebb2771

Please sign in to comment.