Open mahesh-panchal opened 11 months ago
It's seems there are some parameters used outside the process directive scope in the nextflow.config
and these must be passed on the command-line or with a -params-file
.
params.outdir
: used in timeline
, trace
, report
, and dag
.params.max_time
: used in check_max
function.params.max_memory
: used in check_max
function.params.max_cpus
: used in check_max
function.params.genomes
: used in nextflow.config
.params.igenomes_ignore
: used in nextflow.config
.params.igenomes_base
: used in igenomes.config
.
Description of feature
From slack: It's still common that users want to supply parameters using
-c
. This often leads to users encountering this issue: https://github.com/nextflow-io/nextflow/issues/2662.From the developer side, one change we can make is that all process directives which use
params
should be nested in a closure. E.g.ext.args = "$params.something"
->ext.args = { "$params.something" }
.ext.prefix = "$params.something"
->ext.prefix = { "$params.something" }
.publishDir = [ path: ".../$params.something", mode: params.publish_dir_mode ]
->publishDir = [ path: { ".../$params.something" } , mode: params.publish_dir_mode ]
mode:
ofpublishDir
doesn't accept a closure, so should be the only case ignored.There are some cases of using
params
inenabled:
ofpublishDir
(eg. rnaseq) which also doesn't evaluate closures. These should be linted to move theenabled:
test intosaveAs:
to allow closures.