I'm currently fixing the default arguments passed ...
# pipeline-maintainers
l
I'm currently fixing the default arguments passed through config to the main imputation algorithm of phaseimpute. I'm wondering if it could be a good idea to add some nextflow arguments that the user could pass to the ext.args of each imputation process. Something like "opt_args_glimpse1" that would be added to
ext.args   = { "--impute-reference-only-variants --seed ${params.seed} ${params.opt_args_glimpse1}" }
This would allow users to fine tune algorithm without having to dive into all the configs files. Is it something that you do in other pipeline ?
In general I think it's a good approach. Where appropriate, it signals to the user which parts of the pipeline are open to configuration, where otherwise it may not be clear if overriding args would break things.
👍 2
party this 1
n
I also do it in genomeassembernf-co.re/genomeassembler/2.0.0/parameters#…
l
I didn't knew but you can provide default in
nextflow.config
that call themselves previously define parameters. Something like
Copy code
params {
    seed = 1
    glimpse1_args = "--impute-only-ref --seed ${params.seed}"
}
Doing so allows to expose all default arguments passed down to the software without risking the user defining twice some options. However sample level infos cannot be injected (e.g. meta.id).
👍 1
n
I think that only works because the "${params.seed}" substitution happens later (in .command.sh?), something like
Copy code
params {
   seed = 1
   glimpse_args = "--impute-only-ref -seed " + params.seed
}
will fail. I am not completely sure if I get what you are going for, are you suggesting this is an alternative for ext.args?
l
It seems that
nf-core pipeline lint
doesn't like the hack 😅
Copy code
nextflow_config: Config default value incorrect: params.options_shapeit5 is set as --seed ${params.seed} --hmm-ne ${params.effective_population_size} in nextflow_schema.json but is --seed 1 --hmm-ne 100000 in nextflow.config.
It seems it resolve the default when comparing config and schema.
I am not completely sure if I get what you are going for, are you suggesting this is an alternative for ext.args?
Kind of, the aim is to expose all options set up for the important process that might need some fine tuning by the user. I wanted a way to show the user which parameters are already in use. If you want for example to remove the seed set up without going in the config file.
n
Copy code
nextflow_config: Config default value incorrect: params.options_shapeit5 is set as --seed ${params.seed} --hmm-ne ${params.effective_population_size} in nextflow_schema.json but is --seed 1 --hmm-ne 100000 in nextflow.config.
It seems it resolve the default when comparing config and schema.
This you could probably solve by just lying in nextflow_schema.json by manually substituting 😉
l
Yeah, but the aim was to properly show what and how was set the default to the user. I will look into it 🙂