The output of this, is that the process FOO runs, but it doesntecho. A confusing issue here is that thecustom.confighas a higher priority than thenextflow.config, so why does FOO execute but notecho`?
The logic appears to be that first the command-line parameters are read in. Then comes the -params-file, but not overriding anything that has a value. Then comes the nextflow.config, in which the code is evaluated before being stored. Then comes the custom config, which is again evaluated before, but then overrides anything set in nextflow.config.
This then means that when nextflow.config is read in, params.foo is false, setting the configuration for BAR. After which the custom config is read in, overriding params.foo, so FOO executes in the workflow.
This leads to unexpected behaviour as -c is thought to have higher priority, and while this is true for the workflow execution, it's not true for the config "execution".
Config priority is listed as:
--something value
)-params-file
option-c my_config
optionnextflow.config
in the current directorynextflow.config
in the workflow project directory$HOME/.nextflow/config
main.nf
)Then code written such as this:
main.nf
:nextflow.config
:Then override
params.foo
with a custom config-c
.The output of this, is that the process
FOO
runs, but it doesnt
echo. A confusing issue here is that the
custom.confighas a higher priority than the
nextflow.config, so why does FOO execute but not
echo`?The logic appears to be that first the command-line parameters are read in. Then comes the
-params-file
, but not overriding anything that has a value. Then comes thenextflow.config
, in which the code is evaluated before being stored. Then comes the custom config, which is again evaluated before, but then overrides anything set innextflow.config
.This then means that when
nextflow.config
is read in, params.foo is false, setting the configuration for BAR. After which the custom config is read in, overridingparams.foo
, so FOO executes in the workflow. This leads to unexpected behaviour as-c
is thought to have higher priority, and while this is true for the workflow execution, it's not true for the config "execution".