gem-pasteur / Integron_Finder

Bioinformatics tool to find integrons in bacterial genomes
GNU General Public License v3.0
67 stars 22 forks source link

[BUG] IF crashes on a multiple contigs file #103

Closed eloilit closed 1 year ago

eloilit commented 2 years ago

Describe the bug IF crashes on a multiple contigs file, using the gembase format, in the middle of the contigs being processed.

To Reproduce Steps to reproduce the behavior:

  1. integron_finder --local-max --mute --outdir ./IFResults --gembase --gembase-path ./VibrionaceaDBMarch2022_v2 --gbk ./VibrionaceaDBMarch2022_v2/Replicons/VIBR.0322.11443.fna
  2. See error

I located the files to reproduce the error in /pasteur/appa/scratch/elittner/for_issue_IF_crashes Expected behavior

Normal completion

Screenshots

Traceback (most recent call last): File "/Users/eloi/Documents/Softwares/anaconda3/envs/IFv2.0.1/bin/integron_finder", line 10, in sys.exit(main()) File "/Users/eloi/Documents/Softwares/anaconda3/envs/IFv2.0.1/lib/python3.9/site-packages/integron_finder/scripts/finder.py", line 648, in main integron_res, summary = find_integron_in_one_replicon(replicon, config) File "/Users/eloi/Documents/Softwares/anaconda3/envs/IFv2.0.1/lib/python3.9/site-packages/integron_finder/scripts/finder.py", line 385, in find_integron_in_one_replicon integrons = find_integron(replicon, protein_db, integron_max, intI_file, phageI_file, config) File "/Users/eloi/Documents/Softwares/anaconda3/envs/IFv2.0.1/lib/python3.9/site-packages/integron_finder/integron.py", line 150, in find_integron attc_left = np.array([i_attc.pos_beg.values[0] for i_attc in attc_ac]) File "/Users/eloi/Documents/Softwares/anaconda3/envs/IFv2.0.1/lib/python3.9/site-packages/integron_finder/integron.py", line 150, in attc_left = np.array([i_attc.pos_beg.values[0] for i_attc in attc_ac]) IndexError: index 0 is out of bounds for axis 0 with size 0

Please complete the following information):

OS:

Integron_Finder Version:

integron_finder version 2.0.2 Using:

Additional context Only one example failing over a big dataset

eloilit commented 2 years ago

VibrionaceaDBMarch2022_v2.zip

command used: integron_finder --local-max --mute --outdir ./IFResults --gembase --gembase-path ./VibrionaceaDBMarch2022_v2 --gbk ./VibrionaceaDBMarch2022_v2/Replicons/VIBR.0322.11443.0157.fna

@jeanrjc Here are the files to reproduce the error