-
Notifications
You must be signed in to change notification settings - Fork 692
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
Workflow output definition #1227
base: dev
Are you sure you want to change the base?
Changes from all commits
783ff86
b572f52
2a93c91
daf61c7
69f258e
45ec2ef
9af6803
635203c
44af165
3ee5753
6719138
434024e
bd3d6ed
54b1f6f
a8248d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,16 @@ process DESEQ2_QC { | |
path "size_factors" , optional:true, emit: size_factors | ||
path "versions.yml" , emit: versions | ||
|
||
publish: | ||
pdf >> 'deseq2' | ||
Comment on lines
+27
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was surprising to still see the publish directive in the process block. Why this way then instead of: output:
path "*.pdf" , optional:true, emit: pdf, publish: 'deseq2' i.e. instead of making There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess I wanted the publish definition to be in one place so that it's easier to review. But also, I think the separate |
||
rdata >> 'deseq2' | ||
pca_txt >> 'deseq2' | ||
pca_multiqc >> 'deseq2' | ||
dists_txt >> 'deseq2' | ||
dists_multiqc >> 'deseq2' | ||
log >> 'deseq2' | ||
size_factors >> 'deseq2' | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
|
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,16 @@ workflow ALIGN_STAR { | |
BAM_SORT_STATS_SAMTOOLS ( ch_orig_bam, fasta ) | ||
ch_versions = ch_versions.mix(BAM_SORT_STATS_SAMTOOLS.out.versions) | ||
|
||
publish: | ||
ch_orig_bam >> (params.save_align_intermeds || params.save_umi_intermeds ? 'star_salmon/' : null) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fine for specific pipelines, but makes module reusability across pipelines more cumbersome. If we need to have ternary operators in every nf-core module to control whether an output is published, this would make the pipeline schema, potentially huge. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, I cut some corners here by not passing the params as workflow inputs. In the final implementation I would do that so that you can choose whether to expose it as a param in your own pipeline |
||
ch_log_final >> 'star_salmon/log/' | ||
ch_log_out >> 'star_salmon/log/' | ||
ch_log_progress >> 'star_salmon/log/' | ||
ch_bam_sorted >> (params.save_align_intermeds || params.save_umi_intermeds ? 'star_salmon/' : null) | ||
ch_bam_transcript >> (params.save_align_intermeds || params.save_umi_intermeds ? 'star_salmon/' : null) | ||
ch_fastq >> (params.save_unaligned ? 'star_salmon/unmapped/' : null) | ||
ch_tab >> 'star_salmon/log/' | ||
|
||
emit: | ||
orig_bam = ch_orig_bam // channel: [ val(meta), bam ] | ||
log_final = ch_log_final // channel: [ val(meta), log_final ] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be set in
nextflow.config
@bentsherman?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not currently, but should be considered as a future improvement. If we don't need the target-specific config in the output block, would be better IMO to make these config settings instead of pipeline code + params.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer this as a scope in the config rather than in the
main.nf
.I was also thinking to allow different modes for files matching different patterns or properties, e.g. large files are symlinked, rather than copied, but this is an extra.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that they should be config. Much less flexible for the user if you have to define a param just to make it configurable
For now you can customize things like the mode for specific targets, though that it not as granular as what you describe