IndexError raised during Resfinder run

Issue #27 resolved
Former user created an issue

Hi there,

First, let me thank you for the development of this tool :)

I ran some E.coli data on your online server and it went great.

I then successfully installed Resfinder locally, verification on installation went great.

So when I repeated the analysis locally, I got the following error:

Traceback (most recent call last):
  File "/opt/Resfinder/resfinder/run_resfinder.py", line 521, in <module>
    "PointFinder")
  File "/opt/Resfinder/resfinder/cge/standardize_results.py", line 346, in standardize_results
    res_collection, mismatch, gene_results, ref_db_name)
  File "/opt/Resfinder/resfinder/cge/standardize_results.py", line 27, in __init__
    region_name = region_results[0]["ref_id"]
IndexError: list index out of range

My command was as follows:

python3 /opt/Resfinder/resfinder/run_resfinder.py --kmaPath /opt/Resfinder/resfinder/cge/kma/kma -o Test -s "Escherichia coli" -l 0.6 -t 0.8 --acquired --point -ifq 001ECcontigs.fasta

So as a temporary solution, on line 27, file standardize_results.py, I replaced

region_name = region_results[0]["ref_id"]
region_name = PhenoDB.if_promoter_rename(region_name)

with

        try:
            region_name = region_results[0]["ref_id"]
            region_name = PhenoDB.if_promoter_rename(region_name)
        except:
            region_name=''

I am completely sure this is not a good solution, but I was just trying to debug it.

It ran great after this "solution" but when comparing the results with the web version, it missed mutations on one gene and also missed an important class of antibiotics.

Could you please help me on this?

Thank you in advance!

Comments (2)

  1. CGE Helpdesk

    Thank you for the interest in ResFinder and for your message.

    I would like to test the program with the data you have used, if possible. Would you mind uploading it to our webpage again and then send us the link for the result page? You can send it to this email:

    food-cgehelp@dtu.dk

    Then I will take a closer look at it and why it is failing in your case.

    Kind regards,

    Malene, CGE helpdesk.

  2. Log in to comment