From ebb27711cd5f4de921244bfa81c676504072d31c Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen <37172585+asp8200@users.noreply.github.com> Date: Thu, 10 Aug 2023 18:17:24 +0200 Subject: [PATCH] Move conda-checks (sixth batch) (#3713) * Moving conda-check and replacing exit 1 with error-cmd * Disabling conda-based pytests for parabricks modules --- .github/workflows/test.yml | 4 ++++ modules/nf-core/merquryfk/ploidyplot/main.nf | 9 ++++----- modules/nf-core/mosdepth/main.nf | 4 ++-- modules/nf-core/parabricks/applybqsr/main.nf | 9 ++++----- modules/nf-core/parabricks/fq2bam/main.nf | 13 ++++++++----- modules/nf-core/scimap/mcmicro/main.nf | 9 ++++----- 6 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9614aecf774..c10eb0a62e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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" diff --git a/modules/nf-core/merquryfk/ploidyplot/main.nf b/modules/nf-core/merquryfk/ploidyplot/main.nf index 7103dda364b..f408292ed2c 100644 --- a/modules/nf-core/merquryfk/ploidyplot/main.nf +++ b/modules/nf-core/merquryfk/ploidyplot/main.nf @@ -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) @@ -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. diff --git a/modules/nf-core/mosdepth/main.nf b/modules/nf-core/mosdepth/main.nf index c17e4e658ee..74db3a274b3 100644 --- a/modules/nf-core/mosdepth/main.nf +++ b/modules/nf-core/mosdepth/main.nf @@ -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'" } """ diff --git a/modules/nf-core/parabricks/applybqsr/main.nf b/modules/nf-core/parabricks/applybqsr/main.nf index 3ebf5926b6a..48696bc1bed 100644 --- a/modules/nf-core/parabricks/applybqsr/main.nf +++ b/modules/nf-core/parabricks/applybqsr/main.nf @@ -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: @@ -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(' ') : "" diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index c63e3b4e292..01a7ba1f87d 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -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: @@ -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" @@ -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" diff --git a/modules/nf-core/scimap/mcmicro/main.nf b/modules/nf-core/scimap/mcmicro/main.nf index e344deda083..c8ff4cec03f 100644 --- a/modules/nf-core/scimap/mcmicro/main.nf +++ b/modules/nf-core/scimap/mcmicro/main.nf @@ -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: @@ -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