Hello! Is there a way to set a parameter to true, ...
# nf-schema
r
Hello! Is there a way to set a parameter to true, if another is set to true? I want to enable a process when param.intersect = true, but this requires that also params.norm = true. Now I could make the users do this and just specify both, but I was wondering if there is a way in nf-schema
n
Not via nf-schema, but it might be possible to do in a configuration file by setting dynamic defaults. Or at the top of the main.nf file
r
ok, I'll think about what makes most sense. Is there a way to throw an error if one is set but not the other?
n
It is possible using
dependentRequired
but nf-core linting does not like that in the parameters schema 😁
shakefist 1
r
a paricular reason or is it just not implemented? basically if I break linting with this how bad will it be
n
Actually I'm not sure linting will complain about it, but the
dependentRequired
section will probably be removed every time you use the schema builder
nf-core does not officially support it so use at your own risk 😁
r
when new schema builder 😄
n
I'm not even sure that one will allow it @mashehu?
p
r
meow yes
ok then for now I'll throw some warning and set the param.B in the pipeline. I am still unsure what the most user friendly path would be. I think I would prefer setting it more visibly in platform and have it tracked in the final resolved config. On the other hand it's still tracable in the logs that this process was run as well....