No process matching config selector warnings¶
Problem¶
You are using a process twice in a pipeline in two different subworkflows. Additionally, both are optional to run, so you wrap them in if
statements.
You may need to provide each of them different publishDir
options so to disambiguate between the two in a configuration file, you differentiate them using a withName
selector and give them the fully resolved path name PIPELINE:WORKFLOW:SUBWORKFLOW:PROCESS
.
process {
withName: 'PIPELINE:WORKFLOW:SUBWORKFLOW_ONE:PROCESS' {
publishDir = [
path: { "${params.outdir}/PROCESS_ONE" },
]
}
withName: 'PIPELINE:WORKFLOW:SUBWORKFLOW_TWO:PROCESS' {
publishDir = [
path: { "${params.outdir}/PROCESS_TWO" },
]
}
}
This should be sufficient to distinguish between the two, right?
But then when you run your pipeline, with the if
statement around the module set to false
You suddenly get the following warnings:
WARN: There's no process matching config selector: <PIPELINE>:<WORKFLOW>:<SUBWORKFLOW_ONE>:<PROCESS>
WARN: There's no process matching config selector: <PIPELINE>:<WORKFLOW>:<SUBWORKFLOW_TWO>:<PROCESS>
...huh?
You can see the problem for yourself in an actual pipeline by using GitPod or getting a copy of the project and navigating to examples/process-selector-warn
. Where you execute the following command:
Solution¶
Apparently, the different ways of specifying a module using the withName
selector have different behaviours.
- Only an explicit module name can cope with 'optional' execution and have a selector still picked up, even if it's 'turned off'.
- Fully resolved paths or wildcarded
withName
selectors cannot be evaluated by Nextflow in this manner, and thus give you warnings like above.
Here, your solutions are:
-
Give each of the two processes a unique name via an alias and use that in the configuration file.
-
Make the
withName
selector for the module also conditional in the configuration file:
You can see the solution for yourself in an actual pipeline by using GitPod or getting a copy of the project and navigating to examples/process-selector-warn
. Where you execute the following command: