Skip to content

Commit

Permalink
Replace publishDir with workflow output definition
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Apr 12, 2024
1 parent 8253a58 commit 2d653c3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
13 changes: 13 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 '.'
}
}
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

0 comments on commit 2d653c3

Please sign in to comment.