ResFinder fails with the newest version of the PoitFinder database

Issue #84 resolved
RolfKaas created an issue

ResFinder seems to work fine with FASTA files and the newest PointFinder commit, but fails with FASTQ files:

Traceback (most recent call last):
  File "/Users/rolf/test_resfinder/resfinder/./run_resfinder.py", line 546, in <module>
    finder.write_results(out_path=args.out_path, result=results,
  File "/Users/rolf/test_resfinder/resfinder/cge/pointfinder.py", line 340, in write_results
    result_str = self.results_to_str(res_type=res_type,
  File "/Users/rolf/test_resfinder/resfinder/cge/pointfinder.py", line 284, in results_to_str
    str_tuple = self.mut2str(gene, gene_name, hit['mis_matches'],
  File "/Users/rolf/test_resfinder/resfinder/cge/pointfinder.py", line 1597, in mut2str
    gene_mut_name, resistence, pmid = self.look_up_known_muts(
  File "/Users/rolf/test_resfinder/resfinder/cge/pointfinder.py", line 1744, in look_up_known_muts
    if pos in self.known_mutations[gene][mut]:
KeyError: 'gyrA_1_MH933946.1'

Comments (2)

  1. Yifei Xu

    seem error encountered when running test4

    python3 /home/.opt/biosoft/resfinder/run_resfinder.py \
    > -ifq data/test_isolate_05_1.fq data/test_isolate_05_2.fq \
    > -o running_test/test4 -s 'Escherichia coli' --min_cov 0.6 \
    > --threshold 0.8 --point --db_path_point /home/.opt/biosoft/resfinder/db_pointfinder \
    > --db_path_res /home/.opt/biosoft/resfinder/db_resfinder --kmaPath /home/.opt/biosoft/resfinder/cge/kma/kma
    Traceback (most recent call last):
      File "/home/.opt/biosoft/resfinder/run_resfinder.py", line 542, in <module>
        id=sample_name)
      File "/home/.opt/biosoft/resfinder/cge/pointfinder.py", line 135, in old_results_to_standard_output
        db_name, gene_name, db['mis_matches'], True, db)
      File "/home/.opt/biosoft/resfinder/cge/pointfinder.py", line 1524, in get_mutations
        gene, look_up_pos, look_up_mut, m_type, gene_name)
      File "/home/.opt/biosoft/resfinder/cge/pointfinder.py", line 1742, in look_up_known_muts
        if pos in self.known_mutations[gene][mut]:
    KeyError: 'gyrA_1_CP073768.1'
    

  2. Log in to comment