nextflow-io / nf-schema

Functionality for working with pipeline and sample sheet schema files in Nextflow pipelines
https://nextflow-io.github.io/nf-schema/
Apache License 2.0
12 stars 4 forks source link

Make validateParameters function assigns (optionally) default values defined in the schema #35

Open jfouret opened 4 months ago

jfouret commented 4 months ago

Hi,

ValidateParameters will not define default values in case an option is null. As a results one need to write the default value at 2 places, in the config and in the schema without anything in place to sync it, this could be misleading in case only 1 value is changed in a future version of a pipeline.

I would suggest to add an option to the function that would set default values defined in the schema so that default values are defined and enforced from a single file.

I did not find anything related to this in the other issues, sorry if I missed something and if there is already something similar in place.

Bests,

nvnieuwk commented 2 months ago

This is interesting! I'll need to explore a bit and see if it's possible but it does sound like a nice thing to add