Hi everyone. Probably a silly question, but if I h...
# nf-schema
m
Hi everyone. Probably a silly question, but if I have
params { input = null }
in
nextflow.config
and then I do
params { input = "/path/to/foobar.txt" }
in a profile config called
test.config
, running
nextflow run . -profile test,docker
, I get
ERROR ~ Validation of pipeline parameters failed!
followed by
* Missing required parameter(s): input
. Is this expected? I used an absolute path to
foobar.txt
so I'm sure it can find it. Also, it works just fine if I do
nextflow run . -profile test,docker --input /path/to/foobar.txt
n
What Nextflow version are you using? And what does your config look like? There's probably something wrong in your config order
q
I have noticed that in strict syntax, the order of parameter calls only takes into account the first assignment. If you want the config assignment to take priority, you must first put your profile in nextflow.config and then set the default assignment to null.
m
Thank you! I'm also suspecting the order of things is wrong, but I haven't managed to fix it yet. I'm on NF 25.10.2 and the config I have was generated via
nf-core pipelines create
(see

https://www.youtube.com/watch?v=VwjXNXONHlY▾

). Just a basic hello world
Right now, I have
Copy code
profiles {
  ...
  test      { includeConfig 'conf/test.config'      }
}
followed by
Copy code
params {
  input                      = null
  ...
and it's still giving the same error. Same if I move the
params
block above.
Looking at https://www.nextflow.io/docs/latest/config.html#parameters, I noticed:
When including a config file, the included config is evaluated with the parameters defined before the include. The included config cannot see parameters defined after the include.
But now I have the
profiles
section all the way at the top and it's still triggering the same error
n
Are you using the strict syntax already?
m
Ah, yeah. That explains it... I just set
NXF_SYNTAX_PARSER=v1
and it works fine now.
n
Yes it's a known bug in Nextflow, it should be fixed in the next edge version 🙂
m
Also, the order doesn't seem to matter if I set
NXF_SYNTAX_PARSER=v1
👍 1
n
Better to use
v1
for now 😛
m
Haha, I see. Thank you!
n
No problem 😉