Is it possible to use a params value as a default ...
# nf-schema
a
Is it possible to use a params value as a default in a samplesheet? • If provided, use
value
• If not,
params.value
• Extension: can we make
value
dependent on another field, e.g.
sample_type = "tumour"
changes the default value for`type` to
somatic
šŸ‘€ 1
n
Nope these are not possible via JSON schemas, you can however easily implement these into your pipeline code šŸ˜›
nod 1
The
default
implementation is pretty simple and just picks the first one it can find for that field. JSON schemas are super complex to code something with so it's in 99% of the cases just easier to implement it in the pipeline itself šŸ˜›
a
yup, that's how I've done it before and I'll do it again
šŸŽ‰ 1
n
Awesome!