fmalmeida / bacannot

Generic but comprehensive pipeline for prokaryotic genome annotation and interrogation with interactive reports and shiny app.
https://bacannot.readthedocs.io/en/latest/
GNU General Public License v3.0
96 stars 9 forks source link

Error with amrfinder #32

Closed fetyj closed 2 years ago

fetyj commented 2 years ago

Hi Felipe, Thanks for sharing this amazing work. When I run the example from the quick start I got this error concerning the --database option in amrfinder The error message:


Caused by:
  Process `SINGLE_SAMPLE:amrfinder (Scanning AMR genes with AMRFinderPlus)` terminated with an error exit status (1)

Command executed:

  # Get tool version
  amrfinder --version > amrfinder_version.txt ;

  # Run amrfinder
  CONDA_PREFIX=/opt/conda
  amrfinder -p ecoli.faa --plus -o AMRFinder_complete.tsv --threads 4   --ident_min $(echo "scale=2; 90/100" | bc -l )   --coverage_min $(echo "scale=2; 80/100" | bc -l )   --name ecoli --protein_output ecoli_args.faa --database /opt/conda/share/amrfinderplus/data/latest ;
  awk -F '  ' '{ if ($3 != "") { print } }' AMRFinder_complete.tsv | grep -v "VIRULENCE" > AMRFinder_resistance-only.tsv ;

Command exit status:
  1

Command output:
  (empty)

Command error:

  *** ERROR ***
  Parameter "database" is used more than once

  HOSTNAME: 6d5f9b471433
  SHELL: ?
  PWD: /home/fiestaj/work/a5/ff1f138c678b85cc85777fa29787b4
  Progam name:  amrfinder_source
  Command line: /opt/conda/bin/amrfinder_source --database /opt/conda/share/amrfinderplus/data/latest -p ecoli.faa --plus -o AMRFinder_complete.tsv --threads 4 --ident_min .90 --coverage_min .80 --name ecoli --protein_output ecoli_args.faa --database /opt/conda/share/amrfinderplus/data/latest

Could you help to solve this? Best

Fety

fmalmeida commented 2 years ago

Hi @fetyj,

First of all, thanks for using the tool and making me aware of this issue.

It seems like a simple fix. The error seems to be on me, by having used --database twice in the module. I will try to fix it now and then you tell me if it is ok.

fmalmeida commented 2 years ago

Hi @fetyj

I have rechecked my files, and it seems that I was making an alias about this --database flag inside the docker image as well. That, I believe, raised the error.

I updated the docker image. Could you update your docker image with docker pull fmalmeida/bacannot:v2.4 and run the pipeline again with -resume? To see if it fixed the issue?

I hope it fixes 😄

Felipe.

fetyj commented 2 years ago

Hi @fmalmeida Thanks for the quick check, I'll give it a try and let you know soon as it's done. Fety

fmalmeida commented 2 years ago

Hi @fetyj

Just wait a little bit more. I executed it here and saw that this database require the new version of amrfinder to be used.

I will re-build the image to have the new version, and them I tell when it is available so you can test it.

fmalmeida commented 2 years ago

Hi @fetyj

Now it worked here. I pushed the updated docker image to dockerhub.

Please update your image: docker pull fmalmeida/bacannot:v2.4 and re-run the pipeline to see if it is now fixed 😄

Hope it works.

Felipe.

fetyj commented 2 years ago

Hi @fmalmeida It worked perfectly, thanks for the help :)

Fety