The `process.when` is slated to be deprecated in a...
# team-maintainers
m
The
process.when
is slated to be deprecated in a future nextflow release. I propose a mega-PR to completely remove it from #CJRH30T6V. ☠️: Remove it! πŸ₯Ί : Keep it Let me know!
☠️ 11
πŸ₯Ί 4
e
As far as I know, this is used to skip certain modules from being executed? Do we not want that at all, and replacing it with skip flags?
m
Nextflow will drop it entirely in the future, and the linter already complains about it, so I’d like to be ahead of the curve and enforce a good standard
m
I think it's a good idea
I have replace it with filter
e
Well, cant have it then, the sooner it's purged the better πŸ˜› But will need a post/blogpost for any nf-core pipelines that utilize when to execute modules or not
this 1
m
for example
m
But will need a post/blogpost for any nf-core pipelines that utilize when to execute modules or not
AFAIK it’s use has been discouraged for a while now, so I doubt any maintained pipelines still use it
e
maybe an auto-detect script that reads all nf-core pipelines to figure that out
any maintainers know of any nf-core pipelines that uses
.when
?
m
quick scan by gemini also points at β€’ molkart β€’ mcmicro β€’ ampliseq
e
I have replace it with filter
SHAME!
m
even in the
dev
branch
This, of course, is not a blocker but will force the pipeline maintainers to update
removing it from the template: https://github.com/nf-core/tools/pull/4314
m
m
and dropping it from #CJRH30T6V https://github.com/nf-core/modules/pull/11880 only 1873 files changed πŸ˜„ easy review
m
It's a rather big change though. Doesn't this need to be discussed in a maintainers meeting at least
m
yeah, we are getting there, I know sarek is behind
I agree that's it's a big change
Let's put it on the agenda, and add as first item to the list
m
yeah me too, hence the poll. Also, it’s not because there’s a PR it has to be merged right away, just laying the foundations so there’s less friction if/when it’s accepted
m
The linter checks for it, so you're going to have to update tools too
πŸ‘πŸ» 1
πŸ‘ 1
s
Ugh, I really really dislike that this is going
πŸ’― 2
I have on multiple occassions used a nf-core pipeline but turned off specific modules
how do we do that now?
m
filter
s
you can't do that manually
that is a pipeline level code
m
I think he means without messing with the pipeline code
m
oh
s
not a consumer code
m
yeah, I see the problem here
s
how do I turn off the failing sample?
(apart from setting to ignore)
m
drop it from the samplesheet 🀷🏻
s
how do I only run half the pipeline because the other half is not relevant
that is a shit compromise
πŸ‘† 3
m
Ask the seqera overlords that want to deprecate
ext.when
🀷🏻
all we can do is lobby and follow suit
🀣 1
m
I think that ship has sailed
m
I think the only alternative is to https://docs.seqera.io/nextflow/plugins/developing-plugins#process-directives . Someone can bust out claude to write it quickly
m
nf-core/screw-you-we'll-do-it-ourselves
?
🀣 2
s
Gemini missed fastquorum, and probably others: https://github.com/nf-core/fastquorum/blob/main/conf/modules.config Removing it from pipelines I can get the reasoning for, but I still really want a method to turn off processes without changing the code
πŸ‘ 3
πŸ‘πŸ½ 1
and per-sample
So please do not remove ext.when at the moment
πŸ‘πŸ» 1
πŸ’― 1
πŸ‘ 2
p
@Ben Sherman has been asking for use cases for
when
for well over a year now. I believe that we're yet to find anything that can't be done with other simpler syntax. But that can always change!
s
And I've told him what I've said here, and we still don't have one
a simple
enabled = true
on a module would be wonderful
I had this conversation with him at the Summit almost two years ago
Using it in pipeline development is bad
Using it to be flexible during pipeline use is what I want
Ben looks at this from the perspective of a pipeline developer, rather than for flexible use after the fact
m
Ben Sherman has been asking for use cases for
when
for well over a year now. I believe that we're yet to find anything that can't be done with other simpler syntax. But that can always change!
I'm almost certain we've given these use cases before, and there's nothing that's been presented which can actually practically replace it. As far as I'm aware it's been misunderstood or dismissed.
seqera deal with it 3
p
Ok I'll raise it again πŸ‘πŸ»
πŸ™ 1
b
At this point I think we will just exclude
when:
from typed processes and leave it in legacy processes. So I would just remove
when:
from nf-core modules when they are migrated to static typing + records
πŸ‘πŸ» 1
m
Sounds like a plan to me!