From cde237e7cec07798e5754b72aeca44efe89fc6db Mon Sep 17 00:00:00 2001 From: Jose Espinosa-Carrasco Date: Thu, 23 Dec 2021 18:22:07 +0100 Subject: [PATCH] Fix error messages mentioning suffix (#1190) --- modules/last/postmask/main.nf | 2 +- modules/plink/extract/main.nf | 2 +- modules/pmdtools/filter/main.nf | 2 +- modules/samblaster/main.nf | 2 +- modules/samtools/fixmate/main.nf | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/last/postmask/main.nf b/modules/last/postmask/main.nf index fb097a11..ca981e1c 100644 --- a/modules/last/postmask/main.nf +++ b/modules/last/postmask/main.nf @@ -17,7 +17,7 @@ process LAST_POSTMASK { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - if( "$maf" == "${prefix}.maf.gz" ) error "Input and output names are the same, use the suffix option to disambiguate" + if( "$maf" == "${prefix}.maf.gz" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ last-postmask $args $maf | gzip --no-name > ${prefix}.maf.gz diff --git a/modules/plink/extract/main.nf b/modules/plink/extract/main.nf index 9b8a52f3..688ada67 100644 --- a/modules/plink/extract/main.nf +++ b/modules/plink/extract/main.nf @@ -19,7 +19,7 @@ process PLINK_EXTRACT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - if( "$bed" == "${prefix}.bed" ) error "Input and output names are the same, use the suffix option to disambiguate" + if( "$bed" == "${prefix}.bed" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ plink \\ --bfile ${meta.id} \\ diff --git a/modules/pmdtools/filter/main.nf b/modules/pmdtools/filter/main.nf index 0b3bcbc6..b647b6d3 100644 --- a/modules/pmdtools/filter/main.nf +++ b/modules/pmdtools/filter/main.nf @@ -22,7 +22,7 @@ process PMDTOOLS_FILTER { def args3 = task.ext.args3 ?: '' def split_cpus = Math.floor(task.cpus/2) def prefix = task.ext.prefix ?: "${meta.id}" - if ("$bam" == "${prefix}.bam") error "[pmdtools/filter] Input and output names are the same, use the suffix option to disambiguate!" + if ("$bam" == "${prefix}.bam") error "[pmdtools/filter] Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" //threshold and header flags activate filtering function of pmdtools """ samtools \\ diff --git a/modules/samblaster/main.nf b/modules/samblaster/main.nf index c6573283..4627b978 100644 --- a/modules/samblaster/main.nf +++ b/modules/samblaster/main.nf @@ -19,7 +19,7 @@ process SAMBLASTER { def args2 = task.ext.args2 ?: '' def args3 = task.ext.args3 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - if( "$bam" == "${prefix}.bam" ) error "Input and output names are the same, use the suffix option to disambiguate" + if( "$bam" == "${prefix}.bam" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ samtools view -h $args2 $bam | \\ samblaster $args | \\ diff --git a/modules/samtools/fixmate/main.nf b/modules/samtools/fixmate/main.nf index 8f86c1c4..d108f8d6 100644 --- a/modules/samtools/fixmate/main.nf +++ b/modules/samtools/fixmate/main.nf @@ -17,7 +17,7 @@ process SAMTOOLS_FIXMATE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use the suffix option to disambiguate!" + if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ samtools \\