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

No such file or directory: ectyper/Data/.lock #96

Closed
elina2410 opened this issue Dec 30, 2024 · 5 comments
Closed

No such file or directory: ectyper/Data/.lock #96

elina2410 opened this issue Dec 30, 2024 · 5 comments
Assignees

Comments

@elina2410
Copy link

elina2410 commented Dec 30, 2024

Hello,
today I updated ECTyper to newest version 2.0.0 and got some errors. How to solve it?

(ectyper2) ek@per:~/ecoli_typing$ ectyper -i fasta/ --pathotype --verify -o ecoli_typing2
2024-12-30` 11:36:54,449 ectyper:46 INFO Database structure QC is OK at /home/ek/miniconda3/envs/ectyper2/lib/python3.12/site-packages/ectyper/Data/ectyper_alleles_db.json
2024-12-30 11:36:54,452 ectyper:104 INFO Starting ectyper v2.0.0 running on O and H antigen allele database v1.0 (11-03-2020) and pathotype database v2024-10-03
2024-12-30 11:36:54,452 ectyper:110 INFO Output_directory is /home/ek/ecoli_typing/ecoli_typing2
2024-12-30 11:36:54,452 ectyper:111 INFO Command-line arguments Namespace(input=['fasta/'], longreads=False, maxdirdepth=0, cores=1, percentIdentityOtype=95, percentIdentityHtype=95, percentCoverageOtype=90, percentCoverageHtype=50, verify=True, output='ecoli_typing2', reference='/home/ek/miniconda3/envs/ectyper2/lib/python3.12/site-packages/ectyper/Data/EnteroRef_GTDBSketch_20231003_V2.msh', sequence=False, debug=False, dbpath=None, pathotype=True, percentIdentityPathotype=90, percentCoveragePathotype=50)
2024-12-30 11:36:54,452 ectyper.speciesIdentification:58 INFO MASH species id sketch is missing and needs to be downloaded ...
2024-12-30 11:36:54,452 ectyper.speciesIdentification:26 INFO Placed lock file at /home/ek/miniconda3/envs/ectyper2/lib/python3.12/site-packages/ectyper/Data/.lock
2024-12-30 11:36:54,453 ectyper.subprocess_util:40 ERROR Error in subprocess. The following command failed: ['mash', 'info', '-t', '/home/ek/miniconda3/envs/ectyper2/lib/python3.12/site-packages/ectyper/Data/EnteroRef_GTDBSketch_20231003_V2.msh']
2024-12-30 11:36:54,453 ectyper.subprocess_util:41 ERROR Subprocess failed with error: "mash: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such file or directory
"
2024-12-30 11:36:54,453 ectyper.speciesIdentification:81 ERROR Something went wrong with the file download from https://zenodo.org/records/13969103/files/EnteroRef_GTDBSketch_20231003_V2.msh?download=1. Trying next mirror ...
2024-12-30 11:36:54,453 ectyper.speciesIdentification:82 ERROR All mirrors tried but none worked. Check you Internet connection or download manually (see README)...
Traceback (most recent call last):
File "/home/ek/miniconda3/envs/ectyper2/bin/ectyper", line 10, in
sys.exit(run_program())
^^^^^^^^^^^^^
File "/home/ek/miniconda3/envs/ectyper2/lib/python3.12/site-packages/ectyper/ectyper.py", line 114, in run_program
if speciesIdentification.get_species_mash(args.reference) == False:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ek/miniconda3/envs/ectyper2/lib/python3.12/site-packages/ectyper/speciesIdentification.py", line 83, in get_species_mash
os.remove(lockfilepath) # remove lock file
^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/ek/miniconda3/envs/ectyper2/lib/python3.12/site-packages/ectyper/Data/.lock'

E.

@kbessonov1984
Copy link
Collaborator

kbessonov1984 commented Jan 4, 2025

Hi, the issue you are having is with the database download. ECTyper was not able to download the species ID database from Zenodo. Check your connection. Otherwise you can download it manually and insert it into the right directory. I can provide more info on manual database install

ectyper.speciesIdentification:82 ERROR All mirrors tried but none worked. Check you Internet connection or download manually

You can also use a Singularity or Docker image which have all databases already downloaded (https://quay.io/)

@elina2410
Copy link
Author

But when I list dir with databases it seems that all are already there

(ectyper2) ek@perun:~$ ll /home/ek/miniconda3/envs/ectyper2/lib/python3.12/site-packages/ectyper/Data/
total 968820
drwxrwxr-x 4 ek ek 4096 Jan 7 09:07 ./
drwxrwxr-x 4 ek ek 4096 Dec 30 11:34 ../
-rw-rw-r-- 1 ek ek 988871296 Dec 30 13:50 EnteroRef_GTDBSketch_20231003_V2.msh
-rw-rw-r-- 2 ek ek 0 Dec 19 19:40 init.py
drwxrwxr-x 2 ek ek 4096 Dec 30 11:34 pycache/
drwxrwxr-x 2 ek ek 4096 Dec 30 13:51 ectyper_2024-12-30_13.51.25.037411/
-rw-rw-r-- 2 ek ek 2410872 Dec 19 19:40 ectyper_alleles_db.json
-rw-rw-r-- 2 ek ek 764208 Dec 19 19:40 ectyper_patho_stx_toxin_typing_database.json

@kbessonov1984
Copy link
Collaborator

kbessonov1984 commented Jan 8, 2025

Try again to run ectyper_init it will try to re-download the database. The function get_species_mash() checks is the mash database exists and if not will re-download mash sketch and then run mash info on it which seems that failed to happen. As long as the EnteroRef_GTDBSketch_20231003_V2.msh is present, there will be no database download. I do not see that EnteroRef_GTDBSketch_20231003_V2.msh.txt file is generated hinting to probable issue with mash You can generate one by running mash info -t mash_sketch_path that is mash info -t EnteroRef_GTDBSketch_20231003_V2.msh.txt in /home/ek/miniconda3/envs/ectyper2/lib/python3.12/site-packages/ectyper/Data/

@kbessonov1984
Copy link
Collaborator

Lastly you can try out the web version of the tool here

@kbessonov1984
Copy link
Collaborator

I assume that issue is resolved and will update documentation for manual initialization of the species identification MASH database in case there are issues with download or Internet connection.

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

No branches or pull requests

2 participants