Problem in res_profile.py using v4.4.2 and recent database

Issue #126 resolved
Erik.Alm created an issue

https://bitbucket.org/genomicepidemiology/resfinder/src/master/src/resfinder/cge/phenotype2genotype/res_profile.py

Lines 110-112

                    if(len(phenodb_id) < 3):
                        unique_id = phenodb_id
                    else:

causes a crash on line 116

self.id_to_idwithvar[unique_id] = id_with_group

because unique_id is a list. If this is supposed to work, line 2 above would need to use id_with_group instead of phenodb_id:

This happened with the conda install of resfinder (v4.4.2) and resfinder database downloaded 2024-05-27 using download-db.sh

I verified that commenting out the above lines 110-112 solves the problem.

Comments (1)

  1. RolfKaas

    Hi Erik,

    Thank you very much for bringing up this issue with the unlreleased version of the ResFinder database. It turned out to be some additional newlines that had sneaked into the phenotypes.txt file. They have now been removed, and the newest commit of the ResFinder database should work.

    Furthermore I have made changes to ResFinder, so that future versions of ResFinder won't crash due to empty lines in the phenotypes file. Thank you again for bringing this to our attention.

    Best regards,

    Rolf Sommer Kaas

  2. Log in to comment