Jim Downie
10/16/2026, 12:33 PMAll ext variables SHOULD be specified as a independent directive of the modules instead using def prefix = ... in the script block (based on <https://github.com/nf-core/modules/pull/8808/changes>). These variables SHOULD be defined as closures to make sure these work in all cases.
Looking at the example I find this more unclear than the existing pattern as the definition is moved further away from where it is used.Ben Sherman
10/16/2026, 2:05 PMdef args = task.ext.args ?: args ?: <default>Jim Downie
10/16/2026, 2:13 PMBen Sherman
10/16/2026, 2:24 PMdef args / def prefix declarations in script/stub
But I think a better solution would be to leave it for now and see if we can have nextflow auto-generate the stub block insteadBen Sherman
10/16/2026, 2:26 PMext [
prefix: { output_prefix ?: "${meta.id}" },
args: { samtools_stats_args ?: '' }
]Nicolas Vannieuwkerke
10/16/2026, 2:35 PMtask.ext.<?>Ben Sherman
10/16/2026, 2:42 PMNicolas Vannieuwkerke
10/16/2026, 2:44 PM