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

readfish validate reference file name check #326

Open
speleonut opened this issue Feb 1, 2024 · 2 comments
Open

readfish validate reference file name check #326

speleonut opened this issue Feb 1, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@speleonut
Copy link

Hi Matt & Alex,
There is a potential bug in the reference file check which causes the following error message:
"readfish.validate Provided index file appears to be of an incorrect type - should be one of ['.fasta', '.fna', '.fsa', '.fa', '.fastq', '.fq', '.fasta.gz', '.fna.gz', '.fsa.gz', '.fa.gz', '.fastq.gz', '.fq.gz', '.mmi']"
If the filename has a "." then the reference will be marked as the incorrect type, even if it is correct: e.g.
GCA_000001405.15_GRCh38_no_alt_analysis_set.fna.mmi causes the error
GCA_000001405_15_GRCh38_no_alt_analysis_set.mmi does not.
A simple work around is to create a soft link with an acceptable file name.
Perhaps in src/readfish/plugins/_mappy.py (lines 90 - 96) testing the suffixes only at position [-1] first, then if it fails testing only suffixes at positions [-2:] for any given index file would solve this problem. My python skills are limited or I would just suggest a patch...
Cheers,
Mark

Copy link

github-actions bot commented Feb 1, 2024

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@mattloose mattloose self-assigned this Feb 1, 2024
@mattloose mattloose added the enhancement New feature or request label Feb 1, 2024
@mattloose
Copy link
Contributor

Thanks for highlighting this - it is a good point and we will address in a futre release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

2 participants