gem-pasteur / Integron_Finder

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

go_left = (full_element[full_element.type_elt == "attC"].pos_beg.values[0] - df_max.pos_end.values[0]: index 0 is out of bounds for axis 0 with size 0 #73

Closed vbrover closed 3 years ago

vbrover commented 4 years ago

Version of Integron_Finder:

2-2019-11-18

OS

Expected behavior

Success

Actual behavior

Error

Steps to reproduce behavior

integron_finder --local-max --func-annot PDT000136462.2 &> PDT000136462.2.log Files PDT000136462.2.GZ and `PDT000136462.2.log.gz' are attached.

Relevant logs and/or screenshots

PDT000136462.2.log.gz PDT000136462.2.GZ

jeanrjc commented 4 years ago

Thanks for the report. There is a bug here https://github.com/gem-pasteur/Integron_Finder/blob/1ec5f50a498679cd52b1893bac32f5f5e59e59df/integron_finder/infernal.py#L219

We don't take into account linearity. If the topology is linear we should we shouldn't use modulo, but max function. It might be worth checking the read_infernal function, because the size is changed here as well.

We could do what we did here https://github.com/gem-pasteur/Integron_Finder/blob/22f22a41149c4ca0e3e2cf82b0ffdde9f914df9e/integron_finder/attc.py#L248 to prevent IF to crash.

bneron commented 4 years ago

We don't take into account linearity. If the topology is linear we should we shouldn't use modulo, but max function.

are you sure we should use max? not min? if replicon is linear and df_max is lower than replicon size, which is almost always the case. df_max will be always = to replicon_size

bneron commented 4 years ago

@jeanrjc can you check the branch issue_73 the cmd line to test is integron_finder --local-max --func-annot --keep-tmp --lin data_issue_73.fst

data_issue_73.fst.gz

vbrover commented 4 years ago

_can you check the branch issue73

I have installed Integron_Finder by the command

pip install git+https://github.com/gem-pasteur/Integron_Finder/#egg=integron_finder 

By what command should I install it from branch issue_73?

bneron commented 4 years ago

the best way to do that is to install integron_finder in a virtualenv, clone the project , install it in the virtualenv (in editable mode) change to the desire branch and test it

python3.7 -m venv integron_project
cd integron_project
source bin/activate
git clone https://github.com/gem-pasteur/Integron_Finder
cd IntegronFinder
pip install -e .
git checkout issue_73

the run integron finder as usual

bneron commented 3 years ago

closed and merge in dev branch