Howdy all, is there an established way of dealing ...
# modules
m
Howdy all, is there an established way of dealing with tool parameters in modules? Especially for tools that offer a large number of parameters, it seems inefficient to have to enumerate all of them in the
params
list in
nextflow.config
and assign them to
ext.args
in
modules.config
. In other (non nf-core) contexts, I've allowed the user to pass --<toolname>-<arbitrary param>, parsed the
params
map for entries starting with 'toolname', and passed the remainder to the tool as-is. This seems to work pretty well, although with nextflow's parameter case translation, it requires some extra string manipulation. Is there an accepted way of doing something like this for nf-core modules, or do we just manually handle all possibilities in
modules.config
?
l
I'm not sure if this is the answer you're looking for, but you can find the current guidelines for module parameters here. If the post was meant more as a suggestion for change, then just ignore it 😄 Three types of inputs are distinguished in the guidelines: • "mandatory and optional input files MUST be included in input channel definitions" • "Non-file mandatory arguments or arguments needed to modify the command to make the module run with no error, SHOULD be provided as value channels" • "non-mandatory command-line tool non-file arguments MUST be provided as a string via the
$task.ext.args
variable."
i
It depends on the parameter. If it's highly relevant to the pipeline (e.g. identity cutoff for read mapping), then it's a good idea to expose it in the pipeline schema and in
nextflow.config
, and implement custom handling for it. If it's something less relevant and rarely used (e.g. context settings for
grep
), then the user always has the ability to set them through an additional config file supplied to Nextflow with
-c
m
Thanks, these are both helpful.