From 2d653c3fcd0df576475fb5fde14c799a435cb766 Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Fri, 12 Apr 2024 08:08:05 -0500 Subject: [PATCH 1/7] Replace publishDir with workflow output definition Signed-off-by: Ben Sherman --- main.nf | 13 +++++++++++++ modules/fastqc/main.nf | 7 ++++--- modules/multiqc/main.nf | 7 ++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/main.nf b/main.nf index 77d2d70..c69076f 100755 --- a/main.nf +++ b/main.nf @@ -62,3 +62,16 @@ workflow { workflow.onComplete { log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) } + +output { + directory params.outdir + mode 'copy' + + 'fastqc' { + path '.' + } + + 'multiqc' { + path '.' + } +} diff --git a/modules/fastqc/main.nf b/modules/fastqc/main.nf index cd58cbb..d53d396 100644 --- a/modules/fastqc/main.nf +++ b/modules/fastqc/main.nf @@ -1,15 +1,16 @@ -params.outdir = 'results' process FASTQC { tag "FASTQC on $sample_id" conda 'fastqc=0.12.1' - publishDir params.outdir, mode:'copy' input: tuple val(sample_id), path(reads) output: - path "fastqc_${sample_id}_logs" + path "fastqc_${sample_id}_logs", emit: logs + + publish: + logs >> 'fastqc' script: """ diff --git a/modules/multiqc/main.nf b/modules/multiqc/main.nf index a390282..f7c0463 100644 --- a/modules/multiqc/main.nf +++ b/modules/multiqc/main.nf @@ -1,15 +1,16 @@ -params.outdir = 'results' process MULTIQC { conda 'multiqc=1.17' - publishDir params.outdir, mode:'copy' input: path('*') path(config) output: - path('multiqc_report.html') + path('multiqc_report.html'), emit: report + + publish: + report >> 'multiqc' script: """ From 0c08ad8c0a20ab57fd680e036b014a965e040855 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Mon, 6 May 2024 12:40:12 +0200 Subject: [PATCH 2/7] wip Signed-off-by: Paolo Di Tommaso --- main.nf | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/main.nf b/main.nf index c69076f..826a40f 100755 --- a/main.nf +++ b/main.nf @@ -24,6 +24,7 @@ * enables modules */ nextflow.enable.dsl = 2 +nextflow.preview.publish = true /* * Default pipeline parameters. They can be overriden on the command line eg. @@ -63,15 +64,8 @@ workflow.onComplete { log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) } -output { +publish { directory params.outdir mode 'copy' - 'fastqc' { - path '.' - } - - 'multiqc' { - path '.' - } } From 4ca46a3b25d756c36a58c5351e2a1ab7310c6eaf Mon Sep 17 00:00:00 2001 From: Dr Marco Claudio De La Pierre Date: Wed, 8 May 2024 16:38:05 +0800 Subject: [PATCH 3/7] publish path redirection in modules Signed-off-by: Dr Marco Claudio De La Pierre --- main.nf | 10 ++-------- modules/fastqc/main.nf | 2 +- modules/multiqc/main.nf | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/main.nf b/main.nf index c69076f..fda13ea 100755 --- a/main.nf +++ b/main.nf @@ -25,6 +25,8 @@ */ nextflow.enable.dsl = 2 +nextflow.preview.output = true + /* * Default pipeline parameters. They can be overriden on the command line eg. * given `params.foo` specify on the run command line `--foo some_value`. @@ -66,12 +68,4 @@ workflow.onComplete { output { directory params.outdir mode 'copy' - - 'fastqc' { - path '.' - } - - 'multiqc' { - path '.' - } } diff --git a/modules/fastqc/main.nf b/modules/fastqc/main.nf index d53d396..a0a139c 100644 --- a/modules/fastqc/main.nf +++ b/modules/fastqc/main.nf @@ -10,7 +10,7 @@ process FASTQC { path "fastqc_${sample_id}_logs", emit: logs publish: - logs >> 'fastqc' + logs >> '.' script: """ diff --git a/modules/multiqc/main.nf b/modules/multiqc/main.nf index f7c0463..e2a35a7 100644 --- a/modules/multiqc/main.nf +++ b/modules/multiqc/main.nf @@ -10,7 +10,7 @@ process MULTIQC { path('multiqc_report.html'), emit: report publish: - report >> 'multiqc' + report >> '.' script: """ From 772d1790d89d2c30073345445420ead6ed4b0ca9 Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Tue, 7 May 2024 21:56:51 -0500 Subject: [PATCH 4/7] Move publish redirects to workflows Signed-off-by: Ben Sherman --- main.nf | 3 +++ modules/fastqc/main.nf | 2 +- modules/multiqc/main.nf | 2 +- modules/rnaseq.nf | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/main.nf b/main.nf index fda13ea..3fa1353 100755 --- a/main.nf +++ b/main.nf @@ -56,6 +56,9 @@ workflow { read_pairs_ch = channel.fromFilePairs( params.reads, checkIfExists: true ) RNASEQ( params.transcriptome, read_pairs_ch ) MULTIQC( RNASEQ.out, params.multiqc ) + + publish: + MULTIQC.out >> '.' } /* diff --git a/modules/fastqc/main.nf b/modules/fastqc/main.nf index a0a139c..d53d396 100644 --- a/modules/fastqc/main.nf +++ b/modules/fastqc/main.nf @@ -10,7 +10,7 @@ process FASTQC { path "fastqc_${sample_id}_logs", emit: logs publish: - logs >> '.' + logs >> 'fastqc' script: """ diff --git a/modules/multiqc/main.nf b/modules/multiqc/main.nf index e2a35a7..f7c0463 100644 --- a/modules/multiqc/main.nf +++ b/modules/multiqc/main.nf @@ -10,7 +10,7 @@ process MULTIQC { path('multiqc_report.html'), emit: report publish: - report >> '.' + report >> 'multiqc' script: """ diff --git a/modules/rnaseq.nf b/modules/rnaseq.nf index 2f607c1..1146f7a 100644 --- a/modules/rnaseq.nf +++ b/modules/rnaseq.nf @@ -16,4 +16,7 @@ workflow RNASEQ { emit: QUANT.out | concat(FASTQC.out) | collect + + publish: + FASTQC.out >> '.' } \ No newline at end of file From bb44e647a651d95b592dd05e449494b7f6a40234 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Mon, 13 May 2024 12:04:37 +0200 Subject: [PATCH 5/7] Remove workflow publish redirection Signed-off-by: Paolo Di Tommaso --- main.nf | 3 --- 1 file changed, 3 deletions(-) diff --git a/main.nf b/main.nf index ed8ff90..6e7ed47 100755 --- a/main.nf +++ b/main.nf @@ -56,9 +56,6 @@ workflow { read_pairs_ch = channel.fromFilePairs( params.reads, checkIfExists: true ) RNASEQ( params.transcriptome, read_pairs_ch ) MULTIQC( RNASEQ.out, params.multiqc ) - - publish: - MULTIQC.out >> '.' } output { From aeb55255aca0088013541ce6ad30d49b912e64ad Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Wed, 15 May 2024 14:48:22 +0200 Subject: [PATCH 6/7] Remove publish from workflow Signed-off-by: Paolo Di Tommaso --- modules/rnaseq.nf | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/rnaseq.nf b/modules/rnaseq.nf index 8348c30..b8f45df 100644 --- a/modules/rnaseq.nf +++ b/modules/rnaseq.nf @@ -16,7 +16,4 @@ workflow RNASEQ { emit: QUANT.out | concat(FASTQC.out) | collect - - publish: - FASTQC.out >> '.' } From 267981b80d13b06d615a55eae6f4486b2f85b535 Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Sun, 19 May 2024 12:42:23 -0500 Subject: [PATCH 7/7] Add index file Signed-off-by: Ben Sherman --- main.nf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.nf b/main.nf index 6e7ed47..ab37c81 100755 --- a/main.nf +++ b/main.nf @@ -61,4 +61,9 @@ workflow { output { directory params.outdir mode 'copy' + fastqc { + index { + path 'index.csv' + } + } }