phac-nml / staramr

Scans genome contigs against the ResFinder, PlasmidFinder, and PointFinder databases.
Apache License 2.0
111 stars 25 forks source link

ERROR: the local id is too long or OSError: [Errno 39] Directory not empty: 'input-genomes' #202

Open elina2410 opened 8 months ago

elina2410 commented 8 months ago

Hello, staramr works for some isolates, but for others I got an error like: Exception: Could not run makeblastdb on file XXX_XX6234AA_AS.fasta, error b'BLAST Database creation error: Near line 1, the local id is too long. Its length is 51 but the maximum allowed local id length is 50. Please find and correct all local ids that are too long.'

If I used a wild card to take all mentioned above samples I got an error: OSError: [Errno 39] Directory not empty: 'input-genomes'

Could anyone explain why?

Thank you in advance E

apetkau commented 8 months ago

It's likely sequence the identifiers within your isolates are too long. That is, the ID likely looks like:

>ID...[51 characters]

Based on the message, the identifiers within these files will have to be shortened.

elina2410 commented 8 months ago

Yes, indeed. I needed to change headers in fasta files and it worked. I have lastest version of staramr 0.10.0 with PointFinder db dated on 01.02.2021. Is it still not recommended to update databases ? I did an update and tried to run staramr again and I got an error: Exception: error with [blastn -out /tmp/tmps8zo9h2h/200703_2873_contigs.fasta.all.resfinder.blast.tsv -outfmt "6 qseqid sseqid pident length qstart qend sstart send slen qlen sstrand sseq qseq" -query /home/abc/miniconda3/envs/staramr/lib/python3.11/site-packages/staramr/databases/data/update/resfinder/all.fsa -db /tmp/tmps8zo9h2h/input-genomes/200703_2873_contigs.fasta -evalue 0.001], stderr=FASTA-Reader: Ignoring invalid residues at position(s): On line 44207: 58, 63-66, 68-72

apetkau commented 8 months ago

I'm glad changing the headers worked for you.

We (developers of StarAMR) are not affiliated with the maintainers of the ResFinder/PointFinder databases and are not involved with any decisions or modifications to the structures of those databases. We provided the function to update to arbitrary revisions of the ResFinder/PointFinder databases in StarAMR, but only go through the process of checking to make sure new versions work with StarAMR on new releases of StarAMR.

If you wish to update to different versions of ResFinder/PointFinder databases outside of our release cycle, it is up to you to validate the databases work and fix any issues.