nextflow-io / nextflow-io/nextflow
process selector not working when full qualified name is used with negation
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 3.5k
- Forks
- 811
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 61
Description
Bug report
Expected behavior and actual behavior
I would expect negation (!) would work to not match the rest of the pattern when the fully qualified name of the process is used. Instead, it seems like the negative is ignored, and it will do the opposite, i.e. match the pattern after the negation.
Steps to reproduce the problem
here's the script:
process A {
input:
val(x)
exec:
def args = task.ext.args ?: "hi"
def args2 = task.ext.args2 ?: "hi2"
println args
println args2
}
workflow { A_workflow() }
workflow A_workflow { A(Channel.of(1)) }
here's the config:
process {
withName:'A_workflow:.*' {
ext.args = "hola"
}
withName: "!A_workflow:A" {
ext.args2 = "hola2"
}
}
i would expect the output would be hola hi2, instead if it's hola hola2
Program output
N E X T F L O W ~ version 25.09.1-edge
Launching `test.nf` [thirsty_davinci] DSL2 - revision: 44485f4459
executor > local (1)
[d6/b37c56] process > A_workflow:A (1) [100%] 1 of 1 ✔
hola
hola2
there's some lines in the config file i wanted to show as well:
$ grep matches .nextflow.log
Oct-13 11:47:49.945 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:!A_workflow:A` matches process A_workflow:A
Oct-13 11:47:49.948 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:A_workflow:.*` matches process A_workflow:A
what the first line doesn't make sense. i also tried parentheses (withName: "!(A_workflow:A)") and single quotes, worked the same.
Environment
- Nextflow version: 25.09.1-edge
- Java version: 23
- Operating system: Linux
- Bash version: GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-gnu)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the supplied Nextflow script and configuration with the reported version, then inspect the debug output for the withName selector matches. Trace the process-selector matching behavior for a fully qualified name preceded by negation. Done means the negated selector does not match A_workflow:A and the output is hola followed by hi2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100