Skip to content

utils_options

Utility subworkflow for managing and comparing workflow options with defaults defined in meta.yml files. This subworkflow provides functionality to:
- Parse default option values from a subworkflow’s meta.yml file (from the ‘default’ field)
- Compare provided options with defaults
- Merge provided options with defaults (with optional strict mode)
- Report differences between provided and default options
- Validate required options

The subworkflow extracts default option values from the ‘default’ field of the ‘options’ input in the meta.yml file and compares them with user-provided options. It can operate in two modes:
1. Standard mode: Accepts all provided options and fills in missing ones with defaults
2. Strict mode: Only allows options that are defined in the defaults (rejects unknown options)

This is particularly useful for subworkflows like preproc_dwi that have many configurable boolean options controlling which processing steps to run.

Keywords : options, configuration, validation, defaults, comparison


TypeDescriptionMandatoryPattern
meta_filefilePath to a meta.yml file from which to extract default options.
True*.yml
optionsmapUser-provided options to merge with defaults. Map of option key-value pairs.
True
strictbooleanIf true, only allow options that exist in defaults (unknown options will be ignored with a warning). If false, all provided options are accepted.
False

TypeDescriptionMandatoryPattern
optionsmapChannel containing the final merged options (provided options + defaults for missing keys). Contains merged_options as a Map of option key-value pairs.

Structure : tuple val(merged_options)
  • merged_options [map] Map of merged option key-value pairs.
True
versionsfileFile containing software versions (empty for this utility subworkflow)

Structure : tuple path(versions)
  • versions [file] Versions YAML file.
Trueversions.yml


Last updated : 2026-03-17