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
Inputs
Section titled “Inputs”| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta_file | file | Path to a meta.yml file from which to extract default options. | True | *.yml |
| options | map | User-provided options to merge with defaults. Map of option key-value pairs. | True | |
| strict | boolean | If true, only allow options that exist in defaults (unknown options will be ignored with a warning). If false, all provided options are accepted. | False |
Outputs
Section titled “Outputs”| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| options | map | Channel 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)
| True | |
| versions | file | File containing software versions (empty for this utility subworkflow) Structure : tuple path(versions)
| True | versions.yml |
Authors
Section titled “Authors”Last updated : 2026-03-17