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

Workflow outputs (second preview) #30

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

bentsherman
Copy link
Member

Second iteration based on #27

This PR takes a different approach to workflow outputs by defining a samples target instead of having a target for each tool. The difference is harder to see here since we only publish the fastqc logs for each sample, but it is more clear for nf-core pipelines like fetchngs and rnaseq.

I originally treated each tool as an output target, but then I realized that it makes more sense to have a single output target that joins all results pertaining to a sample. This makes it much easier for a downstream pipeline to consume the outputs, because now instead of joining multiple index files, a downstream pipeline need only take a subset from the one index file.

It also publishes the salmon output, which is not essential, but demonstrates the idea of a "sample" being all results associated with a particular sample id.

The multiqc target could also be called summary, to denote that it contains the all of the summary results.

bentsherman and others added 12 commits April 12, 2024 08:08
Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
…f into workflow-output-dsl

Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Ben Sherman <[email protected]>
Signed-off-by: Ben Sherman <[email protected]>

output {
samples {
path { id, _quant, _fastqc -> "${workflow.outputDir}/${id}" }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bug in the workflow output DSL, it is not resolving the dynamic name against the base output directory

Comment on lines +40 to +41
samples_ch = RNASEQ.out.quant
| join(RNASEQ.out.fastqc)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is the important bit -- we are joining the metadata, fastqc logs, and quant results for each sample into a single channel, and publishing that channel

then the path target directive is used to control the output directory structure

@bentsherman
Copy link
Member Author

The output directory looks like this:

$ find results/ | sort
results/
results/ggal_gut
results/ggal_gut/fastqc
results/ggal_gut/quant
results/index.json
results/multiqc_report.html

And the index file looks like this:

[
    {
        "id": "ggal_gut",
        "quant": "/home/bent/projects/nextflow-io_rnaseq-nf/results/quant",
        "fastqc": "/home/bent/projects/nextflow-io_rnaseq-nf/results/fastqc"
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants