nextflow-io / nextflow-io/nextflow
Print workflow output variables only when they contain results
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 3.5k
- Forks
- 811
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 61
Description
New feature
Allow printing of workflow output variables (PR #6875) only when they contain results, to avoid displaying empty variables in the final logs.
Use case
In a Nextflow workflow using a switch/case process structure, some branches may not produce results depending on the input parameters. Currently, all output variables are printed in the final logs, including empty ones (e.g., afMassiveAlphaFillpredictions:, afMassiveAlphaFillMultiQC:).
This makes the final output less readable and less informative, as users must manually filter out empty variables to identify relevant results.
Outputs:
/[...]/results_workflow_output
afMassiveAlphaFillpredictions:
afMassiveAlphaFillMultiQC:
colabFoldSearchResult:
- [BTB-domain, colabFoldSearch/BTB-domain]
colabFoldSearchVersions:
- colabFoldSearch/versions.txt
colabFoldSearchOptions:
- colabFoldSearch/options.txt
Outputs:
/[...]/results_workflow_output
colabFoldSearchResult:
- [BTB-domain, colabFoldSearch/BTB-domain]
colabFoldSearchVersions:
- colabFoldSearch/versions.txt
colabFoldSearchOptions:
- colabFoldSearch/options.txt
Suggested implementation
Introduce an option or mechanism to:
- Automatically detect if a variable/channel is empty before printing it.
- Skip printing empty variables in the final human-readable output.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read PR #6875 first, then locate the code that renders workflow output variables in the final human-readable logs. Trace how empty channels or variables are represented and add coverage for a switch/case workflow with unused outputs; done means empty variables are omitted while populated outputs remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100