Params that are paths aren't coerced to File objects by nf-validation if the value is a bare filename without a path component
jmuhlich opened this issue · comments
Description of the bug
Specifying a param value like --input_cycle as a bare filename does not work -- nextflow doesn't seem to "see" the file.
Prefixing the filename with its full absolute path works around this. This is probably something about nf-validation handling of the params.
Command used and terminal output
# samplesheet.csv DOES exist here!
$ nextflow run nf-core/mcmicro --input_cycle samplesheet.csv ...
...
ERROR ~ Error executing process > 'NFCORE_MCMICRO:MCMICRO:INPUT_CHECK:SAMPLE_AND_MARKER_SHEET_CHECK'
Caused by:
Not a valid path value: 'samplesheet.csv'
...
Relevant files
No response
System information
No response
Now that I think about it some more, it may actually be best to enforce that these paths are absolute to help with reproducibility and self-documentation of the resulting params.json.
I believe this stems from core nextflow path parsing, which nf-validation delegates to. nextflow.Nextflow.file()
will raise an exception if the path is a local file path that doesn't start with a /
. This is probably a good thing in the end, but nf-validation's use of that particular code path doesn't seem quite right since it does a lot of other things. (like glob expansion!)