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

Automatic retrieval of input id.csv from test-datasets for test profile #293

Closed
pmoris opened this issue Feb 24, 2024 · 5 comments
Closed
Labels
enhancement Improvement for existing functionality

Comments

@pmoris
Copy link

pmoris commented Feb 24, 2024

Description of feature

I'd like to change the test.config profile so that it points to an ids.csv file hosted in the test-datasets repository, instead of requiring the user to first manually create one.

I realize that the documentation explains that you need to create an ids.csv file yourself, but when I first tried the pipeline, I just tried adding -profile test,apptainer and expected it to work (like it does for the other pipelines I've used, e.g., https://github.com/nf-core/rnaseq/blob/b89fac32650aacc86fcda9ee77e00612a1d77066/conf/test.config#L24). Instead I was greeted by the following error:

ERROR ~ ERROR: Validation of pipeline parameters failed!

 -- Check '.nextflow.log' file for details
The following invalid input values have been detected:

* --input: the file or directory '${projectDir}/tests/sra_ids_test.csv' does not exist.

 -- Check script '/home/pmoris/.nextflow/assets/nf-core/fetchngs/./subworkflows/local/nf_core_fetchngs_utils/../../nf-core/nfvalidation_plugin_utils/main.nf' at line: 55 or see '.nextflow.log' file for more details

and was left trying to figure if something was wrong on my end, with the latest release or if the test profile simply didn't work the way I was expecting.

I'm happy to fix this myself, but wanted to first check if you'd rather have me:

  1. create a new test file with the same contents as the one in the main README (https://github.com/nf-core/fetchngs/tree/1.11.0?tab=readme-ov-file#usage),
  2. re-use one of the existing files in the test-datasets repo that are being used for unit testing (e.g., https://github.com/nf-core/test-datasets/blob/fetchngs/sra_ids_test.csv),
    or
  3. just remove the line pointing to the ${projectDir} input file in the test.config file, so that at the very least it throws a warning about the input not being provided, rather than that an input file couldn't be found in the expected location.

(Thanks for the amazing tool by the way, it's made fastq retrieval so much easier for me.)

@pmoris pmoris added the enhancement Improvement for existing functionality label Feb 24, 2024
@bug1303
Copy link

bug1303 commented Feb 26, 2024

The csv file is actually part of the release, you can see it at https://github.com/nf-core/fetchngs/blob/1.11.0/tests/sra_ids_test.csv

and it does get fetched:

cat $NXF_HOME/assets/nf-core/fetchngs/tests/sra_ids_test.csv
ERR1160846
GSE214215
SRR12848126

When I launch the pipeline with test profile, it reports:

[...]
nf-core/fetchngs v1.11.0-g04ee503
[...]
projectDir : /xxxxxxx/nxf-home/assets/nf-core/fetchngs

So, projectDir is set to the expected path, but is not expanded properly.

This is on nextflow version 23.04.1.5866

@bug1303
Copy link

bug1303 commented Feb 26, 2024

I realized it can be solved with a simple fix:
bug1303@798be6f
Then it actually finds the csv file.

However, version 1.12.0 of fetchngs is supposed to come out very soon, and there it is set to fetch input from test-datasets:
https://raw.githubusercontent.com/nf-core/test-datasets/2732b911c57e607fa7aea5ba0c3d91b25bafb662/testdata/v1.12.0/sra_ids_test.csv

@maxulysse
Copy link
Member

yeah, sorry about that, this issue has been fixed in dev, and we're preparing the release

@maxulysse
Copy link
Member

it was a simple why did I use single quotes instead of double quotes error

@pmoris
Copy link
Author

pmoris commented Feb 28, 2024

Oh, I see! Thanks for the info! Closing this issue then!

@pmoris pmoris closed this as completed Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement for existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants