From b9172e8c26a3db5009f7872654c44587e254f094 Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen <37172585+asp8200@users.noreply.github.com> Date: Thu, 3 Aug 2023 11:09:37 +0200 Subject: [PATCH] Move conda-checks (third batch) (#3692) Moving conda-check and replacing exit 1 with error-cmd --- modules/nf-core/sentieon/applyvarcal/main.nf | 9 ++++----- modules/nf-core/sentieon/bwaindex/main.nf | 13 ++++++++----- modules/nf-core/sentieon/bwamem/main.nf | 9 ++++----- modules/nf-core/sentieon/dedup/main.nf | 9 ++++----- modules/nf-core/sentieon/gvcftyper/main.nf | 9 ++++----- modules/nf-core/sentieon/haplotyper/main.nf | 9 ++++----- modules/nf-core/sentieon/varcal/main.nf | 9 ++++----- 7 files changed, 32 insertions(+), 35 deletions(-) diff --git a/modules/nf-core/sentieon/applyvarcal/main.nf b/modules/nf-core/sentieon/applyvarcal/main.nf index 41630740a74..1dc3883dedb 100644 --- a/modules/nf-core/sentieon/applyvarcal/main.nf +++ b/modules/nf-core/sentieon/applyvarcal/main.nf @@ -5,11 +5,6 @@ process SENTIEON_APPLYVARCAL { secret 'SENTIEON_LICENSE_BASE64' - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." - } - container 'nf-core/sentieon:202112.06' input: @@ -26,6 +21,10 @@ process SENTIEON_APPLYVARCAL { 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 "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + } def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' diff --git a/modules/nf-core/sentieon/bwaindex/main.nf b/modules/nf-core/sentieon/bwaindex/main.nf index 9ddd68f65c6..a1ebee644fd 100644 --- a/modules/nf-core/sentieon/bwaindex/main.nf +++ b/modules/nf-core/sentieon/bwaindex/main.nf @@ -3,11 +3,6 @@ process SENTIEON_BWAINDEX { label 'process_high' label 'sentieon' - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." - } - container 'nf-core/sentieon:202112.06' input: @@ -21,6 +16,10 @@ process SENTIEON_BWAINDEX { 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 "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + } def args = task.ext.args ?: '' """ mkdir bwa @@ -39,6 +38,10 @@ process SENTIEON_BWAINDEX { """ stub: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + } """ mkdir bwa diff --git a/modules/nf-core/sentieon/bwamem/main.nf b/modules/nf-core/sentieon/bwamem/main.nf index fa31b336654..aeca2825609 100644 --- a/modules/nf-core/sentieon/bwamem/main.nf +++ b/modules/nf-core/sentieon/bwamem/main.nf @@ -5,11 +5,6 @@ process SENTIEON_BWAMEM { secret 'SENTIEON_LICENSE_BASE64' - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." - } - container 'nf-core/sentieon:202112.06' input: @@ -26,6 +21,10 @@ process SENTIEON_BWAMEM { 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 "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + } def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' diff --git a/modules/nf-core/sentieon/dedup/main.nf b/modules/nf-core/sentieon/dedup/main.nf index 7f6d1ce7360..faa14fe011f 100644 --- a/modules/nf-core/sentieon/dedup/main.nf +++ b/modules/nf-core/sentieon/dedup/main.nf @@ -5,11 +5,6 @@ process SENTIEON_DEDUP { secret 'SENTIEON_LICENSE_BASE64' - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." - } - container 'nf-core/sentieon:202112.06' input: @@ -31,6 +26,10 @@ process SENTIEON_DEDUP { 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 "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + } def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def args3 = task.ext.args3 ?: '' diff --git a/modules/nf-core/sentieon/gvcftyper/main.nf b/modules/nf-core/sentieon/gvcftyper/main.nf index 5f50e47c0b4..a8ece7ba930 100644 --- a/modules/nf-core/sentieon/gvcftyper/main.nf +++ b/modules/nf-core/sentieon/gvcftyper/main.nf @@ -5,11 +5,6 @@ process SENTIEON_GVCFTYPER { secret 'SENTIEON_LICENSE_BASE64' - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." - } - container 'nf-core/sentieon:202112.06' input: @@ -28,6 +23,10 @@ process SENTIEON_GVCFTYPER { 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 "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + } def prefix = task.ext.prefix ?: "${meta.id}" def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' def sentieon_auth_data_base64 = task.ext.sentieon_auth_data_base64 ?: '' diff --git a/modules/nf-core/sentieon/haplotyper/main.nf b/modules/nf-core/sentieon/haplotyper/main.nf index f913526a1c2..f83a1371221 100644 --- a/modules/nf-core/sentieon/haplotyper/main.nf +++ b/modules/nf-core/sentieon/haplotyper/main.nf @@ -5,11 +5,6 @@ process SENTIEON_HAPLOTYPER { secret 'SENTIEON_LICENSE_BASE64' - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." - } - container 'nf-core/sentieon:202112.06' input: @@ -32,6 +27,10 @@ process SENTIEON_HAPLOTYPER { 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 "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + } def args = task.ext.args ?: '' // options for the driver def args2 = task.ext.args2 ?: '' // options for the vcf generation def args3 = task.ext.args3 ?: '' // options for the gvcf generation diff --git a/modules/nf-core/sentieon/varcal/main.nf b/modules/nf-core/sentieon/varcal/main.nf index 8a001587421..81820e03284 100644 --- a/modules/nf-core/sentieon/varcal/main.nf +++ b/modules/nf-core/sentieon/varcal/main.nf @@ -5,11 +5,6 @@ process SENTIEON_VARCAL { secret 'SENTIEON_LICENSE_BASE64' - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." - } - container 'nf-core/sentieon:202112.06' input: @@ -31,6 +26,10 @@ process SENTIEON_VARCAL { 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 "Sentieon modules do not support Conda. Please use Docker / Singularity / Podman instead." + } def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def reference_command = fasta ? "--reference $fasta " : ''