Andrea Bagnacani
09/09/2025, 4:19 PMmodules/nf-core/samtools/view twice:
- The 1st time within some subworkflow, using parameters, e.g., -F 2304
- The 2nd time within a different subworkflow, using parameters, e.g., -f 2304
However, I cannot configure the module to use either parameters, because I cannot scope process configurations to a specific subworkflow.
If I extended my global nextflow.config with
process {
withName: 'SAMTOOLS_VIEW' {
ext.args = { "-F 2304" }
}
}
then samtools view always runs with the -F 2304 argument.
What's the Nextflow way of achieving this? Shall I patch modules/nf-core/samtools/view?Maxime Garcia
09/09/2025, 4:28 PMinclude { SAMTOOLS_VIEW as SAMTOOLS_VIEW_1 } from '../../modules/nf-core/samtools/view'
include { SAMTOOLS_VIEW as SAMTOOLS_VIEW_2 } from '../../modules/nf-core/samtools/view'
process {
withName: 'SAMTOOLS_VIEW_1' {
ext.args = { "-F 2304" }
}
withName: 'SAMTOOLS_VIEW_2' {
ext.args = { "-f 2304" }
}
}Maxime Garcia
09/09/2025, 4:29 PMMaxime Garcia
09/09/2025, 4:29 PMMaxime Garcia
09/09/2025, 4:30 PMprocess {
withName: '.*:SUBWORKFLOW1:SAMTOOLS_VIEW' {
ext.args = { "-F 2304" }
}
withName: '*:SUBWORKFLOW2:AMTOOLS_VIEW' {
ext.args = { "-f 2304" }
}
}Maxime Garcia
09/09/2025, 4:30 PMAndrea Bagnacani
09/09/2025, 6:36 PMas .
Your second solution looks great for my use case, thank you @Maxime Garcia 🙂Maxime Garcia
09/09/2025, 7:08 PM