Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Params that are paths aren't coerced to File objects by nf-validation if the value is a bare filename without a path component #16

Closed
jmuhlich opened this issue Mar 15, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jmuhlich
Copy link
Member

jmuhlich commented Mar 15, 2024

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

@jmuhlich jmuhlich added the bug Something isn't working label Mar 15, 2024
@jmuhlich
Copy link
Member Author

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.

@RobJY RobJY self-assigned this Mar 18, 2024
@jmuhlich
Copy link
Member Author

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!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants