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

Exception: amrfinder error! error code: 1 #241

Closed
gidjes opened this issue Sep 20, 2023 · 4 comments
Closed

Exception: amrfinder error! error code: 1 #241

gidjes opened this issue Sep 20, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@gidjes
Copy link

gidjes commented Sep 20, 2023

Describe the bug
Running bakta gives to following error for some fasta files. I have about 1,500 sequences and the bakta pipeline returns this error on a couple of them. I have tried updating the amrfinder database, downloading the light version, neither of which work.
I've also tried running AMRfinder seperately on the sequence and that does work, so the problem seems to be when it comes back to Bakta. Help would be greatly appreciated, because I can't tell why this fails but other don't!

Command:
bakta --db bakta_db/db/db/ --prefix 55001924_1 --output 'output/bakta/chromosomes/55001924_1' --force --replicons "output/bakta/chromosomes/55001924_1/replicons.tsv" --genus Klebsiella --species pneumoniae --complete ../fastas_chrom/55001924_1.fasta

Command line output:
parse genome sequences...
imported: 1
filtered & revised: 1
chromosomes: 1

start annotation...
predict tRNAs...
found: 89
predict tmRNAs...
found: 1
predict rRNAs...
found: 25

predict ncRNAs...
found: 81
predict ncRNA regions...
found: 51
predict CRISPR arrays...
found: 2
predict & annotate CDSs...
predicted: 4967
discarded spurious: 4
revised translational exceptions: 3
detected IPSs: 4871
found PSCs: 77
found PSCCs: 7
lookup annotations...
conduct expert systems...
Traceback (most recent call last):
File "/mnt/scratch_dir/teunisg/.conda/envs/bakta/bin/bakta", line 10, in
sys.exit(main())
File "/mnt/scratch_dir/teunisg/.conda/envs/bakta/lib/python3.10/site-packages/bakta/main.py", line 269, in main
expert_amr_found = exp_amr.search(cdss, cds_aa_path)
File "/mnt/scratch_dir/teunisg/.conda/envs/bakta/lib/python3.10/site-packages/bakta/expert/amrfinder.py", line 47, in search
raise Exception(f"amrfinder error! error code: {proc.returncode}. Please, try 'amrfinder_update --force_update --database {amrfinderplus_db_path}' to update AMRFinderPlus's internal database.")
Exception: amrfinder error! error code: 1. Please, try 'amrfinder_update --force_update --database /data/BioGrid/teunisg/cluster_analysis/bakta_db/db/db/amrfinderplus-db' to update AMRFinderPlus's internal database.

I have attached a failed sequence.
55001924_1.fasta.zip

Detailed log:
Attached log
55001924_1.log

Installed through Conda

@gidjes gidjes added the bug Something isn't working label Sep 20, 2023
@Daniel-VM
Copy link

Hi!,

I had the same issue with docker. In my case I used the database db-light.tar.gz from https://zenodo.org/records/7669534. it worked after amrfinder_update --force_update --database ${BAKTADB}/amrfinderplus-db.

Could the Bakta databases be updated in Zenodo to solve the issue by fixing amrfinderplus-db?.

Many thanks!

@Daniel-VM
Copy link

Downloading db-light with bakta v1.8.1(bakta_db download --type light) and running gene-annotation with bakta v1.8.2 wokrs.

It also works with bakta v1.8.1. See: Issue#221

@oschwengers
Copy link
Owner

Hi, @gidjes & @Daniel-VM ,
I just conducted another up-to-date round trip test in a fresh Conda environment for both Bakta v1.8.1 and v1.8.2 downloading v5.0 of the light db from Zenodo annotating the provided genome (55001924_1.fasta.zip). Of note, internally, AMRFinderplus v3.11.26 is used.

mamba create -p ./conda-env bakta=[1.8.1|1.8.2]
mamba activate conda-env
bakta_db download --type light
bakta --db ./db-light/ --verbose --output test 55001924_1.fasta

After fixing the FASTA header line of this file bakta succeeded w/o any errors.
So, unfortunately, I cannot reproduce this error. Maybe an update of AMRFinder itself might help?

@Daniel-VM
Copy link

Many thanks @oschwengers!!! I confirm that Bakta v1.8.2 works now with db-light 🚀 . So no need to mix versions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants