From e707e28a4ad0c55acf1b95a76ff3ad9144e29a0c Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Fri, 26 Jan 2024 14:49:14 +0100 Subject: [PATCH] Final outputpath fixes --- conf/modules.config | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index b6edc20c..b57e4f92 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -73,7 +73,7 @@ process { ] ] } - withName: '.*:.*:FASTQC_UMITOOLS_FASTP:FASTQC_RAW' { + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_RAW' { ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/raw" }, @@ -81,7 +81,7 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: '.*:.*:FASTQC_UMITOOLS_FASTP:FASTQC_TRIM' { + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_TRIM' { ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/trimmed" }, @@ -166,7 +166,7 @@ process { ext.args = { meta.single_end ? "--algo ${params.umitools_method} --two-pass" : "--method ${params.umitools_method} --two-pass --paired --remove-unpaired --remove-chimeric" } ext.prefix = { "${meta.id}.umi_dedup.sorted" } publishDir = [ - path: { "${params.outdir}/bam_deduplicated" }, + path: { "${params.outdir}/umi_dedup/bam_deduplicated" }, mode: params.publish_dir_mode, pattern: '*.bam', enabled: ( @@ -178,6 +178,7 @@ process { publishDir = [ path: { "${params.outdir}/umi_dedup/fastq_deduplicated" }, mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, enabled: ( params.save_umi_intermeds ) @@ -189,7 +190,8 @@ process { // withName: 'MIRTRACE_RUN' { publishDir = [ - path: { "${params.outdir}/mirtrace" }, + //"mirtrace" already part of the published folder + path: { "${params.outdir}" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -237,14 +239,30 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: 'NFCORE_SMRNASEQ:SMRNASEQ:MIRNA_QUANT:(BOWTIE_MAP_MATURE|BAM_STATS_MATURE).*' { + withName: 'NFCORE_SMRNASEQ:SMRNASEQ:MIRNA_QUANT:BOWTIE_MAP_MATURE' { publishDir = [ path: { "${params.outdir}/mirna_quant/bam/mature" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: 'NFCORE_SMRNASEQ:SMRNASEQ:MIRNA_QUANT:(BOWTIE_MAP_HAIRPIN|BAM_STATS_HAIRPIN).*' { + withName: 'NFCORE_SMRNASEQ:SMRNASEQ:MIRNA_QUANT:BAM_STATS_MATURE:.*' { + ext.prefix = { "${meta.id}.sorted" } + publishDir = [ + path: { "${params.outdir}/mirna_quant/bam/mature" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: 'NFCORE_SMRNASEQ:SMRNASEQ:MIRNA_QUANT:BOWTIE_MAP_HAIRPIN' { + publishDir = [ + path: { "${params.outdir}/mirna_quant/bam/hairpin" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: 'NFCORE_SMRNASEQ:SMRNASEQ:MIRNA_QUANT:BAM_STATS_HAIRPIN:.*' { + ext.prefix = { "${meta.id}.sorted" } publishDir = [ path: { "${params.outdir}/mirna_quant/bam/hairpin" }, mode: params.publish_dir_mode, @@ -265,9 +283,17 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } + withName: 'NFCORE_SMRNASEQ:SMRNASEQ:MIRNA_QUANT:BOWTIE_MAP_SEQCLUSTER' { + publishDir = [ + path: { "${params.outdir}/mirna_quant/bam/seqcluster" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } withName: 'MIRTOP_QUANT' { publishDir = [ - path: { "${params.outdir}/mirna_quant/mirtop" }, + //mirtop already part of the output folder + path: { "${params.outdir}/mirna_quant/" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -302,9 +328,9 @@ process { } withName: 'NFCORE_SMRNASEQ:SMRNASEQ:GENOME_QUANT:BOWTIE_MAP_GENOME' { publishDir = [ - path: { "${params.outdir}/unmapped/bam" }, + path: { "${params.outdir}/genome_quant/bam" }, mode: params.publish_dir_mode, - pattern: "unmapped/*.gz" + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] }