Skip to content

Print workflow output variables only when they contain results #7080

@QuentinDuvertCurie

Description

@QuentinDuvertCurie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions