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

Issue with automated database installation #2

Open
amacias97 opened this issue Feb 10, 2025 · 3 comments
Open

Issue with automated database installation #2

amacias97 opened this issue Feb 10, 2025 · 3 comments

Comments

@amacias97
Copy link

Hello,

I open this new issue to tell you that when I try to download the databases with get_dbs.py I get a bug because virulencefinder_2.0.4--hdfd78af_0.sif is not created in the "databases" folder, but where I run it. I have solved this by moving it and running it again. Afterwards, I get the following error:

Traceback (most recent call last):
File "/mnt/harddrive/alvtec1/LOMA/./bin/get_dbs.py", line 302, in
main()
File "/mnt/harddrive/alvtec1/LOMA/./bin/get_dbs.py", line 278, in main
host_kraken2db_path = get_host_kraken2(database_dir, args.host_kraken2db_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/harddrive/alvtec1/LOMA/./bin/get_dbs.py", line 68, in get_host_kraken2
os.rename("db" , host_kraken2db_path)
FileNotFoundError: [Errno 2] No such file or directory: 'db' -> '/mnt/harddrive/alvtec1/LOMA/databases/host_kraken2_db/'

Thanks,

Álvaro.

@duncanberger
Copy link
Collaborator

Hi Álvaro,

The sif file is just used for managing dependencies so it should exist wherever you're running the script rather than the database folder.

If you leave it where it is does the script work? Or is there the same/other error as you've described?

Thanks,

Duncan

@amacias97
Copy link
Author

Dear Duncan,

I attach the complete command and the error that appears so that you can see it more clearly:

(base) alvtec@sanger:/mnt/harddrive/alvtec1/LOMA$ ./bin/get_dbs.py --config_file ./conf/params.config --db_dir /mnt/harddrive/alvtec1/LOMA/databases --genomad --host_assembly --host_kraken2db --kraken2db --sylphdb --checkmdb --virulencefinderdb --pointfinderdb --resfinderdb --centrifugerdb

INFO: Using cached SIF image
FATAL: While checking container encryption: could not open image /mnt/harddrive/alvtec1/LOMA/databases/virulencefinder_2.0.4--hdfd78af_0.sif: failed to retrieve path for /mnt/harddrive/alvtec1/LOMA/databases/virulencefinder_2.0.4--hdfd78af_0.sif: lstat /mnt/harddrive/alvtec1/LOMA/databases/virulencefinder_2.0.4--hdfd78af_0.sif: no such file or directory
FATAL: While checking container encryption: could not open image /mnt/harddrive/alvtec1/LOMA/databases/virulencefinder_2.0.4--hdfd78af_0.sif: failed to retrieve path for /mnt/harddrive/alvtec1/LOMA/databases/virulencefinder_2.0.4--hdfd78af_0.sif: lstat /mnt/harddrive/alvtec1/LOMA/databases/virulencefinder_2.0.4--hdfd78af_0.sif: no such file or directory
FATAL: While checking container encryption: could not open image /mnt/harddrive/alvtec1/LOMA/databases/virulencefinder_2.0.4--hdfd78af_0.sif: failed to retrieve path for /mnt/harddrive/alvtec1/LOMA/databases/virulencefinder_2.0.4--hdfd78af_0.sif: lstat /mnt/harddrive/alvtec1/LOMA/databases/virulencefinder_2.0.4--hdfd78af_0.sif: no such file or directory
Traceback (most recent call last):
File "/mnt/harddrive/alvtec1/LOMA/./bin/get_dbs.py", line 302, in
main()
File "/mnt/harddrive/alvtec1/LOMA/./bin/get_dbs.py", line 278, in main
host_kraken2db_path = get_host_kraken2(database_dir, args.host_kraken2db_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/harddrive/alvtec1/LOMA/./bin/get_dbs.py", line 68, in get_host_kraken2
os.rename("db" , host_kraken2db_path)
FileNotFoundError: [Errno 2] No such file or directory: 'db' -> '/mnt/harddrive/alvtec1/LOMA/databases/host_kraken2_db/'

Thanks,

Álvaro.

@duncanberger
Copy link
Collaborator

Hi Álvaro,

Sorry for the delayed response, I've been away.

1). So the kraken host DB error was due to one line of repeated code. Should be fixed.

2). The sif error I'm less sure about (not able to reproduce it). Did you move the sif file back to where it was originally?

/mnt/harddrive/alvtec1/LOMA/databases/virulencefinder_2.0.4--hdfd78af_0.sif

Would be worth splitting your get_dbs.py into individual requests (i.e. try one database at a time). It will most likely be the *Finder database installs causing issues.

If you're still running into issues the wiki has the code to download each DB individually (manually). So, might be worth doing that instead.

Thanks,

Duncan

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

2 participants