From 9d0cad583b9a71a6509b754fdf589cbfbed08961 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Thu, 2 Dec 2021 12:39:55 +0000 Subject: [PATCH] Change syntax from task.ext.suffix to tast.ext.prefix in all modules (#1110) * Add comment line for consistency * Remove all functions.nf * Remove include functions.nf and publishDir options * Replace options.args3 with task.ext.args3 - 3 modules * Replace options.args3 with task.ext.args3 - 17 modules * Replace {task.cpus} with task.cpus * Replace off on off off off off off off off on off on off on off off off on off off off on on off off off on on off off off off off off off on off off off off on off on on off off off on on on on off off off on off on on off on on off off on on on off on on off on off off off off on off off off on off off on off on off off off on on off on off on off off on off off off on off off off on off off off off on off off off on on on off on on off off on off on on on off on on off on on on off off off off off on on off off on off off off off off on off off on on off on on off on off off off on off off off off on on off on off off on off off on off on off off off off off off off off on on off on off off off.args with * Add def args = task.ext.args line to all modules in script section * Replace options.args with args and args_list * Initialise args2 and args3 properly * Replace container syntax * Revert container changes for cellranger/mkref * Replace getProcessName in all modules * Replace getSoftwareName in all modules * Unify modules using VERSION variable * Replae options.suffix with task.ext.suffix * Remove NF version restriction for CI * Bump NF version in README * Replace task.process.tokenize logic with task.process * Minor tweaks to unify syntax in tests main.nf * Add a separate nextflow.config for each module * Transfer remaining module options to nextflow.config * Remove addParams from tests main.nf * Remove TODO statements * Use -c to import module specific config * Bump NF version to 21.10.3 * Fix tests for artic/minion * Fix broken publishDir syntax * Standardise and fix obvious failing module tests * Remove kronatools to krona * Comment out tags in subworkflow test.yml * Fix failing module tests * Add consistent indentation to nextflow.config * Comment out subworklow definitions * Fix kallistobustools/ref * Fix rmarkdownnotebook * Fix jupyternotebook * Quote task.process * Add plink2/vcf to pytest_modules.yml * Remove NF_CORE_MODULES_TEST from pytest CI * Fix more tests * Move bacteroides_fragilis to prokaryotes folder * Fix cooler merge tests * Fix kallistobustools/count tests * Fix kallistobustools/ref tests * Update test_10x_1_fastq_gz file for kallistobustools/count tests * Fix bcftools/query tests * Fix delly/call tests * Fix cooler/zoomify tests * Fix csvtk/split tests * Fix gatk4/intervallisttools tests * Fix gatk4/variantfiltration * Fix pydamage/filter tests * Fix test data for unicycler * Fix gstama/collapse module * Fix leehom tests * Fix metaphlan3 tests * Fix pairtools/select tests * Update nextflow.config * Update nextflow.config * feat: update syntax * Fix arriba tests * Fix more failing tests * Update test syntax * Remove comments from tests nextflow.config * Apply suggestions from code review * Fix kallistobustools/count module * Update dumpsoftwareversions module * Update custom/dumpsoftwareversions * Add args2 to untar module * Update leftover modules * Remove last remaining addParams * Change syntax from task.ext.suffix to tast.ext.prefix * Change nextflow.config in all tests to use ext.prefix instead of ext.suffix Co-authored-by: JoseEspinosa Co-authored-by: Gregor Sturm Co-authored-by: MaxUlysse --- modules/abacas/main.nf | 2 +- modules/adapterremoval/main.nf | 2 +- modules/agrvate/main.nf | 2 +- modules/allelecounter/main.nf | 2 +- modules/arriba/main.nf | 2 +- modules/artic/guppyplex/main.nf | 2 +- modules/assemblyscan/main.nf | 2 +- modules/ataqv/ataqv/main.nf | 2 +- modules/bamaligncleaner/main.nf | 2 +- modules/bamtools/split/main.nf | 2 +- modules/bamutil/trimbam/main.nf | 2 +- modules/bandage/image/main.nf | 2 +- modules/bbmap/align/main.nf | 2 +- modules/bbmap/bbduk/main.nf | 2 +- modules/bbmap/bbsplit/main.nf | 2 +- modules/bcftools/consensus/main.nf | 2 +- modules/bcftools/filter/main.nf | 2 +- modules/bcftools/index/main.nf | 2 +- modules/bcftools/mpileup/main.nf | 2 +- modules/bcftools/norm/main.nf | 2 +- modules/bcftools/query/main.nf | 2 +- modules/bcftools/reheader/main.nf | 2 +- modules/bcftools/stats/main.nf | 2 +- modules/bcftools/view/main.nf | 2 +- modules/bedtools/bamtobed/main.nf | 2 +- modules/bedtools/complement/main.nf | 2 +- modules/bedtools/genomecov/main.nf | 2 +- modules/bedtools/intersect/main.nf | 2 +- modules/bedtools/makewindows/main.nf | 2 +- modules/bedtools/maskfasta/main.nf | 2 +- modules/bedtools/merge/main.nf | 2 +- modules/bedtools/slop/main.nf | 2 +- modules/bedtools/sort/main.nf | 2 +- modules/bedtools/subtract/main.nf | 2 +- modules/bismark/align/main.nf | 2 +- modules/bismark/deduplicate/main.nf | 2 +- modules/blast/blastn/main.nf | 2 +- modules/bowtie/align/main.nf | 2 +- modules/bowtie2/align/main.nf | 2 +- modules/bwa/aln/main.nf | 2 +- modules/bwa/mem/main.nf | 2 +- modules/bwa/sampe/main.nf | 2 +- modules/bwa/samse/main.nf | 2 +- modules/bwamem2/mem/main.nf | 2 +- modules/bwameth/align/main.nf | 2 +- modules/cat/fastq/main.nf | 2 +- modules/chromap/chromap/main.nf | 2 +- modules/clonalframeml/main.nf | 2 +- modules/cmseq/polymut/main.nf | 2 +- modules/cooler/cload/main.nf | 2 +- modules/cooler/dump/main.nf | 2 +- modules/cooler/merge/main.nf | 2 +- modules/cooler/zoomify/main.nf | 2 +- modules/csvtk/split/main.nf | 2 +- modules/cutadapt/main.nf | 2 +- modules/dastool/dastool/main.nf | 2 +- modules/dastool/scaffolds2bin/main.nf | 2 +- modules/deeptools/computematrix/main.nf | 2 +- modules/deeptools/plotfingerprint/main.nf | 2 +- modules/deeptools/plotheatmap/main.nf | 2 +- modules/deeptools/plotprofile/main.nf | 2 +- modules/delly/call/main.nf | 2 +- modules/diamond/blastp/main.nf | 2 +- modules/diamond/blastx/main.nf | 2 +- modules/dshbio/exportsegments/main.nf | 2 +- modules/dshbio/filterbed/main.nf | 2 +- modules/dshbio/filtergff3/main.nf | 2 +- modules/dshbio/splitbed/main.nf | 2 +- modules/dshbio/splitgff3/main.nf | 2 +- modules/ectyper/main.nf | 2 +- modules/emmtyper/main.nf | 2 +- modules/ensemblvep/main.nf | 2 +- modules/expansionhunter/main.nf | 2 +- modules/fastani/main.nf | 2 +- modules/fastp/main.nf | 2 +- modules/fastqc/main.nf | 2 +- modules/fastqscan/main.nf | 2 +- modules/fgbio/callmolecularconsensusreads/main.nf | 2 +- modules/fgbio/fastqtobam/main.nf | 2 +- modules/fgbio/groupreadsbyumi/main.nf | 2 +- modules/fgbio/sortbam/main.nf | 2 +- modules/filtlong/main.nf | 2 +- modules/flash/main.nf | 2 +- modules/freebayes/main.nf | 2 +- modules/gatk4/applybqsr/main.nf | 2 +- modules/gatk4/baserecalibrator/main.nf | 2 +- modules/gatk4/bedtointervallist/main.nf | 2 +- modules/gatk4/calculatecontamination/main.nf | 2 +- modules/gatk4/createsomaticpanelofnormals/main.nf | 2 +- modules/gatk4/estimatelibrarycomplexity/main.nf | 2 +- modules/gatk4/fastqtosam/main.nf | 2 +- modules/gatk4/filtermutectcalls/main.nf | 2 +- modules/gatk4/genotypegvcfs/main.nf | 2 +- modules/gatk4/getpileupsummaries/main.nf | 2 +- modules/gatk4/haplotypecaller/main.nf | 2 +- modules/gatk4/intervallisttools/main.nf | 2 +- modules/gatk4/learnreadorientationmodel/main.nf | 2 +- modules/gatk4/markduplicates/main.nf | 2 +- modules/gatk4/mergebamalignment/main.nf | 2 +- modules/gatk4/mergevcfs/main.nf | 2 +- modules/gatk4/mutect2/main.nf | 2 +- modules/gatk4/revertsam/main.nf | 2 +- modules/gatk4/samtofastq/main.nf | 2 +- modules/gatk4/splitncigarreads/main.nf | 2 +- modules/gatk4/variantfiltration/main.nf | 2 +- modules/genrich/main.nf | 2 +- modules/glnexus/main.nf | 2 +- modules/graphmap2/align/main.nf | 2 +- modules/gstama/collapse/main.nf | 2 +- modules/gstama/merge/main.nf | 2 +- modules/gunc/run/main.nf | 2 +- modules/hicap/main.nf | 2 +- modules/hifiasm/main.nf | 2 +- modules/hisat2/align/main.nf | 2 +- modules/hmmcopy/readcounter/main.nf | 2 +- modules/hmmer/hmmalign/main.nf | 2 +- modules/homer/annotatepeaks/main.nf | 2 +- modules/homer/findpeaks/main.nf | 2 +- modules/homer/maketagdirectory/main.nf | 2 +- modules/homer/makeucscfile/main.nf | 2 +- modules/imputeme/vcftoprs/main.nf | 2 +- modules/ismapper/main.nf | 2 +- modules/isoseq3/cluster/main.nf | 2 +- modules/isoseq3/refine/main.nf | 2 +- modules/ivar/consensus/main.nf | 2 +- modules/ivar/trim/main.nf | 2 +- modules/ivar/variants/main.nf | 2 +- modules/jupyternotebook/main.nf | 2 +- modules/kallistobustools/count/main.nf | 2 +- modules/kleborate/main.nf | 2 +- modules/kraken2/kraken2/main.nf | 2 +- modules/last/dotplot/main.nf | 2 +- modules/last/lastal/main.nf | 2 +- modules/last/lastdb/main.nf | 2 +- modules/last/mafconvert/main.nf | 2 +- modules/last/mafswap/main.nf | 2 +- modules/last/postmask/main.nf | 2 +- modules/last/split/main.nf | 2 +- modules/last/train/main.nf | 2 +- modules/lima/main.nf | 2 +- modules/lissero/main.nf | 2 +- modules/lofreq/call/main.nf | 2 +- modules/lofreq/callparallel/main.nf | 2 +- modules/lofreq/filter/main.nf | 2 +- modules/lofreq/indelqual/main.nf | 2 +- modules/macs2/callpeak/main.nf | 2 +- modules/manta/germline/main.nf | 2 +- modules/manta/somatic/main.nf | 2 +- modules/manta/tumoronly/main.nf | 2 +- modules/mapdamage2/main.nf | 2 +- modules/mash/sketch/main.nf | 2 +- modules/mashtree/main.nf | 2 +- modules/maxbin2/main.nf | 2 +- modules/medaka/main.nf | 2 +- modules/megahit/main.nf | 2 +- modules/meningotype/main.nf | 2 +- modules/metabat2/jgisummarizebamcontigdepths/main.nf | 2 +- modules/metabat2/metabat2/main.nf | 2 +- modules/metaphlan3/main.nf | 2 +- modules/methyldackel/mbias/main.nf | 2 +- modules/minia/main.nf | 2 +- modules/miniasm/main.nf | 2 +- modules/minimap2/align/main.nf | 2 +- modules/mlst/main.nf | 2 +- modules/mosdepth/main.nf | 2 +- modules/msisensor/scan/main.nf | 2 +- modules/mtnucratio/main.nf | 2 +- modules/mummer/main.nf | 2 +- modules/muscle/main.nf | 2 +- modules/nanolyse/main.nf | 2 +- modules/ncbigenomedownload/main.nf | 2 +- modules/ngmaster/main.nf | 2 +- modules/nucmer/main.nf | 2 +- modules/pairtools/dedup/main.nf | 2 +- modules/pairtools/flip/main.nf | 2 +- modules/pairtools/parse/main.nf | 2 +- modules/pairtools/restrict/main.nf | 2 +- modules/pairtools/select/main.nf | 2 +- modules/pairtools/sort/main.nf | 2 +- modules/pangolin/main.nf | 2 +- modules/paraclu/main.nf | 2 +- modules/pbbam/pbmerge/main.nf | 2 +- modules/pbccs/main.nf | 2 +- modules/peddy/main.nf | 2 +- modules/phantompeakqualtools/main.nf | 2 +- modules/phyloflash/main.nf | 4 ++-- modules/picard/collecthsmetrics/main.nf | 2 +- modules/picard/collectmultiplemetrics/main.nf | 2 +- modules/picard/collectwgsmetrics/main.nf | 2 +- modules/picard/filtersamreads/main.nf | 2 +- modules/picard/markduplicates/main.nf | 2 +- modules/picard/mergesamfiles/main.nf | 2 +- modules/picard/sortsam/main.nf | 2 +- modules/pirate/main.nf | 2 +- modules/plink/extract/main.nf | 2 +- modules/plink/vcf/main.nf | 2 +- modules/plink2/vcf/main.nf | 2 +- modules/pmdtools/filter/main.nf | 2 +- modules/porechop/main.nf | 2 +- modules/preseq/lcextrap/main.nf | 2 +- modules/pydamage/analyze/main.nf | 2 +- modules/pydamage/filter/main.nf | 2 +- modules/qcat/main.nf | 2 +- modules/racon/main.nf | 2 +- modules/rasusa/main.nf | 2 +- modules/rmarkdownnotebook/main.nf | 2 +- modules/roary/main.nf | 2 +- modules/rseqc/bamstat/main.nf | 2 +- modules/rseqc/inferexperiment/main.nf | 2 +- modules/rseqc/innerdistance/main.nf | 2 +- modules/rseqc/junctionannotation/main.nf | 2 +- modules/rseqc/junctionsaturation/main.nf | 2 +- modules/rseqc/readdistribution/main.nf | 2 +- modules/rseqc/readduplication/main.nf | 2 +- modules/samblaster/main.nf | 2 +- modules/samtools/ampliconclip/main.nf | 2 +- modules/samtools/bam2fq/main.nf | 2 +- modules/samtools/depth/main.nf | 2 +- modules/samtools/fastq/main.nf | 2 +- modules/samtools/fixmate/main.nf | 2 +- modules/samtools/mpileup/main.nf | 2 +- modules/samtools/sort/main.nf | 2 +- modules/samtools/view/main.nf | 2 +- modules/scoary/main.nf | 2 +- modules/seacr/callpeak/main.nf | 2 +- modules/seqsero2/main.nf | 2 +- modules/seqtk/mergepe/main.nf | 2 +- modules/seqtk/sample/main.nf | 2 +- modules/sequenzautils/bam2seqz/main.nf | 2 +- modules/sequenzautils/gcwiggle/main.nf | 2 +- modules/seqwish/induce/main.nf | 2 +- modules/snpdists/main.nf | 2 +- modules/snpeff/main.nf | 2 +- modules/sortmerna/main.nf | 2 +- modules/spades/main.nf | 2 +- modules/spatyper/main.nf | 2 +- modules/staphopiasccmec/main.nf | 2 +- modules/star/align/main.nf | 2 +- modules/strelka/germline/main.nf | 2 +- modules/strelka/somatic/main.nf | 2 +- modules/stringtie/stringtie/main.nf | 2 +- modules/subread/featurecounts/main.nf | 2 +- modules/tabix/bgzip/main.nf | 2 +- modules/tabix/bgziptabix/main.nf | 2 +- modules/tiddit/cov/main.nf | 2 +- modules/tiddit/sv/main.nf | 2 +- modules/trimgalore/main.nf | 2 +- modules/ucsc/bed12tobigbed/main.nf | 2 +- modules/ucsc/bedclip/main.nf | 2 +- modules/ucsc/bedgraphtobigwig/main.nf | 2 +- modules/ucsc/bigwigaverageoverbed/main.nf | 2 +- modules/ucsc/liftover/main.nf | 2 +- modules/ultra/pipeline/main.nf | 2 +- modules/umitools/dedup/main.nf | 2 +- modules/umitools/extract/main.nf | 2 +- modules/unicycler/main.nf | 2 +- modules/variantbam/main.nf | 2 +- modules/vcftools/main.nf | 2 +- modules/yara/mapper/main.nf | 2 +- tests/modules/bbmap/bbduk/nextflow.config | 2 +- tests/modules/bcftools/reheader/nextflow.config | 2 +- tests/modules/bedtools/complement/nextflow.config | 2 +- tests/modules/bedtools/genomecov/nextflow.config | 2 +- tests/modules/bedtools/intersect/nextflow.config | 2 +- tests/modules/bedtools/merge/nextflow.config | 2 +- tests/modules/bedtools/slop/nextflow.config | 2 +- tests/modules/bedtools/sort/nextflow.config | 2 +- tests/modules/diamond/blastp/nextflow.config | 2 +- tests/modules/diamond/blastx/nextflow.config | 2 +- tests/modules/dshbio/filterbed/nextflow.config | 2 +- tests/modules/dshbio/filtergff3/nextflow.config | 2 +- tests/modules/dshbio/splitbed/nextflow.config | 2 +- tests/modules/dshbio/splitgff3/nextflow.config | 2 +- .../modules/fgbio/callmolecularconsensusreads/nextflow.config | 4 ++-- .../modules/gatk4/createsomaticpanelofnormals/nextflow.config | 2 +- tests/modules/gatk4/filtermutectcalls/nextflow.config | 2 +- tests/modules/gatk4/genotypegvcfs/nextflow.config | 2 +- tests/modules/gatk4/learnreadorientationmodel/nextflow.config | 2 +- tests/modules/gatk4/variantfiltration/nextflow.config | 2 +- tests/modules/gffread/nextflow.config | 2 +- tests/modules/gstama/collapse/nextflow.config | 2 +- tests/modules/gstama/merge/nextflow.config | 2 +- tests/modules/isoseq3/refine/nextflow.config | 2 +- tests/modules/last/postmask/nextflow.config | 2 +- tests/modules/last/split/nextflow.config | 2 +- tests/modules/lima/nextflow.config | 2 +- tests/modules/lofreq/indelqual/nextflow.config | 2 +- tests/modules/medaka/nextflow.config | 2 +- tests/modules/metaphlan3/nextflow.config | 2 +- tests/modules/miniasm/nextflow.config | 2 +- tests/modules/nanolyse/nextflow.config | 2 +- tests/modules/pairtools/dedup/nextflow.config | 2 +- tests/modules/pairtools/parse/nextflow.config | 2 +- tests/modules/pairtools/restrict/nextflow.config | 2 +- tests/modules/pairtools/sort/nextflow.config | 2 +- tests/modules/pbbam/pbmerge/nextflow.config | 2 +- tests/modules/picard/filtersamreads/nextflow.config | 4 ++-- tests/modules/picard/sortsam/nextflow.config | 2 +- tests/modules/plink/extract/nextflow.config | 2 +- tests/modules/porechop/nextflow.config | 2 +- tests/modules/rasusa/nextflow.config | 2 +- tests/modules/samblaster/nextflow.config | 2 +- tests/modules/samtools/merge/nextflow.config | 2 +- tests/modules/samtools/sort/nextflow.config | 2 +- tests/modules/seqtk/mergepe/nextflow.config | 2 +- tests/modules/seqtk/sample/nextflow.config | 2 +- tests/modules/seqtk/subseq/nextflow.config | 2 +- tests/modules/ucsc/bedclip/nextflow.config | 2 +- tests/modules/ultra/pipeline/nextflow.config | 2 +- 309 files changed, 312 insertions(+), 312 deletions(-) diff --git a/modules/abacas/main.nf b/modules/abacas/main.nf index 7fe71e3a..49040214 100644 --- a/modules/abacas/main.nf +++ b/modules/abacas/main.nf @@ -17,7 +17,7 @@ process ABACAS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ abacas.pl \\ -r $fasta \\ diff --git a/modules/adapterremoval/main.nf b/modules/adapterremoval/main.nf index 33955ed2..0cf257ff 100644 --- a/modules/adapterremoval/main.nf +++ b/modules/adapterremoval/main.nf @@ -17,7 +17,7 @@ process ADAPTERREMOVAL { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ diff --git a/modules/agrvate/main.nf b/modules/agrvate/main.nf index 06392e16..aff72abc 100644 --- a/modules/agrvate/main.nf +++ b/modules/agrvate/main.nf @@ -17,7 +17,7 @@ process AGRVATE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ agrvate \\ $args \\ diff --git a/modules/allelecounter/main.nf b/modules/allelecounter/main.nf index 5cbc4cbd..850a018f 100644 --- a/modules/allelecounter/main.nf +++ b/modules/allelecounter/main.nf @@ -18,7 +18,7 @@ process ALLELECOUNTER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def reference_options = fasta ? "-r $fasta": "" """ diff --git a/modules/arriba/main.nf b/modules/arriba/main.nf index 459ff100..0fcb6ba7 100644 --- a/modules/arriba/main.nf +++ b/modules/arriba/main.nf @@ -19,7 +19,7 @@ process ARRIBA { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def blacklist = (args.contains('-b')) ? '' : '-f blacklist' """ arriba \\ diff --git a/modules/artic/guppyplex/main.nf b/modules/artic/guppyplex/main.nf index a69e5381..780f5111 100644 --- a/modules/artic/guppyplex/main.nf +++ b/modules/artic/guppyplex/main.nf @@ -16,7 +16,7 @@ process ARTIC_GUPPYPLEX { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ artic \\ guppyplex \\ diff --git a/modules/assemblyscan/main.nf b/modules/assemblyscan/main.nf index 7b5b752b..56541222 100644 --- a/modules/assemblyscan/main.nf +++ b/modules/assemblyscan/main.nf @@ -16,7 +16,7 @@ process ASSEMBLYSCAN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ assembly-scan $assembly > ${prefix}.json diff --git a/modules/ataqv/ataqv/main.nf b/modules/ataqv/ataqv/main.nf index 39602d30..20525e85 100644 --- a/modules/ataqv/ataqv/main.nf +++ b/modules/ataqv/ataqv/main.nf @@ -21,7 +21,7 @@ process ATAQV_ATAQV { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def peak = peak_file ? "--peak-file $peak_file" : '' def tss = tss_file ? "--tss-file $tss_file" : '' def excl_regs = excl_regs_file ? "--excluded-region-file $excl_regs_file" : '' diff --git a/modules/bamaligncleaner/main.nf b/modules/bamaligncleaner/main.nf index f1481c39..88fe21aa 100644 --- a/modules/bamaligncleaner/main.nf +++ b/modules/bamaligncleaner/main.nf @@ -16,7 +16,7 @@ process BAMALIGNCLEANER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bamAlignCleaner \\ diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 676aab6f..8d5e5690 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -16,7 +16,7 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bamtools \\ split \\ diff --git a/modules/bamutil/trimbam/main.nf b/modules/bamutil/trimbam/main.nf index a210fe5f..9ceb2b65 100644 --- a/modules/bamutil/trimbam/main.nf +++ b/modules/bamutil/trimbam/main.nf @@ -16,7 +16,7 @@ process BAMUTIL_TRIMBAM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bam \\ trimBam \\ diff --git a/modules/bandage/image/main.nf b/modules/bandage/image/main.nf index e31566d1..bc2a9495 100644 --- a/modules/bandage/image/main.nf +++ b/modules/bandage/image/main.nf @@ -17,7 +17,7 @@ process BANDAGE_IMAGE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ Bandage image $gfa ${prefix}.png $args Bandage image $gfa ${prefix}.svg $args diff --git a/modules/bbmap/align/main.nf b/modules/bbmap/align/main.nf index ef23fada..ac839497 100644 --- a/modules/bbmap/align/main.nf +++ b/modules/bbmap/align/main.nf @@ -18,7 +18,7 @@ process BBMAP_ALIGN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" input = meta.single_end ? "in=${fastq}" : "in=${fastq[0]} in2=${fastq[1]}" diff --git a/modules/bbmap/bbduk/main.nf b/modules/bbmap/bbduk/main.nf index 98a21eab..79c3c306 100644 --- a/modules/bbmap/bbduk/main.nf +++ b/modules/bbmap/bbduk/main.nf @@ -18,7 +18,7 @@ process BBMAP_BBDUK { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def raw = meta.single_end ? "in=${reads[0]}" : "in1=${reads[0]} in2=${reads[1]}" def trimmed = meta.single_end ? "out=${prefix}.fastq.gz" : "out1=${prefix}_1.fastq.gz out2=${prefix}_2.fastq.gz" def contaminants_fa = contaminants ? "ref=$contaminants" : '' diff --git a/modules/bbmap/bbsplit/main.nf b/modules/bbmap/bbsplit/main.nf index 53f6b1aa..0c916dfe 100644 --- a/modules/bbmap/bbsplit/main.nf +++ b/modules/bbmap/bbsplit/main.nf @@ -22,7 +22,7 @@ process BBMAP_BBSPLIT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def avail_mem = 3 if (!task.memory) { diff --git a/modules/bcftools/consensus/main.nf b/modules/bcftools/consensus/main.nf index 9b9384a6..4633790e 100644 --- a/modules/bcftools/consensus/main.nf +++ b/modules/bcftools/consensus/main.nf @@ -16,7 +16,7 @@ process BCFTOOLS_CONSENSUS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ cat $fasta | bcftools consensus $vcf $args > ${prefix}.fa header=\$(head -n 1 ${prefix}.fa | sed 's/>//g') diff --git a/modules/bcftools/filter/main.nf b/modules/bcftools/filter/main.nf index 87ad3183..95e0249a 100644 --- a/modules/bcftools/filter/main.nf +++ b/modules/bcftools/filter/main.nf @@ -16,7 +16,7 @@ process BCFTOOLS_FILTER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bcftools filter \\ --output ${prefix}.vcf.gz \\ diff --git a/modules/bcftools/index/main.nf b/modules/bcftools/index/main.nf index 8f40c683..0cdebf31 100644 --- a/modules/bcftools/index/main.nf +++ b/modules/bcftools/index/main.nf @@ -17,7 +17,7 @@ process BCFTOOLS_INDEX { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bcftools \\ diff --git a/modules/bcftools/mpileup/main.nf b/modules/bcftools/mpileup/main.nf index 9d91193c..8a209a66 100644 --- a/modules/bcftools/mpileup/main.nf +++ b/modules/bcftools/mpileup/main.nf @@ -21,7 +21,7 @@ process BCFTOOLS_MPILEUP { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def args3 = task.ext.args3 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ echo "${meta.id}" > sample_name.list diff --git a/modules/bcftools/norm/main.nf b/modules/bcftools/norm/main.nf index 79ab36e0..95da56db 100644 --- a/modules/bcftools/norm/main.nf +++ b/modules/bcftools/norm/main.nf @@ -17,7 +17,7 @@ process BCFTOOLS_NORM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bcftools norm \\ --fasta-ref ${fasta} \\ diff --git a/modules/bcftools/query/main.nf b/modules/bcftools/query/main.nf index 1919fa76..d1098f99 100644 --- a/modules/bcftools/query/main.nf +++ b/modules/bcftools/query/main.nf @@ -19,7 +19,7 @@ process BCFTOOLS_QUERY { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def regions_file = regions ? "--regions-file ${regions}" : "" def targets_file = targets ? "--targets-file ${targets}" : "" def samples_file = samples ? "--samples-file ${samples}" : "" diff --git a/modules/bcftools/reheader/main.nf b/modules/bcftools/reheader/main.nf index 3cbe2d8f..018431a9 100644 --- a/modules/bcftools/reheader/main.nf +++ b/modules/bcftools/reheader/main.nf @@ -18,7 +18,7 @@ process BCFTOOLS_REHEADER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def update_sequences = fai ? "-f $fai" : "" def new_header = header ? "-h $header" : "" """ diff --git a/modules/bcftools/stats/main.nf b/modules/bcftools/stats/main.nf index c66f4453..67e8dca7 100644 --- a/modules/bcftools/stats/main.nf +++ b/modules/bcftools/stats/main.nf @@ -16,7 +16,7 @@ process BCFTOOLS_STATS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bcftools stats $args $vcf > ${prefix}.bcftools_stats.txt cat <<-END_VERSIONS > versions.yml diff --git a/modules/bcftools/view/main.nf b/modules/bcftools/view/main.nf index b2cbb580..f37c1ab9 100644 --- a/modules/bcftools/view/main.nf +++ b/modules/bcftools/view/main.nf @@ -19,7 +19,7 @@ process BCFTOOLS_VIEW { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def regions_file = regions ? "--regions-file ${regions}" : "" def targets_file = targets ? "--targets-file ${targets}" : "" def samples_file = samples ? "--samples-file ${samples}" : "" diff --git a/modules/bedtools/bamtobed/main.nf b/modules/bedtools/bamtobed/main.nf index aebf7339..98d9ea2f 100644 --- a/modules/bedtools/bamtobed/main.nf +++ b/modules/bedtools/bamtobed/main.nf @@ -16,7 +16,7 @@ process BEDTOOLS_BAMTOBED { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedtools \\ bamtobed \\ diff --git a/modules/bedtools/complement/main.nf b/modules/bedtools/complement/main.nf index df44b5bc..3146827c 100644 --- a/modules/bedtools/complement/main.nf +++ b/modules/bedtools/complement/main.nf @@ -17,7 +17,7 @@ process BEDTOOLS_COMPLEMENT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedtools \\ complement \\ diff --git a/modules/bedtools/genomecov/main.nf b/modules/bedtools/genomecov/main.nf index e2a74ed3..ca491e75 100644 --- a/modules/bedtools/genomecov/main.nf +++ b/modules/bedtools/genomecov/main.nf @@ -24,7 +24,7 @@ process BEDTOOLS_GENOMECOV { args += " -bg" } - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (intervals.name =~ /\.bam/) { """ bedtools \\ diff --git a/modules/bedtools/intersect/main.nf b/modules/bedtools/intersect/main.nf index e01c78ac..afb0d056 100644 --- a/modules/bedtools/intersect/main.nf +++ b/modules/bedtools/intersect/main.nf @@ -17,7 +17,7 @@ process BEDTOOLS_INTERSECT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedtools \\ intersect \\ diff --git a/modules/bedtools/makewindows/main.nf b/modules/bedtools/makewindows/main.nf index cb7d6561..2414393c 100644 --- a/modules/bedtools/makewindows/main.nf +++ b/modules/bedtools/makewindows/main.nf @@ -17,7 +17,7 @@ process BEDTOOLS_MAKEWINDOWS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def arg_input = use_bed ? "-b $regions" : "-g $regions" """ bedtools \\ diff --git a/modules/bedtools/maskfasta/main.nf b/modules/bedtools/maskfasta/main.nf index 77be060c..7eeb4c7d 100644 --- a/modules/bedtools/maskfasta/main.nf +++ b/modules/bedtools/maskfasta/main.nf @@ -17,7 +17,7 @@ process BEDTOOLS_MASKFASTA { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedtools \\ maskfasta \\ diff --git a/modules/bedtools/merge/main.nf b/modules/bedtools/merge/main.nf index 907f1c9b..5f1da95b 100644 --- a/modules/bedtools/merge/main.nf +++ b/modules/bedtools/merge/main.nf @@ -16,7 +16,7 @@ process BEDTOOLS_MERGE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedtools \\ merge \\ diff --git a/modules/bedtools/slop/main.nf b/modules/bedtools/slop/main.nf index e5d92850..9d8633ec 100644 --- a/modules/bedtools/slop/main.nf +++ b/modules/bedtools/slop/main.nf @@ -17,7 +17,7 @@ process BEDTOOLS_SLOP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedtools \\ slop \\ diff --git a/modules/bedtools/sort/main.nf b/modules/bedtools/sort/main.nf index 15e69036..1ed95a57 100644 --- a/modules/bedtools/sort/main.nf +++ b/modules/bedtools/sort/main.nf @@ -17,7 +17,7 @@ process BEDTOOLS_SORT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedtools \\ sort \\ diff --git a/modules/bedtools/subtract/main.nf b/modules/bedtools/subtract/main.nf index e645109d..b2efefe5 100644 --- a/modules/bedtools/subtract/main.nf +++ b/modules/bedtools/subtract/main.nf @@ -16,7 +16,7 @@ process BEDTOOLS_SUBTRACT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedtools \\ subtract \\ diff --git a/modules/bismark/align/main.nf b/modules/bismark/align/main.nf index 95e7cdfc..e490b48c 100644 --- a/modules/bismark/align/main.nf +++ b/modules/bismark/align/main.nf @@ -19,7 +19,7 @@ process BISMARK_ALIGN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def fastq = meta.single_end ? reads : "-1 ${reads[0]} -2 ${reads[1]}" """ bismark \\ diff --git a/modules/bismark/deduplicate/main.nf b/modules/bismark/deduplicate/main.nf index c95c54d1..16c624f1 100644 --- a/modules/bismark/deduplicate/main.nf +++ b/modules/bismark/deduplicate/main.nf @@ -17,7 +17,7 @@ process BISMARK_DEDUPLICATE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def seqtype = meta.single_end ? '-s' : '-p' """ deduplicate_bismark \\ diff --git a/modules/blast/blastn/main.nf b/modules/blast/blastn/main.nf index d1bdcf77..3a0bafe0 100644 --- a/modules/blast/blastn/main.nf +++ b/modules/blast/blastn/main.nf @@ -17,7 +17,7 @@ process BLAST_BLASTN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ DB=`find -L ./ -name "*.ndb" | sed 's/.ndb//'` blastn \\ diff --git a/modules/bowtie/align/main.nf b/modules/bowtie/align/main.nf index 12188269..b25b5e21 100644 --- a/modules/bowtie/align/main.nf +++ b/modules/bowtie/align/main.nf @@ -20,7 +20,7 @@ process BOWTIE_ALIGN { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def unaligned = params.save_unaligned ? "--un ${prefix}.unmapped.fastq" : '' def endedness = meta.single_end ? "$reads" : "-1 ${reads[0]} -2 ${reads[1]}" """ diff --git a/modules/bowtie2/align/main.nf b/modules/bowtie2/align/main.nf index 11c9c20a..41c8a6bf 100644 --- a/modules/bowtie2/align/main.nf +++ b/modules/bowtie2/align/main.nf @@ -20,7 +20,7 @@ process BOWTIE2_ALIGN { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { def unaligned = params.save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : '' """ diff --git a/modules/bwa/aln/main.nf b/modules/bwa/aln/main.nf index f6cdaefa..992e25de 100644 --- a/modules/bwa/aln/main.nf +++ b/modules/bwa/aln/main.nf @@ -17,7 +17,7 @@ process BWA_ALN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ diff --git a/modules/bwa/mem/main.nf b/modules/bwa/mem/main.nf index 9a04ed63..801293a8 100644 --- a/modules/bwa/mem/main.nf +++ b/modules/bwa/mem/main.nf @@ -18,7 +18,7 @@ process BWA_MEM { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def read_group = meta.read_group ? "-R ${meta.read_group}" : "" """ INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` diff --git a/modules/bwa/sampe/main.nf b/modules/bwa/sampe/main.nf index 2abd9335..0b5ec255 100644 --- a/modules/bwa/sampe/main.nf +++ b/modules/bwa/sampe/main.nf @@ -17,7 +17,7 @@ process BWA_SAMPE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def read_group = meta.read_group ? "-r ${meta.read_group}" : "" """ diff --git a/modules/bwa/samse/main.nf b/modules/bwa/samse/main.nf index 56e9127f..bee06bc8 100644 --- a/modules/bwa/samse/main.nf +++ b/modules/bwa/samse/main.nf @@ -17,7 +17,7 @@ process BWA_SAMSE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def read_group = meta.read_group ? "-r ${meta.read_group}" : "" """ diff --git a/modules/bwamem2/mem/main.nf b/modules/bwamem2/mem/main.nf index 7c238741..81b4b8ab 100644 --- a/modules/bwamem2/mem/main.nf +++ b/modules/bwamem2/mem/main.nf @@ -18,7 +18,7 @@ process BWAMEM2_MEM { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def read_group = meta.read_group ? "-R ${meta.read_group}" : "" """ INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` diff --git a/modules/bwameth/align/main.nf b/modules/bwameth/align/main.nf index 06e9da44..0bcd9bac 100644 --- a/modules/bwameth/align/main.nf +++ b/modules/bwameth/align/main.nf @@ -18,7 +18,7 @@ process BWAMETH_ALIGN { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def read_group = meta.read_group ? "-R ${meta.read_group}" : "" """ INDEX=`find -L ${index} -name "*.bwameth.c2t" | sed 's/.bwameth.c2t//'` diff --git a/modules/cat/fastq/main.nf b/modules/cat/fastq/main.nf index b6be93b0..c5ece83a 100644 --- a/modules/cat/fastq/main.nf +++ b/modules/cat/fastq/main.nf @@ -16,7 +16,7 @@ process CAT_FASTQ { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def readList = reads.collect{ it.toString() } if (meta.single_end) { if (readList.size > 1) { diff --git a/modules/chromap/chromap/main.nf b/modules/chromap/chromap/main.nf index f6686cf2..4a7f0097 100644 --- a/modules/chromap/chromap/main.nf +++ b/modules/chromap/chromap/main.nf @@ -28,7 +28,7 @@ process CHROMAP_CHROMAP { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def args_list = args.tokenize() def file_extension = args.contains("--SAM") ? 'sam' : args.contains("--TagAlign")? 'tagAlign' : args.contains("--pairs")? 'pairs' : 'bed' diff --git a/modules/clonalframeml/main.nf b/modules/clonalframeml/main.nf index 60eaad12..db647a38 100644 --- a/modules/clonalframeml/main.nf +++ b/modules/clonalframeml/main.nf @@ -21,7 +21,7 @@ process CLONALFRAMEML { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ ClonalFrameML \\ $newick \\ diff --git a/modules/cmseq/polymut/main.nf b/modules/cmseq/polymut/main.nf index 18bb8c59..47e86f0c 100644 --- a/modules/cmseq/polymut/main.nf +++ b/modules/cmseq/polymut/main.nf @@ -18,7 +18,7 @@ process CMSEQ_POLYMUT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def fasta_refid = fasta ? "-c $fasta" : "" def sortindex = bai ? "" : "--sortindex" """ diff --git a/modules/cooler/cload/main.nf b/modules/cooler/cload/main.nf index ed7a41a1..d8bdc031 100644 --- a/modules/cooler/cload/main.nf +++ b/modules/cooler/cload/main.nf @@ -18,7 +18,7 @@ process COOLER_CLOAD { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def nproc = args.contains('pairix') || args.contains('tabix')? "--nproc $task.cpus" : '' """ diff --git a/modules/cooler/dump/main.nf b/modules/cooler/dump/main.nf index 0836640e..a438acc8 100644 --- a/modules/cooler/dump/main.nf +++ b/modules/cooler/dump/main.nf @@ -17,7 +17,7 @@ process COOLER_DUMP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def suffix = resolution ? "::$resolution" : "" """ cooler dump \\ diff --git a/modules/cooler/merge/main.nf b/modules/cooler/merge/main.nf index 0fed76c9..b1814b68 100644 --- a/modules/cooler/merge/main.nf +++ b/modules/cooler/merge/main.nf @@ -16,7 +16,7 @@ process COOLER_MERGE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ cooler merge \\ $args \\ diff --git a/modules/cooler/zoomify/main.nf b/modules/cooler/zoomify/main.nf index e61ca99d..226d4114 100644 --- a/modules/cooler/zoomify/main.nf +++ b/modules/cooler/zoomify/main.nf @@ -16,7 +16,7 @@ process COOLER_ZOOMIFY { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ cooler zoomify \\ $args \\ diff --git a/modules/csvtk/split/main.nf b/modules/csvtk/split/main.nf index 89b44154..52ab7ec7 100644 --- a/modules/csvtk/split/main.nf +++ b/modules/csvtk/split/main.nf @@ -18,7 +18,7 @@ process CSVTK_SPLIT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def delimiter = in_format == "tsv" ? "--tabs" : (in_format == "csv" ? "--delimiter ',' " : in_format) def out_delimiter = out_format == "tsv" ? "--out-tabs" : (out_format == "csv" ? "--out-delimiter ',' " : out_format) out_extension = out_format == "tsv" ? 'tsv' : 'csv' diff --git a/modules/cutadapt/main.nf b/modules/cutadapt/main.nf index f98113e8..89105715 100644 --- a/modules/cutadapt/main.nf +++ b/modules/cutadapt/main.nf @@ -17,7 +17,7 @@ process CUTADAPT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def trimmed = meta.single_end ? "-o ${prefix}.trim.fastq.gz" : "-o ${prefix}_1.trim.fastq.gz -p ${prefix}_2.trim.fastq.gz" """ cutadapt \\ diff --git a/modules/dastool/dastool/main.nf b/modules/dastool/dastool/main.nf index b67ee993..722f6c55 100644 --- a/modules/dastool/dastool/main.nf +++ b/modules/dastool/dastool/main.nf @@ -28,7 +28,7 @@ process DASTOOL_DASTOOL { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def bin_list = bins instanceof List ? bins.join(",") : "$bins" def engine = search_engine ? "--search_engine $search_engine" : "--search_engine diamond" def db_dir = db_directory ? "--db_directory $db_directory" : "" diff --git a/modules/dastool/scaffolds2bin/main.nf b/modules/dastool/scaffolds2bin/main.nf index 78a06b6e..09f800bb 100644 --- a/modules/dastool/scaffolds2bin/main.nf +++ b/modules/dastool/scaffolds2bin/main.nf @@ -17,7 +17,7 @@ process DASTOOL_SCAFFOLDS2BIN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def file_extension = extension ? extension : "fasta" """ diff --git a/modules/deeptools/computematrix/main.nf b/modules/deeptools/computematrix/main.nf index e39310f4..70be934b 100644 --- a/modules/deeptools/computematrix/main.nf +++ b/modules/deeptools/computematrix/main.nf @@ -18,7 +18,7 @@ process DEEPTOOLS_COMPUTEMATRIX { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ computeMatrix \\ $args \\ diff --git a/modules/deeptools/plotfingerprint/main.nf b/modules/deeptools/plotfingerprint/main.nf index aeb635ce..7925c9a9 100644 --- a/modules/deeptools/plotfingerprint/main.nf +++ b/modules/deeptools/plotfingerprint/main.nf @@ -18,7 +18,7 @@ process DEEPTOOLS_PLOTFINGERPRINT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def extend = (meta.single_end && params.fragment_size > 0) ? "--extendReads ${params.fragment_size}" : '' """ plotFingerprint \\ diff --git a/modules/deeptools/plotheatmap/main.nf b/modules/deeptools/plotheatmap/main.nf index f981744e..992c9058 100644 --- a/modules/deeptools/plotheatmap/main.nf +++ b/modules/deeptools/plotheatmap/main.nf @@ -17,7 +17,7 @@ process DEEPTOOLS_PLOTHEATMAP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ plotHeatmap \\ $args \\ diff --git a/modules/deeptools/plotprofile/main.nf b/modules/deeptools/plotprofile/main.nf index b32e04d3..60184fa6 100644 --- a/modules/deeptools/plotprofile/main.nf +++ b/modules/deeptools/plotprofile/main.nf @@ -17,7 +17,7 @@ process DEEPTOOLS_PLOTPROFILE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ plotProfile \\ $args \\ diff --git a/modules/delly/call/main.nf b/modules/delly/call/main.nf index d4aa1adb..fc04cda7 100644 --- a/modules/delly/call/main.nf +++ b/modules/delly/call/main.nf @@ -19,7 +19,7 @@ process DELLY_CALL { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ delly \\ call \\ diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index 015be864..c7342767 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -19,7 +19,7 @@ process DIAMOND_BLASTP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index f4018aa9..bd7d1dd9 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -19,7 +19,7 @@ process DIAMOND_BLASTX { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` diff --git a/modules/dshbio/exportsegments/main.nf b/modules/dshbio/exportsegments/main.nf index 7cc5da22..d506a4b6 100644 --- a/modules/dshbio/exportsegments/main.nf +++ b/modules/dshbio/exportsegments/main.nf @@ -16,7 +16,7 @@ process DSHBIO_EXPORTSEGMENTS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ dsh-bio \\ export-segments \\ diff --git a/modules/dshbio/filterbed/main.nf b/modules/dshbio/filterbed/main.nf index 065d8bec..6480f4a4 100644 --- a/modules/dshbio/filterbed/main.nf +++ b/modules/dshbio/filterbed/main.nf @@ -16,7 +16,7 @@ process DSHBIO_FILTERBED { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ dsh-bio \\ filter-bed \\ diff --git a/modules/dshbio/filtergff3/main.nf b/modules/dshbio/filtergff3/main.nf index c738c95a..a0bbf3af 100644 --- a/modules/dshbio/filtergff3/main.nf +++ b/modules/dshbio/filtergff3/main.nf @@ -16,7 +16,7 @@ process DSHBIO_FILTERGFF3 { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ dsh-bio \\ filter-gff3 \\ diff --git a/modules/dshbio/splitbed/main.nf b/modules/dshbio/splitbed/main.nf index 60b8b7a3..8dbf1104 100644 --- a/modules/dshbio/splitbed/main.nf +++ b/modules/dshbio/splitbed/main.nf @@ -16,7 +16,7 @@ process DSHBIO_SPLITBED { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ dsh-bio \\ split-bed \\ diff --git a/modules/dshbio/splitgff3/main.nf b/modules/dshbio/splitgff3/main.nf index 7ad2fd08..fc868a39 100644 --- a/modules/dshbio/splitgff3/main.nf +++ b/modules/dshbio/splitgff3/main.nf @@ -16,7 +16,7 @@ process DSHBIO_SPLITGFF3 { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ dsh-bio \\ split-gff3 \\ diff --git a/modules/ectyper/main.nf b/modules/ectyper/main.nf index 5f458eb9..0e040958 100644 --- a/modules/ectyper/main.nf +++ b/modules/ectyper/main.nf @@ -18,7 +18,7 @@ process ECTYPER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def is_compressed = fasta.getName().endsWith(".gz") ? true : false def fasta_name = fasta.getName().replace(".gz", "") """ diff --git a/modules/emmtyper/main.nf b/modules/emmtyper/main.nf index 9cf98694..70dabfb7 100644 --- a/modules/emmtyper/main.nf +++ b/modules/emmtyper/main.nf @@ -16,7 +16,7 @@ process EMMTYPER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ emmtyper \\ $args \\ diff --git a/modules/ensemblvep/main.nf b/modules/ensemblvep/main.nf index 76cd9235..3182feb2 100644 --- a/modules/ensemblvep/main.nf +++ b/modules/ensemblvep/main.nf @@ -24,7 +24,7 @@ process ENSEMBLVEP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def dir_cache = task.ext.use_cache ? "\${PWD}/${cache}" : "/.vep" """ mkdir $prefix diff --git a/modules/expansionhunter/main.nf b/modules/expansionhunter/main.nf index 2ef00d17..4db78230 100644 --- a/modules/expansionhunter/main.nf +++ b/modules/expansionhunter/main.nf @@ -18,7 +18,7 @@ process EXPANSIONHUNTER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def gender = (meta.gender == 'male' || meta.gender == 1 || meta.gender == 'XY') ? "male" : "female" """ ExpansionHunter \\ diff --git a/modules/fastani/main.nf b/modules/fastani/main.nf index 7e3721bd..cc1c4902 100644 --- a/modules/fastani/main.nf +++ b/modules/fastani/main.nf @@ -17,7 +17,7 @@ process FASTANI { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.batch_input) { """ diff --git a/modules/fastp/main.nf b/modules/fastp/main.nf index 05eb1e98..33603842 100644 --- a/modules/fastp/main.nf +++ b/modules/fastp/main.nf @@ -24,7 +24,7 @@ process FASTP { script: def args = task.ext.args ?: '' // Added soft-links to original fastqs for consistent naming in MultiQC - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { def fail_fastq = save_trimmed_fail ? "--failed_out ${prefix}.fail.fastq.gz" : '' """ diff --git a/modules/fastqc/main.nf b/modules/fastqc/main.nf index 673a00b8..d250eca0 100644 --- a/modules/fastqc/main.nf +++ b/modules/fastqc/main.nf @@ -18,7 +18,7 @@ process FASTQC { script: def args = task.ext.args ?: '' // Add soft-links to original FastQs for consistent naming in pipeline - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ [ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz diff --git a/modules/fastqscan/main.nf b/modules/fastqscan/main.nf index 768728f2..a0dcc46a 100644 --- a/modules/fastqscan/main.nf +++ b/modules/fastqscan/main.nf @@ -16,7 +16,7 @@ process FASTQSCAN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ zcat $reads | \\ fastq-scan \\ diff --git a/modules/fgbio/callmolecularconsensusreads/main.nf b/modules/fgbio/callmolecularconsensusreads/main.nf index f514b69a..3aab935b 100644 --- a/modules/fgbio/callmolecularconsensusreads/main.nf +++ b/modules/fgbio/callmolecularconsensusreads/main.nf @@ -16,7 +16,7 @@ process FGBIO_CALLMOLECULARCONSENSUSREADS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ fgbio \\ CallMolecularConsensusReads \\ diff --git a/modules/fgbio/fastqtobam/main.nf b/modules/fgbio/fastqtobam/main.nf index 40713d03..126c3dd8 100644 --- a/modules/fgbio/fastqtobam/main.nf +++ b/modules/fgbio/fastqtobam/main.nf @@ -17,7 +17,7 @@ process FGBIO_FASTQTOBAM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ mkdir tmp diff --git a/modules/fgbio/groupreadsbyumi/main.nf b/modules/fgbio/groupreadsbyumi/main.nf index b35186a5..47f000a5 100644 --- a/modules/fgbio/groupreadsbyumi/main.nf +++ b/modules/fgbio/groupreadsbyumi/main.nf @@ -18,7 +18,7 @@ process FGBIO_GROUPREADSBYUMI { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ mkdir tmp diff --git a/modules/fgbio/sortbam/main.nf b/modules/fgbio/sortbam/main.nf index c2822548..c542f3df 100644 --- a/modules/fgbio/sortbam/main.nf +++ b/modules/fgbio/sortbam/main.nf @@ -16,7 +16,7 @@ process FGBIO_SORTBAM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ fgbio \\ SortBam \\ diff --git a/modules/filtlong/main.nf b/modules/filtlong/main.nf index 10e147a6..bb1c1eb3 100644 --- a/modules/filtlong/main.nf +++ b/modules/filtlong/main.nf @@ -16,7 +16,7 @@ process FILTLONG { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def short_reads = meta.single_end ? "-1 $shortreads" : "-1 ${shortreads[0]} -2 ${shortreads[1]}" """ filtlong \\ diff --git a/modules/flash/main.nf b/modules/flash/main.nf index 23bd1892..7bc38c97 100644 --- a/modules/flash/main.nf +++ b/modules/flash/main.nf @@ -15,7 +15,7 @@ process FLASH { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ flash \\ $args \\ diff --git a/modules/freebayes/main.nf b/modules/freebayes/main.nf index b9a63d02..1dd91fef 100644 --- a/modules/freebayes/main.nf +++ b/modules/freebayes/main.nf @@ -22,7 +22,7 @@ process FREEBAYES { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def input = input_2 ? "${input_1} ${input_2}" : "${input_1}" def targets_file = targets ? "--target ${targets}" : "" def samples_file = samples ? "--samples ${samples}" : "" diff --git a/modules/gatk4/applybqsr/main.nf b/modules/gatk4/applybqsr/main.nf index f93dd574..bd428d6c 100644 --- a/modules/gatk4/applybqsr/main.nf +++ b/modules/gatk4/applybqsr/main.nf @@ -20,7 +20,7 @@ process GATK4_APPLYBQSR { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def interval = intervals ? "-L ${intervals}" : "" if (!task.memory) { log.info '[GATK ApplyBQSR] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' diff --git a/modules/gatk4/baserecalibrator/main.nf b/modules/gatk4/baserecalibrator/main.nf index b422a798..9b0bf286 100644 --- a/modules/gatk4/baserecalibrator/main.nf +++ b/modules/gatk4/baserecalibrator/main.nf @@ -22,7 +22,7 @@ process GATK4_BASERECALIBRATOR { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def intervalsCommand = intervalsBed ? "-L ${intervalsBed}" : "" def sitesCommand = knownSites.collect{"--known-sites ${it}"}.join(' ') diff --git a/modules/gatk4/bedtointervallist/main.nf b/modules/gatk4/bedtointervallist/main.nf index 77819a0f..c4538034 100644 --- a/modules/gatk4/bedtointervallist/main.nf +++ b/modules/gatk4/bedtointervallist/main.nf @@ -17,7 +17,7 @@ process GATK4_BEDTOINTERVALLIST { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ gatk BedToIntervalList \\ -I $bed \\ diff --git a/modules/gatk4/calculatecontamination/main.nf b/modules/gatk4/calculatecontamination/main.nf index 93a2ee57..7c112c3c 100644 --- a/modules/gatk4/calculatecontamination/main.nf +++ b/modules/gatk4/calculatecontamination/main.nf @@ -18,7 +18,7 @@ process GATK4_CALCULATECONTAMINATION { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def matched_command = matched ? " -matched ${matched} " : '' def segment_command = segmentout ? " -segments ${prefix}.segmentation.table" : '' """ diff --git a/modules/gatk4/createsomaticpanelofnormals/main.nf b/modules/gatk4/createsomaticpanelofnormals/main.nf index 9bc8d1d0..2860e82e 100644 --- a/modules/gatk4/createsomaticpanelofnormals/main.nf +++ b/modules/gatk4/createsomaticpanelofnormals/main.nf @@ -20,7 +20,7 @@ process GATK4_CREATESOMATICPANELOFNORMALS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ gatk \\ CreateSomaticPanelOfNormals \\ diff --git a/modules/gatk4/estimatelibrarycomplexity/main.nf b/modules/gatk4/estimatelibrarycomplexity/main.nf index b0b35e42..f636dc46 100644 --- a/modules/gatk4/estimatelibrarycomplexity/main.nf +++ b/modules/gatk4/estimatelibrarycomplexity/main.nf @@ -19,7 +19,7 @@ process GATK4_ESTIMATELIBRARYCOMPLEXITY { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def crams = cram.collect(){ x -> "-I ".concat(x.toString()) }.join(" ") def avail_mem = 3 diff --git a/modules/gatk4/fastqtosam/main.nf b/modules/gatk4/fastqtosam/main.nf index fc075735..915eb996 100644 --- a/modules/gatk4/fastqtosam/main.nf +++ b/modules/gatk4/fastqtosam/main.nf @@ -16,7 +16,7 @@ process GATK4_FASTQTOSAM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def read_files = meta.single_end ? "-F1 $reads" : "-F1 ${reads[0]} -F2 ${reads[1]}" """ gatk FastqToSam \\ diff --git a/modules/gatk4/filtermutectcalls/main.nf b/modules/gatk4/filtermutectcalls/main.nf index 7111db37..02fa804f 100644 --- a/modules/gatk4/filtermutectcalls/main.nf +++ b/modules/gatk4/filtermutectcalls/main.nf @@ -21,7 +21,7 @@ process GATK4_FILTERMUTECTCALLS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def orientationbias_options = '' if (orientationbias) { diff --git a/modules/gatk4/genotypegvcfs/main.nf b/modules/gatk4/genotypegvcfs/main.nf index ddb4a922..f0b35447 100644 --- a/modules/gatk4/genotypegvcfs/main.nf +++ b/modules/gatk4/genotypegvcfs/main.nf @@ -22,7 +22,7 @@ process GATK4_GENOTYPEGVCFS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def dbsnp_options = dbsnp ? "-D ${dbsnp}" : "" def interval_options = intervals_bed ? "-L ${intervals_bed}" : "" def gvcf_options = gvcf.name.endsWith(".vcf") || gvcf.name.endsWith(".vcf.gz") ? "$gvcf" : "gendb://$gvcf" diff --git a/modules/gatk4/getpileupsummaries/main.nf b/modules/gatk4/getpileupsummaries/main.nf index 0894e17b..99be601f 100644 --- a/modules/gatk4/getpileupsummaries/main.nf +++ b/modules/gatk4/getpileupsummaries/main.nf @@ -19,7 +19,7 @@ process GATK4_GETPILEUPSUMMARIES { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def sitesCommand = '' sitesCommand = sites ? " -L ${sites} " : " -L ${variants} " diff --git a/modules/gatk4/haplotypecaller/main.nf b/modules/gatk4/haplotypecaller/main.nf index 418a2785..e00f1e58 100644 --- a/modules/gatk4/haplotypecaller/main.nf +++ b/modules/gatk4/haplotypecaller/main.nf @@ -23,7 +23,7 @@ process GATK4_HAPLOTYPECALLER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def interval_option = interval ? "-L ${interval}" : "" def dbsnp_option = dbsnp ? "-D ${dbsnp}" : "" def avail_mem = 3 diff --git a/modules/gatk4/intervallisttools/main.nf b/modules/gatk4/intervallisttools/main.nf index 8e5b70e1..7e1a47f7 100644 --- a/modules/gatk4/intervallisttools/main.nf +++ b/modules/gatk4/intervallisttools/main.nf @@ -16,7 +16,7 @@ process GATK4_INTERVALLISTTOOLS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ mkdir ${prefix}_split diff --git a/modules/gatk4/learnreadorientationmodel/main.nf b/modules/gatk4/learnreadorientationmodel/main.nf index 5e9700e3..ac021afa 100644 --- a/modules/gatk4/learnreadorientationmodel/main.nf +++ b/modules/gatk4/learnreadorientationmodel/main.nf @@ -16,7 +16,7 @@ process GATK4_LEARNREADORIENTATIONMODEL { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def inputs_list = [] f1r2.each() { a -> inputs_list.add(" -I " + a) } """ diff --git a/modules/gatk4/markduplicates/main.nf b/modules/gatk4/markduplicates/main.nf index 9f0b46da..a109facc 100644 --- a/modules/gatk4/markduplicates/main.nf +++ b/modules/gatk4/markduplicates/main.nf @@ -18,7 +18,7 @@ process GATK4_MARKDUPLICATES { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def bam_list = bams.collect(){ bam -> "--INPUT ".concat(bam.toString()) }.join(" ") def avail_mem = 3 if (!task.memory) { diff --git a/modules/gatk4/mergebamalignment/main.nf b/modules/gatk4/mergebamalignment/main.nf index 01effb0f..5e552cb2 100644 --- a/modules/gatk4/mergebamalignment/main.nf +++ b/modules/gatk4/mergebamalignment/main.nf @@ -19,7 +19,7 @@ process GATK4_MERGEBAMALIGNMENT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ gatk MergeBamAlignment \\ ALIGNED=$aligned \\ diff --git a/modules/gatk4/mergevcfs/main.nf b/modules/gatk4/mergevcfs/main.nf index cbfc2e9d..cd1840c3 100644 --- a/modules/gatk4/mergevcfs/main.nf +++ b/modules/gatk4/mergevcfs/main.nf @@ -18,7 +18,7 @@ process GATK4_MERGEVCFS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" // Make list of VCFs to merge def input = "" diff --git a/modules/gatk4/mutect2/main.nf b/modules/gatk4/mutect2/main.nf index 662b3f0c..2cf940de 100644 --- a/modules/gatk4/mutect2/main.nf +++ b/modules/gatk4/mutect2/main.nf @@ -30,7 +30,7 @@ process GATK4_MUTECT2 { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def panels_command = '' def normals_command = '' diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index bca31a29..638b7705 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -16,7 +16,7 @@ process GATK4_REVERTSAM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ gatk RevertSam \\ I=$bam \\ diff --git a/modules/gatk4/samtofastq/main.nf b/modules/gatk4/samtofastq/main.nf index aa9a6b2d..a909f540 100644 --- a/modules/gatk4/samtofastq/main.nf +++ b/modules/gatk4/samtofastq/main.nf @@ -16,7 +16,7 @@ process GATK4_SAMTOFASTQ { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def output = meta.single_end ? "FASTQ=${prefix}.fastq.gz" : "FASTQ=${prefix}_1.fastq.gz SECOND_END_FASTQ=${prefix}_2.fastq.gz" """ gatk SamToFastq \\ diff --git a/modules/gatk4/splitncigarreads/main.nf b/modules/gatk4/splitncigarreads/main.nf index 32d36df9..65b82a35 100644 --- a/modules/gatk4/splitncigarreads/main.nf +++ b/modules/gatk4/splitncigarreads/main.nf @@ -19,7 +19,7 @@ process GATK4_SPLITNCIGARREADS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ gatk SplitNCigarReads \\ -R $fasta \\ diff --git a/modules/gatk4/variantfiltration/main.nf b/modules/gatk4/variantfiltration/main.nf index d5cc1eb3..00dc2588 100644 --- a/modules/gatk4/variantfiltration/main.nf +++ b/modules/gatk4/variantfiltration/main.nf @@ -20,7 +20,7 @@ process GATK4_VARIANTFILTRATION { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def avail_mem = 3 if (!task.memory) { log.info '[GATK HaplotypeCaller] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' diff --git a/modules/genrich/main.nf b/modules/genrich/main.nf index dfbebd3a..d9deea3c 100644 --- a/modules/genrich/main.nf +++ b/modules/genrich/main.nf @@ -26,7 +26,7 @@ process GENRICH { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def control = control_bam ? "-c $control_bam" : '' def blacklist = blacklist_bed ? "-E $blacklist_bed" : "" def pvalues = save_pvalues ? "-f ${prefix}.pvalues.bedGraph" : "" diff --git a/modules/glnexus/main.nf b/modules/glnexus/main.nf index e36729b2..b8afca22 100644 --- a/modules/glnexus/main.nf +++ b/modules/glnexus/main.nf @@ -16,7 +16,7 @@ process GLNEXUS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" // Make list of GVCFs to merge def input = gvcfs.collect { it.toString() } diff --git a/modules/graphmap2/align/main.nf b/modules/graphmap2/align/main.nf index e0f2d4cd..554e585b 100644 --- a/modules/graphmap2/align/main.nf +++ b/modules/graphmap2/align/main.nf @@ -19,7 +19,7 @@ process GRAPHMAP2_ALIGN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ graphmap2 \\ align \\ diff --git a/modules/gstama/collapse/main.nf b/modules/gstama/collapse/main.nf index d8a64113..1c06692d 100644 --- a/modules/gstama/collapse/main.nf +++ b/modules/gstama/collapse/main.nf @@ -26,7 +26,7 @@ process GSTAMA_COLLAPSE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ tama_collapse.py \\ -s $bam \\ diff --git a/modules/gstama/merge/main.nf b/modules/gstama/merge/main.nf index 4a8e829c..53ff93e4 100644 --- a/modules/gstama/merge/main.nf +++ b/modules/gstama/merge/main.nf @@ -20,7 +20,7 @@ process GSTAMA_MERGE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ tama_merge.py \\ -f $filelist \\ diff --git a/modules/gunc/run/main.nf b/modules/gunc/run/main.nf index 6ac681ad..8508c9f0 100644 --- a/modules/gunc/run/main.nf +++ b/modules/gunc/run/main.nf @@ -18,7 +18,7 @@ process GUNC_RUN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ gunc \\ run \\ diff --git a/modules/hicap/main.nf b/modules/hicap/main.nf index ed1d7797..a96343f6 100644 --- a/modules/hicap/main.nf +++ b/modules/hicap/main.nf @@ -20,7 +20,7 @@ process HICAP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def database_args = database_dir ? "--database_dir ${database_dir}" : "" def model_args = model_fp ? "--model_fp ${model_fp}" : "" def is_compressed = fasta.getName().endsWith(".gz") ? true : false diff --git a/modules/hifiasm/main.nf b/modules/hifiasm/main.nf index 7fc857f1..208554d6 100644 --- a/modules/hifiasm/main.nf +++ b/modules/hifiasm/main.nf @@ -27,7 +27,7 @@ process HIFIASM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (use_parental_kmers) { """ hifiasm \\ diff --git a/modules/hisat2/align/main.nf b/modules/hisat2/align/main.nf index 0c5f4134..ae888616 100644 --- a/modules/hisat2/align/main.nf +++ b/modules/hisat2/align/main.nf @@ -22,7 +22,7 @@ process HISAT2_ALIGN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def strandedness = '' if (meta.strandedness == 'forward') { diff --git a/modules/hmmcopy/readcounter/main.nf b/modules/hmmcopy/readcounter/main.nf index 6cd776a1..6399b1a2 100644 --- a/modules/hmmcopy/readcounter/main.nf +++ b/modules/hmmcopy/readcounter/main.nf @@ -18,7 +18,7 @@ process HMMCOPY_READCOUNTER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ readCounter \\ $args \\ diff --git a/modules/hmmer/hmmalign/main.nf b/modules/hmmer/hmmalign/main.nf index a25871e8..e6d04044 100644 --- a/modules/hmmer/hmmalign/main.nf +++ b/modules/hmmer/hmmalign/main.nf @@ -17,7 +17,7 @@ process HMMER_HMMALIGN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def fastacmd = fasta.getExtension() == 'gz' ? "gunzip -c $fasta" : "cat $fasta" """ $fastacmd | \\ diff --git a/modules/homer/annotatepeaks/main.nf b/modules/homer/annotatepeaks/main.nf index 321dbc7c..84e0241a 100644 --- a/modules/homer/annotatepeaks/main.nf +++ b/modules/homer/annotatepeaks/main.nf @@ -20,7 +20,7 @@ process HOMER_ANNOTATEPEAKS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ annotatePeaks.pl \\ $peak \\ diff --git a/modules/homer/findpeaks/main.nf b/modules/homer/findpeaks/main.nf index a39fe753..66de06b6 100644 --- a/modules/homer/findpeaks/main.nf +++ b/modules/homer/findpeaks/main.nf @@ -18,7 +18,7 @@ process HOMER_FINDPEAKS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ findPeaks \\ diff --git a/modules/homer/maketagdirectory/main.nf b/modules/homer/maketagdirectory/main.nf index 44490d50..72e2091f 100644 --- a/modules/homer/maketagdirectory/main.nf +++ b/modules/homer/maketagdirectory/main.nf @@ -19,7 +19,7 @@ process HOMER_MAKETAGDIRECTORY { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ makeTagDirectory \\ tag_dir \\ diff --git a/modules/homer/makeucscfile/main.nf b/modules/homer/makeucscfile/main.nf index 8a0e3f37..17e86947 100644 --- a/modules/homer/makeucscfile/main.nf +++ b/modules/homer/makeucscfile/main.nf @@ -18,7 +18,7 @@ process HOMER_MAKEUCSCFILE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ makeUCSCfile \\ $tagDir \\ diff --git a/modules/imputeme/vcftoprs/main.nf b/modules/imputeme/vcftoprs/main.nf index 0c8c1952..5fee90c2 100644 --- a/modules/imputeme/vcftoprs/main.nf +++ b/modules/imputeme/vcftoprs/main.nf @@ -16,7 +16,7 @@ process IMPUTEME_VCFTOPRS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ #!/usr/bin/env Rscript diff --git a/modules/ismapper/main.nf b/modules/ismapper/main.nf index 4a33261b..a51cc01e 100644 --- a/modules/ismapper/main.nf +++ b/modules/ismapper/main.nf @@ -16,7 +16,7 @@ process ISMAPPER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ ismap \\ $args \\ diff --git a/modules/isoseq3/cluster/main.nf b/modules/isoseq3/cluster/main.nf index 27d5c3d8..fdd47971 100644 --- a/modules/isoseq3/cluster/main.nf +++ b/modules/isoseq3/cluster/main.nf @@ -26,7 +26,7 @@ process ISOSEQ3_CLUSTER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ isoseq3 \\ cluster \\ diff --git a/modules/isoseq3/refine/main.nf b/modules/isoseq3/refine/main.nf index 5bde2f8f..5044cba2 100644 --- a/modules/isoseq3/refine/main.nf +++ b/modules/isoseq3/refine/main.nf @@ -21,7 +21,7 @@ process ISOSEQ3_REFINE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ isoseq3 \\ refine \\ diff --git a/modules/ivar/consensus/main.nf b/modules/ivar/consensus/main.nf index 4a657756..58d97c8c 100644 --- a/modules/ivar/consensus/main.nf +++ b/modules/ivar/consensus/main.nf @@ -20,7 +20,7 @@ process IVAR_CONSENSUS { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : "" """ samtools mpileup \\ diff --git a/modules/ivar/trim/main.nf b/modules/ivar/trim/main.nf index 35798123..4d0c70a2 100644 --- a/modules/ivar/trim/main.nf +++ b/modules/ivar/trim/main.nf @@ -18,7 +18,7 @@ process IVAR_TRIM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ ivar trim \\ $args \\ diff --git a/modules/ivar/variants/main.nf b/modules/ivar/variants/main.nf index ba791307..ce4abd4d 100644 --- a/modules/ivar/variants/main.nf +++ b/modules/ivar/variants/main.nf @@ -20,7 +20,7 @@ process IVAR_VARIANTS { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : "" def features = params.gff ? "-g $gff" : "" """ diff --git a/modules/jupyternotebook/main.nf b/modules/jupyternotebook/main.nf index 02f1947f..e4bdf98b 100644 --- a/modules/jupyternotebook/main.nf +++ b/modules/jupyternotebook/main.nf @@ -24,7 +24,7 @@ process JUPYTERNOTEBOOK { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def parametrize = (task.ext.parametrize == null) ? true : task.ext.parametrize def implicit_params = (task.ext.implicit_params == null) ? true : task.ext.implicit_params def meta_params = (task.ext.meta_params == null) ? true : task.ext.meta_params diff --git a/modules/kallistobustools/count/main.nf b/modules/kallistobustools/count/main.nf index 00ca8971..d67eba31 100644 --- a/modules/kallistobustools/count/main.nf +++ b/modules/kallistobustools/count/main.nf @@ -22,7 +22,7 @@ process KALLISTOBUSTOOLS_COUNT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def cdna = t1c ? "-c1 $t1c" : '' def introns = t2c ? "-c2 $t2c" : '' """ diff --git a/modules/kleborate/main.nf b/modules/kleborate/main.nf index b64a0c45..998eced1 100644 --- a/modules/kleborate/main.nf +++ b/modules/kleborate/main.nf @@ -16,7 +16,7 @@ process KLEBORATE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ kleborate \\ $args \\ diff --git a/modules/kraken2/kraken2/main.nf b/modules/kraken2/kraken2/main.nf index e5fb4b80..3c4d1caf 100644 --- a/modules/kraken2/kraken2/main.nf +++ b/modules/kraken2/kraken2/main.nf @@ -19,7 +19,7 @@ process KRAKEN2_KRAKEN2 { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def paired = meta.single_end ? "" : "--paired" def classified = meta.single_end ? "${prefix}.classified.fastq" : "${prefix}.classified#.fastq" def unclassified = meta.single_end ? "${prefix}.unclassified.fastq" : "${prefix}.unclassified#.fastq" diff --git a/modules/last/dotplot/main.nf b/modules/last/dotplot/main.nf index 51667378..e8857403 100644 --- a/modules/last/dotplot/main.nf +++ b/modules/last/dotplot/main.nf @@ -18,7 +18,7 @@ process LAST_DOTPLOT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ last-dotplot \\ $args \\ diff --git a/modules/last/lastal/main.nf b/modules/last/lastal/main.nf index 4b90a965..b5ac8bfe 100644 --- a/modules/last/lastal/main.nf +++ b/modules/last/lastal/main.nf @@ -17,7 +17,7 @@ process LAST_LASTAL { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def trained_params = param_file ? "-p ${param_file}" : '' """ INDEX_NAME=\$(basename \$(ls $index/*.des) .des) diff --git a/modules/last/lastdb/main.nf b/modules/last/lastdb/main.nf index ff6485dc..e9895c5c 100644 --- a/modules/last/lastdb/main.nf +++ b/modules/last/lastdb/main.nf @@ -16,7 +16,7 @@ process LAST_LASTDB { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ mkdir lastdb lastdb \\ diff --git a/modules/last/mafconvert/main.nf b/modules/last/mafconvert/main.nf index f1a7312e..ca60e7fe 100644 --- a/modules/last/mafconvert/main.nf +++ b/modules/last/mafconvert/main.nf @@ -25,7 +25,7 @@ process LAST_MAFCONVERT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ maf-convert $args $format $maf | gzip --no-name \\ > ${prefix}.${format}.gz diff --git a/modules/last/mafswap/main.nf b/modules/last/mafswap/main.nf index c66e47d4..0a58b027 100644 --- a/modules/last/mafswap/main.nf +++ b/modules/last/mafswap/main.nf @@ -16,7 +16,7 @@ process LAST_MAFSWAP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ maf-swap $args $maf | gzip --no-name > ${prefix}.swapped.maf.gz diff --git a/modules/last/postmask/main.nf b/modules/last/postmask/main.nf index e4f4390a..fb097a11 100644 --- a/modules/last/postmask/main.nf +++ b/modules/last/postmask/main.nf @@ -16,7 +16,7 @@ process LAST_POSTMASK { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + 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" """ last-postmask $args $maf | gzip --no-name > ${prefix}.maf.gz diff --git a/modules/last/split/main.nf b/modules/last/split/main.nf index ecc47e80..60ed135b 100644 --- a/modules/last/split/main.nf +++ b/modules/last/split/main.nf @@ -16,7 +16,7 @@ process LAST_SPLIT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ zcat < $maf | last-split $args | gzip --no-name > ${prefix}.maf.gz diff --git a/modules/last/train/main.nf b/modules/last/train/main.nf index 0a949857..471db7c1 100644 --- a/modules/last/train/main.nf +++ b/modules/last/train/main.nf @@ -17,7 +17,7 @@ process LAST_TRAIN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ INDEX_NAME=\$(basename \$(ls $index/*.des) .des) diff --git a/modules/lima/main.nf b/modules/lima/main.nf index 64f6d87d..a662a7bb 100644 --- a/modules/lima/main.nf +++ b/modules/lima/main.nf @@ -30,7 +30,7 @@ process LIMA { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ OUT_EXT="" diff --git a/modules/lissero/main.nf b/modules/lissero/main.nf index b5cd2b68..667697ef 100644 --- a/modules/lissero/main.nf +++ b/modules/lissero/main.nf @@ -16,7 +16,7 @@ process LISSERO { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ lissero \\ $args \\ diff --git a/modules/lofreq/call/main.nf b/modules/lofreq/call/main.nf index 74995152..d7fd078b 100644 --- a/modules/lofreq/call/main.nf +++ b/modules/lofreq/call/main.nf @@ -17,7 +17,7 @@ process LOFREQ_CALL { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ lofreq \\ call \\ diff --git a/modules/lofreq/callparallel/main.nf b/modules/lofreq/callparallel/main.nf index 63ae2886..764efcc5 100644 --- a/modules/lofreq/callparallel/main.nf +++ b/modules/lofreq/callparallel/main.nf @@ -18,7 +18,7 @@ process LOFREQ_CALLPARALLEL { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ lofreq \\ call-parallel \\ diff --git a/modules/lofreq/filter/main.nf b/modules/lofreq/filter/main.nf index 6f13ae44..34a5aef8 100644 --- a/modules/lofreq/filter/main.nf +++ b/modules/lofreq/filter/main.nf @@ -16,7 +16,7 @@ process LOFREQ_FILTER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ lofreq \\ filter \\ diff --git a/modules/lofreq/indelqual/main.nf b/modules/lofreq/indelqual/main.nf index bf04c5d2..5e5b8f44 100644 --- a/modules/lofreq/indelqual/main.nf +++ b/modules/lofreq/indelqual/main.nf @@ -17,7 +17,7 @@ process LOFREQ_INDELQUAL { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ lofreq indelqual \\ $args \\ diff --git a/modules/macs2/callpeak/main.nf b/modules/macs2/callpeak/main.nf index e8bfcda0..c5c88f8e 100644 --- a/modules/macs2/callpeak/main.nf +++ b/modules/macs2/callpeak/main.nf @@ -22,7 +22,7 @@ process MACS2_CALLPEAK { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def args_list = args.tokenize() def format = meta.single_end ? 'BAM' : 'BAMPE' def control = controlbam ? "--control $controlbam" : '' diff --git a/modules/manta/germline/main.nf b/modules/manta/germline/main.nf index 553f0be9..2a8c0acc 100644 --- a/modules/manta/germline/main.nf +++ b/modules/manta/germline/main.nf @@ -25,7 +25,7 @@ process MANTA_GERMLINE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def options_manta = target_bed ? "--exome --callRegions $target_bed" : "" """ configManta.py \ diff --git a/modules/manta/somatic/main.nf b/modules/manta/somatic/main.nf index 38d73133..1d62635b 100644 --- a/modules/manta/somatic/main.nf +++ b/modules/manta/somatic/main.nf @@ -27,7 +27,7 @@ process MANTA_SOMATIC { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def options_manta = target_bed ? "--exome --callRegions $target_bed" : "" """ diff --git a/modules/manta/tumoronly/main.nf b/modules/manta/tumoronly/main.nf index dc72fcc4..63f7a840 100644 --- a/modules/manta/tumoronly/main.nf +++ b/modules/manta/tumoronly/main.nf @@ -25,7 +25,7 @@ process MANTA_TUMORONLY { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def options_manta = target_bed ? "--exome --callRegions $target_bed" : "" """ configManta.py \ diff --git a/modules/mapdamage2/main.nf b/modules/mapdamage2/main.nf index 3673970e..e3668fda 100644 --- a/modules/mapdamage2/main.nf +++ b/modules/mapdamage2/main.nf @@ -34,7 +34,7 @@ process MAPDAMAGE2 { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ mapDamage \\ $args \\ diff --git a/modules/mash/sketch/main.nf b/modules/mash/sketch/main.nf index 0c0b6e17..d93641f7 100644 --- a/modules/mash/sketch/main.nf +++ b/modules/mash/sketch/main.nf @@ -16,7 +16,7 @@ process MASH_SKETCH { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ mash \\ sketch \\ diff --git a/modules/mashtree/main.nf b/modules/mashtree/main.nf index 6728e3ce..5da2f805 100644 --- a/modules/mashtree/main.nf +++ b/modules/mashtree/main.nf @@ -17,7 +17,7 @@ process MASHTREE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ mashtree \\ $args \\ diff --git a/modules/maxbin2/main.nf b/modules/maxbin2/main.nf index e13af704..4d384391 100644 --- a/modules/maxbin2/main.nf +++ b/modules/maxbin2/main.nf @@ -23,7 +23,7 @@ process MAXBIN2 { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def associate_files = reads ? "-reads $reads" : "-abund $abund" """ run_MaxBin.pl \\ diff --git a/modules/medaka/main.nf b/modules/medaka/main.nf index e7a8b9cc..761b1c34 100644 --- a/modules/medaka/main.nf +++ b/modules/medaka/main.nf @@ -16,7 +16,7 @@ process MEDAKA { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ medaka_consensus \\ -t $task.cpus \\ diff --git a/modules/megahit/main.nf b/modules/megahit/main.nf index 011fa7d3..7b511883 100644 --- a/modules/megahit/main.nf +++ b/modules/megahit/main.nf @@ -21,7 +21,7 @@ process MEGAHIT { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ megahit \\ diff --git a/modules/meningotype/main.nf b/modules/meningotype/main.nf index 5dde5633..c3b65b9d 100644 --- a/modules/meningotype/main.nf +++ b/modules/meningotype/main.nf @@ -16,7 +16,7 @@ process MENINGOTYPE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ meningotype \\ $args \\ diff --git a/modules/metabat2/jgisummarizebamcontigdepths/main.nf b/modules/metabat2/jgisummarizebamcontigdepths/main.nf index e35d6715..4a5869b6 100644 --- a/modules/metabat2/jgisummarizebamcontigdepths/main.nf +++ b/modules/metabat2/jgisummarizebamcontigdepths/main.nf @@ -16,7 +16,7 @@ process METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ export OMP_NUM_THREADS=$task.cpus diff --git a/modules/metabat2/metabat2/main.nf b/modules/metabat2/metabat2/main.nf index d158af91..2d01fdf6 100644 --- a/modules/metabat2/metabat2/main.nf +++ b/modules/metabat2/metabat2/main.nf @@ -17,7 +17,7 @@ process METABAT2_METABAT2 { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def decompress_depth = depth ? "gzip -d -f $depth" : "" def depth_file = depth ? "-a ${depth.baseName}" : "" """ diff --git a/modules/metaphlan3/main.nf b/modules/metaphlan3/main.nf index 9463da6f..64965af3 100644 --- a/modules/metaphlan3/main.nf +++ b/modules/metaphlan3/main.nf @@ -19,7 +19,7 @@ process METAPHLAN3 { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def input_type = ("$input".endsWith(".fastq.gz")) ? "--input_type fastq" : ("$input".contains(".fasta")) ? "--input_type fasta" : ("$input".endsWith(".bowtie2out.txt")) ? "--input_type bowtie2out" : "--input_type sam" def input_data = ("$input_type".contains("fastq")) && !meta.single_end ? "${input[0]},${input[1]}" : "$input" def bowtie2_out = "$input_type" == "--input_type bowtie2out" || "$input_type" == "--input_type sam" ? '' : "--bowtie2out ${prefix}.bowtie2out.txt" diff --git a/modules/methyldackel/mbias/main.nf b/modules/methyldackel/mbias/main.nf index 1b4b14c4..021f76f1 100644 --- a/modules/methyldackel/mbias/main.nf +++ b/modules/methyldackel/mbias/main.nf @@ -18,7 +18,7 @@ process METHYLDACKEL_MBIAS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ MethylDackel mbias \\ $args \\ diff --git a/modules/minia/main.nf b/modules/minia/main.nf index 8516ef6e..ceff67c5 100644 --- a/modules/minia/main.nf +++ b/modules/minia/main.nf @@ -18,7 +18,7 @@ process MINIA { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def read_list = reads.join(",") """ echo "${read_list}" | sed 's/,/\\n/g' > input_files.txt diff --git a/modules/miniasm/main.nf b/modules/miniasm/main.nf index 35c2e2c0..b0db6925 100644 --- a/modules/miniasm/main.nf +++ b/modules/miniasm/main.nf @@ -17,7 +17,7 @@ process MINIASM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ miniasm \\ $args \\ diff --git a/modules/minimap2/align/main.nf b/modules/minimap2/align/main.nf index c6c0c316..500250e9 100644 --- a/modules/minimap2/align/main.nf +++ b/modules/minimap2/align/main.nf @@ -17,7 +17,7 @@ process MINIMAP2_ALIGN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def input_reads = meta.single_end ? "$reads" : "${reads[0]} ${reads[1]}" """ minimap2 \\ diff --git a/modules/mlst/main.nf b/modules/mlst/main.nf index aa338420..b2983b82 100644 --- a/modules/mlst/main.nf +++ b/modules/mlst/main.nf @@ -16,7 +16,7 @@ process MLST { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ mlst \\ --threads $task.cpus \\ diff --git a/modules/mosdepth/main.nf b/modules/mosdepth/main.nf index b25e6a3d..d2669b7e 100644 --- a/modules/mosdepth/main.nf +++ b/modules/mosdepth/main.nf @@ -24,7 +24,7 @@ process MOSDEPTH { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def interval = window_size ? "--by ${window_size}" : "--by ${bed}" """ mosdepth \\ diff --git a/modules/msisensor/scan/main.nf b/modules/msisensor/scan/main.nf index 2419a0a1..223b4f44 100644 --- a/modules/msisensor/scan/main.nf +++ b/modules/msisensor/scan/main.nf @@ -16,7 +16,7 @@ process MSISENSOR_SCAN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ msisensor \\ scan \\ diff --git a/modules/mtnucratio/main.nf b/modules/mtnucratio/main.nf index b8663469..83d6ea2b 100644 --- a/modules/mtnucratio/main.nf +++ b/modules/mtnucratio/main.nf @@ -18,7 +18,7 @@ process MTNUCRATIO { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ mtnucratio \\ diff --git a/modules/mummer/main.nf b/modules/mummer/main.nf index f4f3bb18..39ad3e8b 100644 --- a/modules/mummer/main.nf +++ b/modules/mummer/main.nf @@ -18,7 +18,7 @@ process MUMMER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def is_compressed_ref = ref.getName().endsWith(".gz") ? true : false def fasta_name_ref = ref.getName().replace(".gz", "") diff --git a/modules/muscle/main.nf b/modules/muscle/main.nf index a50f5cb3..6d549aaa 100644 --- a/modules/muscle/main.nf +++ b/modules/muscle/main.nf @@ -23,7 +23,7 @@ process MUSCLE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def fasta_out = args.contains('-fasta') ? "-fastaout ${prefix}_muscle_msa.afa" : '' def clw_out = args.contains('-clw') ? "-clwout ${prefix}_muscle_msa.clw" : '' def msf_out = args.contains('-msf') ? "-msfout ${prefix}_muscle_msa.msf" : '' diff --git a/modules/nanolyse/main.nf b/modules/nanolyse/main.nf index f29eeb77..0ad0f799 100644 --- a/modules/nanolyse/main.nf +++ b/modules/nanolyse/main.nf @@ -18,7 +18,7 @@ process NANOLYSE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ gunzip -c $fastq | NanoLyse -r $fasta | gzip > ${prefix}.fastq.gz mv NanoLyse.log ${prefix}.nanolyse.log diff --git a/modules/ncbigenomedownload/main.nf b/modules/ncbigenomedownload/main.nf index 466c8d09..9897c861 100644 --- a/modules/ncbigenomedownload/main.nf +++ b/modules/ncbigenomedownload/main.nf @@ -29,7 +29,7 @@ process NCBIGENOMEDOWNLOAD { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def accessions_opt = accessions ? "-A ${accessions}" : "" """ ncbi-genome-download \\ diff --git a/modules/ngmaster/main.nf b/modules/ngmaster/main.nf index 0884b55c..7d04031c 100644 --- a/modules/ngmaster/main.nf +++ b/modules/ngmaster/main.nf @@ -16,7 +16,7 @@ process NGMASTER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ ngmaster \\ $args \\ diff --git a/modules/nucmer/main.nf b/modules/nucmer/main.nf index bb5dcb7d..4e296515 100644 --- a/modules/nucmer/main.nf +++ b/modules/nucmer/main.nf @@ -17,7 +17,7 @@ process NUCMER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def is_compressed_ref = ref.getName().endsWith(".gz") ? true : false def is_compressed_query = query.getName().endsWith(".gz") ? true : false def fasta_name_ref = ref.getName().replace(".gz", "") diff --git a/modules/pairtools/dedup/main.nf b/modules/pairtools/dedup/main.nf index 5ee9dc43..fe59e155 100644 --- a/modules/pairtools/dedup/main.nf +++ b/modules/pairtools/dedup/main.nf @@ -17,7 +17,7 @@ process PAIRTOOLS_DEDUP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ pairtools dedup \\ $args \\ diff --git a/modules/pairtools/flip/main.nf b/modules/pairtools/flip/main.nf index 452800cc..376191ce 100644 --- a/modules/pairtools/flip/main.nf +++ b/modules/pairtools/flip/main.nf @@ -17,7 +17,7 @@ process PAIRTOOLS_FLIP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ pairtools \\ flip \\ diff --git a/modules/pairtools/parse/main.nf b/modules/pairtools/parse/main.nf index 1d34d42c..7bd778c9 100644 --- a/modules/pairtools/parse/main.nf +++ b/modules/pairtools/parse/main.nf @@ -18,7 +18,7 @@ process PAIRTOOLS_PARSE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ pairtools \\ parse \\ diff --git a/modules/pairtools/restrict/main.nf b/modules/pairtools/restrict/main.nf index 9fcc245c..8759f709 100644 --- a/modules/pairtools/restrict/main.nf +++ b/modules/pairtools/restrict/main.nf @@ -17,7 +17,7 @@ process PAIRTOOLS_RESTRICT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ pairtools \\ restrict \\ diff --git a/modules/pairtools/select/main.nf b/modules/pairtools/select/main.nf index f699afa3..a6d62ba7 100644 --- a/modules/pairtools/select/main.nf +++ b/modules/pairtools/select/main.nf @@ -17,7 +17,7 @@ process PAIRTOOLS_SELECT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ pairtools select \\ "$args" \\ diff --git a/modules/pairtools/sort/main.nf b/modules/pairtools/sort/main.nf index 5caa5b74..d5996dd0 100644 --- a/modules/pairtools/sort/main.nf +++ b/modules/pairtools/sort/main.nf @@ -16,7 +16,7 @@ process PAIRTOOLS_SORT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def mem = task.memory.toString().replaceAll(/(\s|\.|B)+/, '') """ pairtools \\ diff --git a/modules/pangolin/main.nf b/modules/pangolin/main.nf index 99a68e09..5ee2b2e0 100644 --- a/modules/pangolin/main.nf +++ b/modules/pangolin/main.nf @@ -16,7 +16,7 @@ process PANGOLIN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ pangolin \\ $fasta\\ diff --git a/modules/paraclu/main.nf b/modules/paraclu/main.nf index a2003834..1623ea89 100644 --- a/modules/paraclu/main.nf +++ b/modules/paraclu/main.nf @@ -19,7 +19,7 @@ process PARACLU { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ awk -F "\t" '{print\$1"\t"\$6"\t"\$2"\t"\$5}' < $bed > ${bed}_4P diff --git a/modules/pbbam/pbmerge/main.nf b/modules/pbbam/pbmerge/main.nf index 970128cb..e0525cb1 100644 --- a/modules/pbbam/pbmerge/main.nf +++ b/modules/pbbam/pbmerge/main.nf @@ -17,7 +17,7 @@ process PBBAM_PBMERGE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ pbmerge \\ -o ${prefix}.bam \\ diff --git a/modules/pbccs/main.nf b/modules/pbccs/main.nf index 83e56d96..440fbc72 100644 --- a/modules/pbccs/main.nf +++ b/modules/pbccs/main.nf @@ -22,7 +22,7 @@ process PBCCS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ ccs \\ $bam \\ diff --git a/modules/peddy/main.nf b/modules/peddy/main.nf index 0a6c3384..d64c3762 100644 --- a/modules/peddy/main.nf +++ b/modules/peddy/main.nf @@ -20,7 +20,7 @@ process PEDDY { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ peddy \\ $args \\ diff --git a/modules/phantompeakqualtools/main.nf b/modules/phantompeakqualtools/main.nf index f2edabc3..6fe34cc2 100644 --- a/modules/phantompeakqualtools/main.nf +++ b/modules/phantompeakqualtools/main.nf @@ -20,7 +20,7 @@ process PHANTOMPEAKQUALTOOLS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ RUN_SPP=`which run_spp.R` Rscript -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" -p=$task.cpus diff --git a/modules/phyloflash/main.nf b/modules/phyloflash/main.nf index c507dd14..9ebc40de 100644 --- a/modules/phyloflash/main.nf +++ b/modules/phyloflash/main.nf @@ -18,7 +18,7 @@ process PHYLOFLASH { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ phyloFlash.pl \\ @@ -58,7 +58,7 @@ process PHYLOFLASH { } stub: - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ mkdir ${prefix} touch ${prefix}/${prefix}.SSU.collection.fasta diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index adb82d8c..3705b8fb 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -20,7 +20,7 @@ process PICARD_COLLECTHSMETRICS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "-R $fasta" : "" def avail_mem = 3 diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index f52f5885..6b292534 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -18,7 +18,7 @@ process PICARD_COLLECTMULTIPLEMETRICS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def avail_mem = 3 if (!task.memory) { log.info '[Picard CollectMultipleMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index 94745d2d..eddb4604 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -17,7 +17,7 @@ process PICARD_COLLECTWGSMETRICS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def avail_mem = 3 if (!task.memory) { log.info '[Picard CollectWgsMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' diff --git a/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf index 8b1d2e6b..d8de137b 100644 --- a/modules/picard/filtersamreads/main.nf +++ b/modules/picard/filtersamreads/main.nf @@ -17,7 +17,7 @@ process PICARD_FILTERSAMREADS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def avail_mem = 3 if (!task.memory) { log.info '[Picard FilterSamReads] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index d4c5886f..d3bf6938 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -18,7 +18,7 @@ process PICARD_MARKDUPLICATES { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def avail_mem = 3 if (!task.memory) { log.info '[Picard MarkDuplicates] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' diff --git a/modules/picard/mergesamfiles/main.nf b/modules/picard/mergesamfiles/main.nf index 3a2fc620..86796593 100644 --- a/modules/picard/mergesamfiles/main.nf +++ b/modules/picard/mergesamfiles/main.nf @@ -16,7 +16,7 @@ process PICARD_MERGESAMFILES { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def bam_files = bams.sort() def avail_mem = 3 if (!task.memory) { diff --git a/modules/picard/sortsam/main.nf b/modules/picard/sortsam/main.nf index b264b927..eb3caf40 100644 --- a/modules/picard/sortsam/main.nf +++ b/modules/picard/sortsam/main.nf @@ -17,7 +17,7 @@ process PICARD_SORTSAM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def avail_mem = 3 if (!task.memory) { log.info '[Picard SortSam] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' diff --git a/modules/pirate/main.nf b/modules/pirate/main.nf index 3bbb1d64..70de52e6 100644 --- a/modules/pirate/main.nf +++ b/modules/pirate/main.nf @@ -17,7 +17,7 @@ process PIRATE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ PIRATE \\ $args \\ diff --git a/modules/plink/extract/main.nf b/modules/plink/extract/main.nf index 34b12fca..9b8a52f3 100644 --- a/modules/plink/extract/main.nf +++ b/modules/plink/extract/main.nf @@ -18,7 +18,7 @@ process PLINK_EXTRACT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + 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" """ plink \\ diff --git a/modules/plink/vcf/main.nf b/modules/plink/vcf/main.nf index b6fd03d7..719e90d2 100644 --- a/modules/plink/vcf/main.nf +++ b/modules/plink/vcf/main.nf @@ -19,7 +19,7 @@ process PLINK_VCF { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ plink \\ diff --git a/modules/plink2/vcf/main.nf b/modules/plink2/vcf/main.nf index 8101f7dd..078ece1e 100644 --- a/modules/plink2/vcf/main.nf +++ b/modules/plink2/vcf/main.nf @@ -18,7 +18,7 @@ process PLINK2_VCF { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ plink2 \\ $args \\ diff --git a/modules/pmdtools/filter/main.nf b/modules/pmdtools/filter/main.nf index 301f9206..0b3bcbc6 100644 --- a/modules/pmdtools/filter/main.nf +++ b/modules/pmdtools/filter/main.nf @@ -21,7 +21,7 @@ process PMDTOOLS_FILTER { def args2 = task.ext.args2 ?: '' def args3 = task.ext.args3 ?: '' def split_cpus = Math.floor(task.cpus/2) - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + 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!" //threshold and header flags activate filtering function of pmdtools """ diff --git a/modules/porechop/main.nf b/modules/porechop/main.nf index 2edc5c78..249efad9 100644 --- a/modules/porechop/main.nf +++ b/modules/porechop/main.nf @@ -16,7 +16,7 @@ process PORECHOP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ porechop \\ -i $reads \\ diff --git a/modules/preseq/lcextrap/main.nf b/modules/preseq/lcextrap/main.nf index 43f86cf8..b5bd0620 100644 --- a/modules/preseq/lcextrap/main.nf +++ b/modules/preseq/lcextrap/main.nf @@ -18,7 +18,7 @@ process PRESEQ_LCEXTRAP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def paired_end = meta.single_end ? '' : '-pe' """ preseq \\ diff --git a/modules/pydamage/analyze/main.nf b/modules/pydamage/analyze/main.nf index c55616db..c06c592c 100644 --- a/modules/pydamage/analyze/main.nf +++ b/modules/pydamage/analyze/main.nf @@ -16,7 +16,7 @@ process PYDAMAGE_ANALYZE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ pydamage \\ analyze \\ diff --git a/modules/pydamage/filter/main.nf b/modules/pydamage/filter/main.nf index 2e0afac9..ab0b2115 100644 --- a/modules/pydamage/filter/main.nf +++ b/modules/pydamage/filter/main.nf @@ -16,7 +16,7 @@ process PYDAMAGE_FILTER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ pydamage \\ diff --git a/modules/qcat/main.nf b/modules/qcat/main.nf index 9f53f0cb..7d81952d 100644 --- a/modules/qcat/main.nf +++ b/modules/qcat/main.nf @@ -17,7 +17,7 @@ process QCAT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ ## Unzip fastq file ## qcat doesn't support zipped files yet diff --git a/modules/racon/main.nf b/modules/racon/main.nf index 5936fac0..9be5ce63 100644 --- a/modules/racon/main.nf +++ b/modules/racon/main.nf @@ -16,7 +16,7 @@ process RACON { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ racon -t "$task.cpus" \\ "${reads}" \\ diff --git a/modules/rasusa/main.nf b/modules/rasusa/main.nf index b43792ee..c2893d18 100644 --- a/modules/rasusa/main.nf +++ b/modules/rasusa/main.nf @@ -17,7 +17,7 @@ process RASUSA { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def output = meta.single_end ? "--output ${prefix}.fastq.gz" : "--output ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz" """ rasusa \\ diff --git a/modules/rmarkdownnotebook/main.nf b/modules/rmarkdownnotebook/main.nf index 9a7db505..f8183216 100644 --- a/modules/rmarkdownnotebook/main.nf +++ b/modules/rmarkdownnotebook/main.nf @@ -25,7 +25,7 @@ process RMARKDOWNNOTEBOOK { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def parametrize = (task.ext.parametrize == null) ? true : task.ext.parametrize def implicit_params = (task.ext.implicit_params == null) ? true : task.ext.implicit_params def meta_params = (task.ext.meta_params == null) ? true : task.ext.meta_params diff --git a/modules/roary/main.nf b/modules/roary/main.nf index a05973eb..edda3281 100644 --- a/modules/roary/main.nf +++ b/modules/roary/main.nf @@ -17,7 +17,7 @@ process ROARY { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ roary \\ $args \\ diff --git a/modules/rseqc/bamstat/main.nf b/modules/rseqc/bamstat/main.nf index d9d3fa36..1141a13f 100644 --- a/modules/rseqc/bamstat/main.nf +++ b/modules/rseqc/bamstat/main.nf @@ -16,7 +16,7 @@ process RSEQC_BAMSTAT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bam_stat.py \\ -i $bam \\ diff --git a/modules/rseqc/inferexperiment/main.nf b/modules/rseqc/inferexperiment/main.nf index 3b879cfb..2243c43e 100644 --- a/modules/rseqc/inferexperiment/main.nf +++ b/modules/rseqc/inferexperiment/main.nf @@ -17,7 +17,7 @@ process RSEQC_INFEREXPERIMENT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ infer_experiment.py \\ -i $bam \\ diff --git a/modules/rseqc/innerdistance/main.nf b/modules/rseqc/innerdistance/main.nf index 88bec499..425737d6 100644 --- a/modules/rseqc/innerdistance/main.nf +++ b/modules/rseqc/innerdistance/main.nf @@ -21,7 +21,7 @@ process RSEQC_INNERDISTANCE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (!meta.single_end) { """ inner_distance.py \\ diff --git a/modules/rseqc/junctionannotation/main.nf b/modules/rseqc/junctionannotation/main.nf index b6949641..d2562e5c 100644 --- a/modules/rseqc/junctionannotation/main.nf +++ b/modules/rseqc/junctionannotation/main.nf @@ -23,7 +23,7 @@ process RSEQC_JUNCTIONANNOTATION { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ junction_annotation.py \\ -i $bam \\ diff --git a/modules/rseqc/junctionsaturation/main.nf b/modules/rseqc/junctionsaturation/main.nf index 58451d2e..695762b5 100644 --- a/modules/rseqc/junctionsaturation/main.nf +++ b/modules/rseqc/junctionsaturation/main.nf @@ -18,7 +18,7 @@ process RSEQC_JUNCTIONSATURATION { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ junction_saturation.py \\ -i $bam \\ diff --git a/modules/rseqc/readdistribution/main.nf b/modules/rseqc/readdistribution/main.nf index 74af618d..333193e3 100644 --- a/modules/rseqc/readdistribution/main.nf +++ b/modules/rseqc/readdistribution/main.nf @@ -17,7 +17,7 @@ process RSEQC_READDISTRIBUTION { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ read_distribution.py \\ -i $bam \\ diff --git a/modules/rseqc/readduplication/main.nf b/modules/rseqc/readduplication/main.nf index 80fcb150..134f2e8d 100644 --- a/modules/rseqc/readduplication/main.nf +++ b/modules/rseqc/readduplication/main.nf @@ -19,7 +19,7 @@ process RSEQC_READDUPLICATION { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ read_duplication.py \\ -i $bam \\ diff --git a/modules/samblaster/main.nf b/modules/samblaster/main.nf index 8445b0d0..c6573283 100644 --- a/modules/samblaster/main.nf +++ b/modules/samblaster/main.nf @@ -18,7 +18,7 @@ process SAMBLASTER { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def args3 = task.ext.args3 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + 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" """ samtools view -h $args2 $bam | \\ diff --git a/modules/samtools/ampliconclip/main.nf b/modules/samtools/ampliconclip/main.nf index 87d6ff8b..55a2f736 100644 --- a/modules/samtools/ampliconclip/main.nf +++ b/modules/samtools/ampliconclip/main.nf @@ -21,7 +21,7 @@ process SAMTOOLS_AMPLICONCLIP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def rejects = save_cliprejects ? "--rejects-file ${prefix}.cliprejects.bam" : "" def stats = save_clipstats ? "-f ${prefix}.clipstats.txt" : "" """ diff --git a/modules/samtools/bam2fq/main.nf b/modules/samtools/bam2fq/main.nf index 20e83a14..689eb960 100644 --- a/modules/samtools/bam2fq/main.nf +++ b/modules/samtools/bam2fq/main.nf @@ -17,7 +17,7 @@ process SAMTOOLS_BAM2FQ { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (split){ """ diff --git a/modules/samtools/depth/main.nf b/modules/samtools/depth/main.nf index f336547f..ebf029aa 100644 --- a/modules/samtools/depth/main.nf +++ b/modules/samtools/depth/main.nf @@ -16,7 +16,7 @@ process SAMTOOLS_DEPTH { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ samtools \\ diff --git a/modules/samtools/fastq/main.nf b/modules/samtools/fastq/main.nf index bdbf53e4..212e804e 100644 --- a/modules/samtools/fastq/main.nf +++ b/modules/samtools/fastq/main.nf @@ -16,7 +16,7 @@ process SAMTOOLS_FASTQ { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def endedness = meta.single_end ? "-0 ${prefix}.fastq.gz" : "-1 ${prefix}_1.fastq.gz -2 ${prefix}_2.fastq.gz" """ diff --git a/modules/samtools/fixmate/main.nf b/modules/samtools/fixmate/main.nf index 180833f4..8f86c1c4 100644 --- a/modules/samtools/fixmate/main.nf +++ b/modules/samtools/fixmate/main.nf @@ -16,7 +16,7 @@ process SAMTOOLS_FIXMATE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + 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!" """ diff --git a/modules/samtools/mpileup/main.nf b/modules/samtools/mpileup/main.nf index 5f6e2d49..c40f46d1 100644 --- a/modules/samtools/mpileup/main.nf +++ b/modules/samtools/mpileup/main.nf @@ -17,7 +17,7 @@ process SAMTOOLS_MPILEUP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ samtools mpileup \\ --fasta-ref $fasta \\ diff --git a/modules/samtools/sort/main.nf b/modules/samtools/sort/main.nf index 623f10b6..0c2cf25e 100644 --- a/modules/samtools/sort/main.nf +++ b/modules/samtools/sort/main.nf @@ -16,7 +16,7 @@ process SAMTOOLS_SORT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ samtools sort $args -@ $task.cpus -o ${prefix}.bam -T $prefix $bam cat <<-END_VERSIONS > versions.yml diff --git a/modules/samtools/view/main.nf b/modules/samtools/view/main.nf index 464edd09..619b84dc 100644 --- a/modules/samtools/view/main.nf +++ b/modules/samtools/view/main.nf @@ -18,7 +18,7 @@ process SAMTOOLS_VIEW { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--reference ${fasta} -C" : "" def file_type = input.getExtension() """ diff --git a/modules/scoary/main.nf b/modules/scoary/main.nf index 8fed0119..ca33041d 100644 --- a/modules/scoary/main.nf +++ b/modules/scoary/main.nf @@ -17,7 +17,7 @@ process SCOARY { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def newick_tree = tree ? "-n ${tree}" : "" """ scoary \\ diff --git a/modules/seacr/callpeak/main.nf b/modules/seacr/callpeak/main.nf index 328e4e6c..12b9205f 100644 --- a/modules/seacr/callpeak/main.nf +++ b/modules/seacr/callpeak/main.nf @@ -19,7 +19,7 @@ process SEACR_CALLPEAK { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def function_switch = ctrlbedgraph ? "$ctrlbedgraph" : "$threshold" """ SEACR_1.3.sh \\ diff --git a/modules/seqsero2/main.nf b/modules/seqsero2/main.nf index a8dd731e..0a7aa6ad 100644 --- a/modules/seqsero2/main.nf +++ b/modules/seqsero2/main.nf @@ -18,7 +18,7 @@ process SEQSERO2 { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ SeqSero2_package.py \\ $args \\ diff --git a/modules/seqtk/mergepe/main.nf b/modules/seqtk/mergepe/main.nf index 954bed5c..299c9ea4 100644 --- a/modules/seqtk/mergepe/main.nf +++ b/modules/seqtk/mergepe/main.nf @@ -16,7 +16,7 @@ process SEQTK_MERGEPE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ ln -s ${reads} ${prefix}.fastq.gz diff --git a/modules/seqtk/sample/main.nf b/modules/seqtk/sample/main.nf index 83a107d0..96e08fd4 100644 --- a/modules/seqtk/sample/main.nf +++ b/modules/seqtk/sample/main.nf @@ -17,7 +17,7 @@ process SEQTK_SAMPLE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ seqtk \\ diff --git a/modules/sequenzautils/bam2seqz/main.nf b/modules/sequenzautils/bam2seqz/main.nf index 9082d426..ce9d1962 100644 --- a/modules/sequenzautils/bam2seqz/main.nf +++ b/modules/sequenzautils/bam2seqz/main.nf @@ -18,7 +18,7 @@ process SEQUENZAUTILS_BAM2SEQZ { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ sequenza-utils \\ bam2seqz \\ diff --git a/modules/sequenzautils/gcwiggle/main.nf b/modules/sequenzautils/gcwiggle/main.nf index 43358c43..a6fcb559 100644 --- a/modules/sequenzautils/gcwiggle/main.nf +++ b/modules/sequenzautils/gcwiggle/main.nf @@ -16,7 +16,7 @@ process SEQUENZAUTILS_GCWIGGLE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ sequenza-utils \\ gc_wiggle \\ diff --git a/modules/seqwish/induce/main.nf b/modules/seqwish/induce/main.nf index fb25a96e..089f3478 100644 --- a/modules/seqwish/induce/main.nf +++ b/modules/seqwish/induce/main.nf @@ -19,7 +19,7 @@ process SEQWISH_INDUCE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ seqwish \\ --threads $task.cpus \\ diff --git a/modules/snpdists/main.nf b/modules/snpdists/main.nf index de79e89b..c8d61161 100644 --- a/modules/snpdists/main.nf +++ b/modules/snpdists/main.nf @@ -16,7 +16,7 @@ process SNPDISTS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ snp-dists \\ $args \\ diff --git a/modules/snpeff/main.nf b/modules/snpeff/main.nf index 2cd023f6..d0ec993e 100644 --- a/modules/snpeff/main.nf +++ b/modules/snpeff/main.nf @@ -28,7 +28,7 @@ process SNPEFF { } else { avail_mem = task.memory.giga } - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def dir_cache = task.ext.use_cache ? "-dataDir \${PWD}/${cache}" : "" """ snpEff \\ diff --git a/modules/sortmerna/main.nf b/modules/sortmerna/main.nf index 83cd8092..5c0950d8 100644 --- a/modules/sortmerna/main.nf +++ b/modules/sortmerna/main.nf @@ -18,7 +18,7 @@ process SORTMERNA { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ sortmerna \\ diff --git a/modules/spades/main.nf b/modules/spades/main.nf index 4663ec55..ba690d35 100644 --- a/modules/spades/main.nf +++ b/modules/spades/main.nf @@ -22,7 +22,7 @@ process SPADES { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def maxmem = task.memory.toGiga() def illumina_reads = illumina ? ( meta.single_end ? "-s $illumina" : "-1 ${illumina[0]} -2 ${illumina[1]}" ) : "" def pacbio_reads = pacbio ? "--pacbio $pacbio" : "" diff --git a/modules/spatyper/main.nf b/modules/spatyper/main.nf index d7c75ba6..e0ba8d13 100644 --- a/modules/spatyper/main.nf +++ b/modules/spatyper/main.nf @@ -18,7 +18,7 @@ process SPATYPER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def input_args = repeats && repeat_order ? "-r ${repeats} -o ${repeat_order}" : "" """ spaTyper \\ diff --git a/modules/staphopiasccmec/main.nf b/modules/staphopiasccmec/main.nf index f33634ae..dbb61a27 100644 --- a/modules/staphopiasccmec/main.nf +++ b/modules/staphopiasccmec/main.nf @@ -16,7 +16,7 @@ process STAPHOPIASCCMEC { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ staphopia-sccmec --assembly $fasta $args > ${prefix}.tsv diff --git a/modules/star/align/main.nf b/modules/star/align/main.nf index 46023d3e..9725496f 100644 --- a/modules/star/align/main.nf +++ b/modules/star/align/main.nf @@ -32,7 +32,7 @@ process STAR_ALIGN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def ignore_gtf = star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf" def seq_platform = seq_platform ? "'PL:$seq_platform'" : "" def seq_center = seq_center ? "--outSAMattrRGline ID:$prefix 'CN:$seq_center' 'SM:$prefix' $seq_platform " : "--outSAMattrRGline ID:$prefix 'SM:$prefix' $seq_platform " diff --git a/modules/strelka/germline/main.nf b/modules/strelka/germline/main.nf index e991db67..324be6df 100644 --- a/modules/strelka/germline/main.nf +++ b/modules/strelka/germline/main.nf @@ -23,7 +23,7 @@ process STRELKA_GERMLINE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def regions = target_bed ? "--exome --callRegions ${target_bed}" : "" """ configureStrelkaGermlineWorkflow.py \\ diff --git a/modules/strelka/somatic/main.nf b/modules/strelka/somatic/main.nf index fa138633..a9766d01 100644 --- a/modules/strelka/somatic/main.nf +++ b/modules/strelka/somatic/main.nf @@ -23,7 +23,7 @@ process STRELKA_SOMATIC { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def options_target_bed = target_bed ? "--exome --callRegions ${target_bed}" : "" def options_manta = manta_candidate_small_indels ? "--indelCandidates ${manta_candidate_small_indels}" : "" """ diff --git a/modules/stringtie/stringtie/main.nf b/modules/stringtie/stringtie/main.nf index 4367a84d..9d62a966 100644 --- a/modules/stringtie/stringtie/main.nf +++ b/modules/stringtie/stringtie/main.nf @@ -20,7 +20,7 @@ process STRINGTIE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def strandedness = '' if (meta.strandedness == 'forward') { diff --git a/modules/subread/featurecounts/main.nf b/modules/subread/featurecounts/main.nf index 43a7f8cd..53eb279e 100644 --- a/modules/subread/featurecounts/main.nf +++ b/modules/subread/featurecounts/main.nf @@ -17,7 +17,7 @@ process SUBREAD_FEATURECOUNTS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def paired_end = meta.single_end ? '' : '-p' def strandedness = 0 diff --git a/modules/tabix/bgzip/main.nf b/modules/tabix/bgzip/main.nf index 13f9a942..ed9362b2 100644 --- a/modules/tabix/bgzip/main.nf +++ b/modules/tabix/bgzip/main.nf @@ -16,7 +16,7 @@ process TABIX_BGZIP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bgzip -c $args $input > ${prefix}.${input.getExtension()}.gz diff --git a/modules/tabix/bgziptabix/main.nf b/modules/tabix/bgziptabix/main.nf index 9a633d2e..20b47a9f 100644 --- a/modules/tabix/bgziptabix/main.nf +++ b/modules/tabix/bgziptabix/main.nf @@ -17,7 +17,7 @@ process TABIX_BGZIPTABIX { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bgzip -c $args $input > ${prefix}.gz tabix $args2 ${prefix}.gz diff --git a/modules/tiddit/cov/main.nf b/modules/tiddit/cov/main.nf index e9bb9b5d..c5a1ca0f 100644 --- a/modules/tiddit/cov/main.nf +++ b/modules/tiddit/cov/main.nf @@ -18,7 +18,7 @@ process TIDDIT_COV { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--ref $fasta" : "" """ tiddit \\ diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index 83a46f82..08eecc01 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -20,7 +20,7 @@ process TIDDIT_SV { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta == "dummy_file.txt" ? "--ref $fasta" : "" """ tiddit \\ diff --git a/modules/trimgalore/main.nf b/modules/trimgalore/main.nf index 86761ad8..ee40b780 100644 --- a/modules/trimgalore/main.nf +++ b/modules/trimgalore/main.nf @@ -38,7 +38,7 @@ process TRIMGALORE { def tpc_r2 = params.three_prime_clip_r2 > 0 ? "--three_prime_clip_r2 ${params.three_prime_clip_r2}" : '' // Added soft-links to original fastqs for consistent naming in MultiQC - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ [ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz diff --git a/modules/ucsc/bed12tobigbed/main.nf b/modules/ucsc/bed12tobigbed/main.nf index 937eabd6..742798b3 100644 --- a/modules/ucsc/bed12tobigbed/main.nf +++ b/modules/ucsc/bed12tobigbed/main.nf @@ -19,7 +19,7 @@ process UCSC_BED12TOBIGBED { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedToBigBed \\ $bed \\ diff --git a/modules/ucsc/bedclip/main.nf b/modules/ucsc/bedclip/main.nf index 1d46342c..dacd7260 100755 --- a/modules/ucsc/bedclip/main.nf +++ b/modules/ucsc/bedclip/main.nf @@ -19,7 +19,7 @@ process UCSC_BEDCLIP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedClip \\ $bedgraph \\ diff --git a/modules/ucsc/bedgraphtobigwig/main.nf b/modules/ucsc/bedgraphtobigwig/main.nf index e18b41bc..9ba306ab 100644 --- a/modules/ucsc/bedgraphtobigwig/main.nf +++ b/modules/ucsc/bedgraphtobigwig/main.nf @@ -19,7 +19,7 @@ process UCSC_BEDGRAPHTOBIGWIG { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ bedGraphToBigWig \\ $bedgraph \\ diff --git a/modules/ucsc/bigwigaverageoverbed/main.nf b/modules/ucsc/bigwigaverageoverbed/main.nf index 8c6f1178..1e97c83d 100644 --- a/modules/ucsc/bigwigaverageoverbed/main.nf +++ b/modules/ucsc/bigwigaverageoverbed/main.nf @@ -19,7 +19,7 @@ process UCSC_BIGWIGAVERAGEOVERBED { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" // BUG: bigWigAverageOverBed cannot handle ensembl seqlevels style """ bigWigAverageOverBed \\ diff --git a/modules/ucsc/liftover/main.nf b/modules/ucsc/liftover/main.nf index 1c667262..3dd9531e 100644 --- a/modules/ucsc/liftover/main.nf +++ b/modules/ucsc/liftover/main.nf @@ -20,7 +20,7 @@ process UCSC_LIFTOVER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ liftOver \\ diff --git a/modules/ultra/pipeline/main.nf b/modules/ultra/pipeline/main.nf index 5df34121..f2dcb543 100644 --- a/modules/ultra/pipeline/main.nf +++ b/modules/ultra/pipeline/main.nf @@ -18,7 +18,7 @@ process ULTRA_PIPELINE { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ uLTRA \\ pipeline \\ diff --git a/modules/umitools/dedup/main.nf b/modules/umitools/dedup/main.nf index 287bb8c2..ce21437d 100644 --- a/modules/umitools/dedup/main.nf +++ b/modules/umitools/dedup/main.nf @@ -16,7 +16,7 @@ process UMITOOLS_DEDUP { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def paired = meta.single_end ? "" : "--paired" """ umi_tools dedup \\ diff --git a/modules/umitools/extract/main.nf b/modules/umitools/extract/main.nf index 3c2402e2..fba8f054 100644 --- a/modules/umitools/extract/main.nf +++ b/modules/umitools/extract/main.nf @@ -17,7 +17,7 @@ process UMITOOLS_EXTRACT { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ umi_tools \\ diff --git a/modules/unicycler/main.nf b/modules/unicycler/main.nf index 14319dc1..1ccc72a9 100644 --- a/modules/unicycler/main.nf +++ b/modules/unicycler/main.nf @@ -18,7 +18,7 @@ process UNICYCLER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def short_reads = shortreads ? ( meta.single_end ? "-s $shortreads" : "-1 ${shortreads[0]} -2 ${shortreads[1]}" ) : "" def long_reads = longreads ? "-l $longreads" : "" """ diff --git a/modules/variantbam/main.nf b/modules/variantbam/main.nf index 3d354016..11059a9a 100644 --- a/modules/variantbam/main.nf +++ b/modules/variantbam/main.nf @@ -18,7 +18,7 @@ process VARIANTBAM { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" """ variant \\ $bam \\ diff --git a/modules/vcftools/main.nf b/modules/vcftools/main.nf index 62fff0cf..fbe646ca 100644 --- a/modules/vcftools/main.nf +++ b/modules/vcftools/main.nf @@ -83,7 +83,7 @@ process VCFTOOLS { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def args_list = args.tokenize() def bed_arg = (args.contains('--bed')) ? "--bed ${bed}" : diff --git a/modules/yara/mapper/main.nf b/modules/yara/mapper/main.nf index 6e7f433b..4539033d 100644 --- a/modules/yara/mapper/main.nf +++ b/modules/yara/mapper/main.nf @@ -17,7 +17,7 @@ process YARA_MAPPER { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { """ yara_mapper \\ diff --git a/tests/modules/bbmap/bbduk/nextflow.config b/tests/modules/bbmap/bbduk/nextflow.config index 8940a9be..46fc33b4 100644 --- a/tests/modules/bbmap/bbduk/nextflow.config +++ b/tests/modules/bbmap/bbduk/nextflow.config @@ -4,7 +4,7 @@ process { withName: BBMAP_BBDUK { ext.args = 'trimq=10 qtrim=r' - ext.suffix = '.trim' + ext.prefix = { "${meta.id}.trim" } } } diff --git a/tests/modules/bcftools/reheader/nextflow.config b/tests/modules/bcftools/reheader/nextflow.config index a377b26d..55d2cff8 100644 --- a/tests/modules/bcftools/reheader/nextflow.config +++ b/tests/modules/bcftools/reheader/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: BCFTOOLS_REHEADER { - ext.suffix = '.updated' + ext.prefix = { "${meta.id}.updated" } } } diff --git a/tests/modules/bedtools/complement/nextflow.config b/tests/modules/bedtools/complement/nextflow.config index 561fdead..cb867120 100644 --- a/tests/modules/bedtools/complement/nextflow.config +++ b/tests/modules/bedtools/complement/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: BEDTOOLS_COMPLEMENT { - ext.suffix = '_out' + ext.prefix = { "${meta.id}_out" } } } diff --git a/tests/modules/bedtools/genomecov/nextflow.config b/tests/modules/bedtools/genomecov/nextflow.config index bc0e4aaf..6e1c03e2 100644 --- a/tests/modules/bedtools/genomecov/nextflow.config +++ b/tests/modules/bedtools/genomecov/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: BEDTOOLS_GENOMECOV { - ext.suffix = '_out' + ext.prefix = { "${meta.id}_out" } } } diff --git a/tests/modules/bedtools/intersect/nextflow.config b/tests/modules/bedtools/intersect/nextflow.config index c7d0c826..3aa2593f 100644 --- a/tests/modules/bedtools/intersect/nextflow.config +++ b/tests/modules/bedtools/intersect/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: BEDTOOLS_INTERSECT { - ext.suffix = '_out' + ext.prefix = { "${meta.id}_out" } } } diff --git a/tests/modules/bedtools/merge/nextflow.config b/tests/modules/bedtools/merge/nextflow.config index e7d635dd..545a523d 100644 --- a/tests/modules/bedtools/merge/nextflow.config +++ b/tests/modules/bedtools/merge/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: BEDTOOLS_MERGE { - ext.suffix = '_out' + ext.prefix = { "${meta.id}_out" } } } diff --git a/tests/modules/bedtools/slop/nextflow.config b/tests/modules/bedtools/slop/nextflow.config index 5dc03727..09abb51a 100644 --- a/tests/modules/bedtools/slop/nextflow.config +++ b/tests/modules/bedtools/slop/nextflow.config @@ -4,7 +4,7 @@ process { withName: BEDTOOLS_SLOP { ext.args = '-l 15 -r 30' - ext.suffix = '_out' + ext.prefix = { "${meta.id}_out" } } } diff --git a/tests/modules/bedtools/sort/nextflow.config b/tests/modules/bedtools/sort/nextflow.config index 6bb73232..2ecc295a 100644 --- a/tests/modules/bedtools/sort/nextflow.config +++ b/tests/modules/bedtools/sort/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: BEDTOOLS_SORT { - ext.suffix = '_out' + ext.prefix = { "${meta.id}_out" } } } diff --git a/tests/modules/diamond/blastp/nextflow.config b/tests/modules/diamond/blastp/nextflow.config index d1222d49..5a9aacad 100644 --- a/tests/modules/diamond/blastp/nextflow.config +++ b/tests/modules/diamond/blastp/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: DIAMOND_BLASTP { - ext.suffix = '.diamond_blastp' + ext.prefix = { "${meta.id}.diamond_blastp" } } } diff --git a/tests/modules/diamond/blastx/nextflow.config b/tests/modules/diamond/blastx/nextflow.config index 83169455..25320af3 100644 --- a/tests/modules/diamond/blastx/nextflow.config +++ b/tests/modules/diamond/blastx/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: DIAMOND_BLASTX { - ext.suffix = '.diamond_blastx' + ext.prefix = { "${meta.id}.diamond_blastx" } } } diff --git a/tests/modules/dshbio/filterbed/nextflow.config b/tests/modules/dshbio/filterbed/nextflow.config index 2f1e5ab9..3937a184 100644 --- a/tests/modules/dshbio/filterbed/nextflow.config +++ b/tests/modules/dshbio/filterbed/nextflow.config @@ -4,6 +4,6 @@ process { withName: DSHBIO_FILTERBED { ext.args = '--range chr1:0-1000' - ext.suffix = '.filtered' + ext.prefix = { "${meta.id}.filtered" } } } diff --git a/tests/modules/dshbio/filtergff3/nextflow.config b/tests/modules/dshbio/filtergff3/nextflow.config index c4b75eaf..80dcd28c 100644 --- a/tests/modules/dshbio/filtergff3/nextflow.config +++ b/tests/modules/dshbio/filtergff3/nextflow.config @@ -4,7 +4,7 @@ process { withName: DSHBIO_FILTERGFF3 { ext.args = '--range MT192765.1:0-1000' - ext.suffix = '.filtered' + ext.prefix = { "${meta.id}.filtered" } } } diff --git a/tests/modules/dshbio/splitbed/nextflow.config b/tests/modules/dshbio/splitbed/nextflow.config index 4369c509..ad9c045b 100644 --- a/tests/modules/dshbio/splitbed/nextflow.config +++ b/tests/modules/dshbio/splitbed/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: DSHBIO_SPLITBED { - ext.suffix = '.' + ext.prefix = { "${meta.id}." } ext.args = '--records 2' } diff --git a/tests/modules/dshbio/splitgff3/nextflow.config b/tests/modules/dshbio/splitgff3/nextflow.config index e31f8e13..f6a0b921 100644 --- a/tests/modules/dshbio/splitgff3/nextflow.config +++ b/tests/modules/dshbio/splitgff3/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: DSHBIO_SPLITGFF3 { - ext.suffix = '.' + ext.prefix = { "${meta.id}." } ext.args = '--records 15' } diff --git a/tests/modules/fgbio/callmolecularconsensusreads/nextflow.config b/tests/modules/fgbio/callmolecularconsensusreads/nextflow.config index 0a266da9..e6721ff6 100644 --- a/tests/modules/fgbio/callmolecularconsensusreads/nextflow.config +++ b/tests/modules/fgbio/callmolecularconsensusreads/nextflow.config @@ -4,12 +4,12 @@ process { withName: FGBIO_SORTBAM { ext.args = '-s TemplateCoordinate' - ext.suffix = '_out' + ext.prefix = { "${meta.id}_out" } } withName: FGBIO_CALLMOLECULARCONSENSUSREADS { ext.args = '-M 1' - ext.suffix = '_molreads' + ext.prefix = { "${meta.id}_molreads" } } } diff --git a/tests/modules/gatk4/createsomaticpanelofnormals/nextflow.config b/tests/modules/gatk4/createsomaticpanelofnormals/nextflow.config index 6fda39ec..d73e78ad 100644 --- a/tests/modules/gatk4/createsomaticpanelofnormals/nextflow.config +++ b/tests/modules/gatk4/createsomaticpanelofnormals/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: GATK4_CREATESOMATICPANELOFNORMALS { - ext.suffix = '.pon' + ext.prefix = { "${meta.id}.pon" } } } diff --git a/tests/modules/gatk4/filtermutectcalls/nextflow.config b/tests/modules/gatk4/filtermutectcalls/nextflow.config index c830fdc6..3d4148d2 100644 --- a/tests/modules/gatk4/filtermutectcalls/nextflow.config +++ b/tests/modules/gatk4/filtermutectcalls/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: GATK4_FILTERMUTECTCALLS { - ext.suffix = '.filtered' + ext.prefix = { "${meta.id}.filtered" } } } diff --git a/tests/modules/gatk4/genotypegvcfs/nextflow.config b/tests/modules/gatk4/genotypegvcfs/nextflow.config index aaa704da..97396a74 100644 --- a/tests/modules/gatk4/genotypegvcfs/nextflow.config +++ b/tests/modules/gatk4/genotypegvcfs/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: GATK4_GENOTYPEGVCFS { - ext.suffix = '.genotyped' + ext.prefix = { "${meta.id}.genotyped" } } } diff --git a/tests/modules/gatk4/learnreadorientationmodel/nextflow.config b/tests/modules/gatk4/learnreadorientationmodel/nextflow.config index 3a74623a..463e2d54 100644 --- a/tests/modules/gatk4/learnreadorientationmodel/nextflow.config +++ b/tests/modules/gatk4/learnreadorientationmodel/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: GATK4_LEARNREADORIENTATIONMODEL { - ext.suffix = '.artifact-prior' + ext.prefix = { "${meta.id}.artifact-prior" } } } diff --git a/tests/modules/gatk4/variantfiltration/nextflow.config b/tests/modules/gatk4/variantfiltration/nextflow.config index ff2feb9c..4b930f28 100644 --- a/tests/modules/gatk4/variantfiltration/nextflow.config +++ b/tests/modules/gatk4/variantfiltration/nextflow.config @@ -4,7 +4,7 @@ process { withName: GATK4_VARIANTFILTRATION { ext.args = "--filter-name \'test_filter\' --filter-expression \'MQ0 > 0\'" - ext.suffix = '.filtered' + ext.prefix = { "${meta.id}.filtered" } } } diff --git a/tests/modules/gffread/nextflow.config b/tests/modules/gffread/nextflow.config index 00c052f5..c020f934 100644 --- a/tests/modules/gffread/nextflow.config +++ b/tests/modules/gffread/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: GFFREAD { - ext.suffix = '.out' + ext.prefix = { "${meta.id}.out" } } } diff --git a/tests/modules/gstama/collapse/nextflow.config b/tests/modules/gstama/collapse/nextflow.config index 0455c8b2..a68f33f2 100644 --- a/tests/modules/gstama/collapse/nextflow.config +++ b/tests/modules/gstama/collapse/nextflow.config @@ -4,7 +4,7 @@ process { withName: GSTAMA_COLLAPSE { ext.args = '-x capped -b BAM' - ext.suffix = '_tc' + ext.prefix = { "${meta.id}_tc" } } } diff --git a/tests/modules/gstama/merge/nextflow.config b/tests/modules/gstama/merge/nextflow.config index a9c63fcf..e0d7c8ef 100644 --- a/tests/modules/gstama/merge/nextflow.config +++ b/tests/modules/gstama/merge/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: GSTAMA_MERGE { - ext.suffix = '_merged' + ext.prefix = { "${meta.id}_merged" } } } diff --git a/tests/modules/isoseq3/refine/nextflow.config b/tests/modules/isoseq3/refine/nextflow.config index 88f1bdc4..6a4dea9f 100644 --- a/tests/modules/isoseq3/refine/nextflow.config +++ b/tests/modules/isoseq3/refine/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: ISOSEQ3_REFINE { - ext.suffix = '.refine' + ext.prefix = { "${meta.id}.refine" } } } diff --git a/tests/modules/last/postmask/nextflow.config b/tests/modules/last/postmask/nextflow.config index dc021264..70c3f35b 100644 --- a/tests/modules/last/postmask/nextflow.config +++ b/tests/modules/last/postmask/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: LAST_POSTMASK { - ext.suffix = '.postmask' + ext.prefix = { "${meta.id}.postmask" } } } diff --git a/tests/modules/last/split/nextflow.config b/tests/modules/last/split/nextflow.config index 8b31ca0f..6252ec14 100644 --- a/tests/modules/last/split/nextflow.config +++ b/tests/modules/last/split/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: LAST_SPLIT { - ext.suffix = '.split' + ext.prefix = { "${meta.id}.split" } } } diff --git a/tests/modules/lima/nextflow.config b/tests/modules/lima/nextflow.config index 5091b034..8da2613f 100644 --- a/tests/modules/lima/nextflow.config +++ b/tests/modules/lima/nextflow.config @@ -4,7 +4,7 @@ process { withName: LIMA { ext.args = '--isoseq --peek-guess' - ext.suffix = '.fl' + ext.prefix = { "${meta.id}.fl" } } } diff --git a/tests/modules/lofreq/indelqual/nextflow.config b/tests/modules/lofreq/indelqual/nextflow.config index b9ad2787..c50c1363 100644 --- a/tests/modules/lofreq/indelqual/nextflow.config +++ b/tests/modules/lofreq/indelqual/nextflow.config @@ -4,7 +4,7 @@ process { withName: LOFREQ_INDELQUAL { ext.args = '--dindel' - ext.suffix = '.indelqual' + ext.prefix = { "${meta.id}.indelqual" } } } diff --git a/tests/modules/medaka/nextflow.config b/tests/modules/medaka/nextflow.config index 1f89be62..c0b1b507 100644 --- a/tests/modules/medaka/nextflow.config +++ b/tests/modules/medaka/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: MEDAKA { - ext.suffix = '.polished.genome' + ext.prefix = { "${meta.id}.polished.genome" } } } diff --git a/tests/modules/metaphlan3/nextflow.config b/tests/modules/metaphlan3/nextflow.config index 2dde2212..a47b46e0 100644 --- a/tests/modules/metaphlan3/nextflow.config +++ b/tests/modules/metaphlan3/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: SAMTOOLS_VIEW { - ext.suffix = '.sam' + ext.prefix = { "${meta.id}.sam" } } withName: METAPHLAN3 { diff --git a/tests/modules/miniasm/nextflow.config b/tests/modules/miniasm/nextflow.config index 844a0120..23f0a8d0 100644 --- a/tests/modules/miniasm/nextflow.config +++ b/tests/modules/miniasm/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: MINIASM { - ext.suffix = '.assembly' + ext.prefix = { "${meta.id}.assembly" } } } diff --git a/tests/modules/nanolyse/nextflow.config b/tests/modules/nanolyse/nextflow.config index ede080cc..5f7b5bed 100644 --- a/tests/modules/nanolyse/nextflow.config +++ b/tests/modules/nanolyse/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: NANOLYSE { - ext.suffix = '.clean' + ext.prefix = { "${meta.id}.clean" } } } diff --git a/tests/modules/pairtools/dedup/nextflow.config b/tests/modules/pairtools/dedup/nextflow.config index 1de3348f..b47fab16 100644 --- a/tests/modules/pairtools/dedup/nextflow.config +++ b/tests/modules/pairtools/dedup/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PAIRTOOLS_DEDUP { - ext.suffix = '.dedup' + ext.prefix = { "${meta.id}.dedup" } } } diff --git a/tests/modules/pairtools/parse/nextflow.config b/tests/modules/pairtools/parse/nextflow.config index 1a1182f6..a5d3ef9d 100644 --- a/tests/modules/pairtools/parse/nextflow.config +++ b/tests/modules/pairtools/parse/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PAIRTOOLS_PARSE { - ext.suffix = '.raw' + ext.prefix = { "${meta.id}.raw" } } } diff --git a/tests/modules/pairtools/restrict/nextflow.config b/tests/modules/pairtools/restrict/nextflow.config index 857d7534..fa8217bc 100644 --- a/tests/modules/pairtools/restrict/nextflow.config +++ b/tests/modules/pairtools/restrict/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PAIRTOOLS_RESTRICT { - ext.suffix = '.restrict' + ext.prefix = { "${meta.id}.restrict" } } } diff --git a/tests/modules/pairtools/sort/nextflow.config b/tests/modules/pairtools/sort/nextflow.config index 86b3d802..dfaf6053 100644 --- a/tests/modules/pairtools/sort/nextflow.config +++ b/tests/modules/pairtools/sort/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PAIRTOOLS_SORT { - ext.suffix = '.sorted' + ext.prefix = { "${meta.id}.sorted" } } } diff --git a/tests/modules/pbbam/pbmerge/nextflow.config b/tests/modules/pbbam/pbmerge/nextflow.config index c897068b..4fc270a9 100644 --- a/tests/modules/pbbam/pbmerge/nextflow.config +++ b/tests/modules/pbbam/pbmerge/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PBBAM_PBMERGE { - ext.suffix = '.merged' + ext.prefix = { "${meta.id}.merged" } } } diff --git a/tests/modules/picard/filtersamreads/nextflow.config b/tests/modules/picard/filtersamreads/nextflow.config index e9ce4914..653e9633 100644 --- a/tests/modules/picard/filtersamreads/nextflow.config +++ b/tests/modules/picard/filtersamreads/nextflow.config @@ -3,11 +3,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PICARD_SORTSAM { - ext.suffix = '.sorted' + ext.prefix = { "${meta.id}.sorted" } } withName: PICARD_FILTERSAMREADS { - ext.suffix = '.filtered' + ext.prefix = { "${meta.id}.filtered" } } } diff --git a/tests/modules/picard/sortsam/nextflow.config b/tests/modules/picard/sortsam/nextflow.config index 2c290cbe..ca572c2f 100644 --- a/tests/modules/picard/sortsam/nextflow.config +++ b/tests/modules/picard/sortsam/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PICARD_SORTSAM { - ext.suffix = '.sorted' + ext.prefix = { "${meta.id}.sorted" } } } diff --git a/tests/modules/plink/extract/nextflow.config b/tests/modules/plink/extract/nextflow.config index 12668b01..6a7f6d42 100644 --- a/tests/modules/plink/extract/nextflow.config +++ b/tests/modules/plink/extract/nextflow.config @@ -7,7 +7,7 @@ process { } withName: PLINK_EXTRACT { - ext.suffix = '.extract' + ext.prefix = { "${meta.id}.extract" } } } diff --git a/tests/modules/porechop/nextflow.config b/tests/modules/porechop/nextflow.config index 3a0536b0..85eb257a 100644 --- a/tests/modules/porechop/nextflow.config +++ b/tests/modules/porechop/nextflow.config @@ -4,7 +4,7 @@ process { withName: PORECHOP { ext.args = '' - ext.suffix = '_porechop' + ext.prefix = { "${meta.id}_porechop" } } } diff --git a/tests/modules/rasusa/nextflow.config b/tests/modules/rasusa/nextflow.config index fea844ae..50c32e5c 100644 --- a/tests/modules/rasusa/nextflow.config +++ b/tests/modules/rasusa/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: RASUSA { - ext.suffix = '_100X' + ext.prefix = { "${meta.id}_100X" } } } diff --git a/tests/modules/samblaster/nextflow.config b/tests/modules/samblaster/nextflow.config index 3018088b..7ba8b23b 100644 --- a/tests/modules/samblaster/nextflow.config +++ b/tests/modules/samblaster/nextflow.config @@ -4,7 +4,7 @@ process { withName: SAMBLASTER { ext.args = '-M --addMateTags' - ext.suffix = '.processed' + ext.prefix = { "${meta.id}.processed" } } } diff --git a/tests/modules/samtools/merge/nextflow.config b/tests/modules/samtools/merge/nextflow.config index cb350bf7..4ac70fa0 100644 --- a/tests/modules/samtools/merge/nextflow.config +++ b/tests/modules/samtools/merge/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: SAMTOOLS_MERGE { - ext.suffix = '_merged' + ext.prefix = { "${meta.id}_merged" } } } diff --git a/tests/modules/samtools/sort/nextflow.config b/tests/modules/samtools/sort/nextflow.config index 57ae6280..230bec5f 100644 --- a/tests/modules/samtools/sort/nextflow.config +++ b/tests/modules/samtools/sort/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: SAMTOOLS_SORT { - ext.suffix = '.sorted' + ext.prefix = { "${meta.id}.sorted" } } } diff --git a/tests/modules/seqtk/mergepe/nextflow.config b/tests/modules/seqtk/mergepe/nextflow.config index b14e72ff..04eeef72 100644 --- a/tests/modules/seqtk/mergepe/nextflow.config +++ b/tests/modules/seqtk/mergepe/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: SEQTK_MERGEPE { - ext.suffix = '.processed' + ext.prefix = { "${meta.id}.processed" } } } diff --git a/tests/modules/seqtk/sample/nextflow.config b/tests/modules/seqtk/sample/nextflow.config index 3efac50d..a79ad290 100644 --- a/tests/modules/seqtk/sample/nextflow.config +++ b/tests/modules/seqtk/sample/nextflow.config @@ -4,7 +4,7 @@ process { withName: SEQTK_SAMPLE { ext.args = '-s100' - ext.suffix = '.sampled' + ext.prefix = { "${meta.id}.sampled" } } } diff --git a/tests/modules/seqtk/subseq/nextflow.config b/tests/modules/seqtk/subseq/nextflow.config index c61c4a74..24f16bad 100644 --- a/tests/modules/seqtk/subseq/nextflow.config +++ b/tests/modules/seqtk/subseq/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: SEQTK_SUBSEQ { - ext.suffix = '.filtered' + ext.prefix = { "${meta.id}.filtered" } } } diff --git a/tests/modules/ucsc/bedclip/nextflow.config b/tests/modules/ucsc/bedclip/nextflow.config index 4adc3b8f..46af4b0a 100644 --- a/tests/modules/ucsc/bedclip/nextflow.config +++ b/tests/modules/ucsc/bedclip/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: UCSC_BEDCLIP { - ext.suffix = '.clip' + ext.prefix = { "${meta.id}.clip" } } } diff --git a/tests/modules/ultra/pipeline/nextflow.config b/tests/modules/ultra/pipeline/nextflow.config index a3b88ea3..16ed7f9b 100644 --- a/tests/modules/ultra/pipeline/nextflow.config +++ b/tests/modules/ultra/pipeline/nextflow.config @@ -4,7 +4,7 @@ process { withName: GFFREAD { ext.args = '--sort-alpha --keep-genes -T' - ext.suffix = '_sorted' + ext.prefix = { "${meta.id}_sorted" } } }