From 7de971b2a84fe46cfa3982727f09b9e2916b3d59 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 24 Jul 2025 13:20:41 +0200 Subject: [PATCH 1/2] poc with samtools/sort --- modules/nf-core/samtools/sort/main.nf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index caf3c61a87d..e1858868105 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -1,6 +1,7 @@ process SAMTOOLS_SORT { tag "$meta.id" label 'process_medium' + ext prefix: "${meta.id}", args: '', when: true conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -18,12 +19,11 @@ process SAMTOOLS_SORT { tuple val(meta), path("*.csi"), emit: csi, optional: true path "versions.yml", emit: versions - when: - task.ext.when == null || task.ext.when + when: task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args + def prefix = task.ext.prefix def extension = args.contains("--output-fmt sam") ? "sam" : args.contains("--output-fmt cram") ? "cram" : "bam" @@ -49,8 +49,8 @@ process SAMTOOLS_SORT { """ stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args + def prefix = task.ext.prefix def extension = args.contains("--output-fmt sam") ? "sam" : args.contains("--output-fmt cram") ? "cram" : "bam" From 311bd0a1f828091d7dee3e033e83593de8ceb158 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 24 Jul 2025 13:28:09 +0200 Subject: [PATCH 2/2] use smoove as another example --- modules/nf-core/smoove/call/main.nf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/nf-core/smoove/call/main.nf b/modules/nf-core/smoove/call/main.nf index 7c5774c59ce..ab76587f2d3 100644 --- a/modules/nf-core/smoove/call/main.nf +++ b/modules/nf-core/smoove/call/main.nf @@ -1,6 +1,7 @@ process SMOOVE_CALL { tag "$meta.id" label 'process_high' + ext prefix: "${meta.id}", args: '', when: true conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -16,12 +17,11 @@ process SMOOVE_CALL { tuple val(meta), path("*.vcf.gz"), emit: vcf path "versions.yml" , emit: versions - when: - task.ext.when == null || task.ext.when + when: task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args + def prefix = task.ext.prefix def exclude = exclude_beds ? "--exclude ${exclude_beds}" : "" """ @@ -41,7 +41,7 @@ process SMOOVE_CALL { """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" + def prefix = task.ext.prefix """ echo "" | gzip > ${prefix}.vcf.gz