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

can't test pipeline which uses relative paths in samplesheet (and runs fine with nextflow run) #273

Open
blex-max opened this issue Nov 21, 2024 · 1 comment

Comments

@blex-max
Copy link

blex-max commented Nov 21, 2024

I have a pipeline using nf-core structure which has some old e2e tests that I’m charged with converting to the nf-test format. The samplesheet input for each contains relative paths to the appropriate data - tests/sample-data/xxx.yyy and so on. This is fine when calling nextflow run […] main.nf --input samplesheet.csv, however when using nf-test and providing inputs in the params block of the test definition, the tests error out reporting that xxx.yyy does not exist - I can fix the error if I make the paths in the samplesheet absolute, but this makes the testing non-portable which defeats the point for us. How can I work around this? I’ve tried using ${projectDir} in the samplesheet, but, unsurprisingly I think, it doesn’t get expanded in this context and instead is treated as a string, so again the file appears not to exist. Presumably this has come up before? I consider this a bug in the sense that if nextflow run works, utilising nf-test shouldn't itself cause failure.

@blex-max
Copy link
Author

got it working by modifying the test paths to ../../../path/to/data - it seems a bit unfortunate that this is necessary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant