nextflow-io / nextflow-io/nextflow

Print workflow output variables only when they contain results

Open
#7,080 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

triage/investigate
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.