I have a question about parameter types. I attempt...
# help
d
I have a question about parameter types. I attempt to add parameter types in nf-core/ampiseq in github.com/nf-core/ampliseq/pull/1027. I did check out the bytesize talk & blog post. I have two questions though: (1) Contrary to the blog post it appears to me that the nested parameters in github.com/nf-core/ampliseq/blob/…/ref_databases.config (similar to igenomes, I thought) seems still to work. Am I here missing something and I should convert it to a Map structure or is that fine for now? (2) I am unsure about defaults for parameter types. Boolean seems to default to false as of nextflow 26.04. Is it safer to still define the
Boolean = false
as in airrflow? What about default for
String?
, is it advised to use
String? = null
? Is there a role model implementation in nf-core already of parameter types? I had a look but didnt find any other than airrflow (but I likely missed something). Edit: trying to lure @Nicolas Vannieuwkerke here 🙂
n
Hi Daniel
For igenomes have you tried running a full test using only igenomes? It stopped working in those cases for me. We don't have any standards for defaults but IMO booleans don't need a default (as they are
false
but it doesn't hurt if you put them in). Having
String?
will automatically set it to
null
too
d
Hi, thanks for coming by!! > For igenomes have you tried running a full test using only igenomes? It stopped working in those cases for me. The pipeline doesnt use igenomes itself, but a similar file (ref_databases.config as above) that points to online database files and related information. So I was surprised that this seems to work just fine (local and CI, AWS or HPC not test). > We don't have any standards for defaults Ah ok. So I can leave it as is for now, i.e. Booleans & String? without default when they are false/null by default. About my last question, because its always helpful to look at examples, do you know of any pipeline that has parameter types in main.nf already other than airrflow?
n
I've done most of my testing in this pipeline: github.com/nf-cmgg/smallvariants
Strange that the config is working on your side though, it won't break if you make it a map but I'll leave it up to you if you want to do that 😛