Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace publishDir with workflow output definition #27

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
15 changes: 10 additions & 5 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -56,9 +58,12 @@ workflow {
MULTIQC( RNASEQ.out, params.multiqc )
}

/*
* completion handler
*/
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 {
index {
path 'index.csv'
}
}
}
7 changes: 4 additions & 3 deletions modules/fastqc/main.nf
Original file line number Diff line number Diff line change
@@ -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:
"""
Expand Down
7 changes: 4 additions & 3 deletions modules/multiqc/main.nf
Original file line number Diff line number Diff line change
@@ -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:
"""
Expand Down
2 changes: 1 addition & 1 deletion modules/rnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ workflow RNASEQ {

emit:
QUANT.out | concat(FASTQC.out) | collect
}
}
Loading