Integron_Finder icon indicating copy to clipboard operation
Integron_Finder copied to clipboard

[BUG] if crash during annotaion phase

Open bneron opened this issue 9 months ago • 0 comments

Describe the bug A clear and concise description of what the bug is.

whith the last gembase (version 0523) is used (--gembase) and there is a pseudogene (gene indicated as CDS in LSTINf but no proteins in prot file) and we ask for the functionnal annotation (--func_annot) IF crash

To Reproduce

Integrons integron_finder --gembase --cpu 20 --func-annot --keep-tmp --local-max --calin-threshold 1 /pasteur/zeus/projets/p02/Gembase/Current/ALL_DB/test_Replicons/ACBA001.0523.00041.fna

**************************************************************************
 ___       _                               _____ _           _
|_ _|_ __ | |_ ___  __ _ _ __ ___  _ __   |  ___(_)_ __   __| | ___ _ __
 | || '_ \| __/ _ \/ _` | '__/ _ \| '_ \  | |_  | | '_ \ / _` |/ _ \ '__|
 | || | | | ||  __/ (_| | | | (_) | | | | |  _| | | | | | (_| |  __/ |
|___|_| |_|\__\___|\__, |_|  \___/|_| |_| |_|   |_|_| |_|\__,_|\___|_|
                   |___/

**************************************************************************

integron_finder version 2.0.5 
Using:
 - Python 3.12.9 | packaged by conda-forge | (main, Feb 14 2025, 08:00:06) [GCC 13.3.0]
 - numpy 1.26.4
 - pandas 2.2.3
 - matplolib 3.8.2
 - biopython 1.85

 - Prodigal V2.6.3: February, 2016
 - INFERNAL 1.1.4 (Dec 2020)
 - HMMER 3.3.2 (Nov 2020); http://hmmer.org/

Authors:
 - Jean Cury, Bertrand Neron, Eduardo Rocha,

Citation:

 Néron, B.; Littner, E.; Haudiquet, M.; Perrin, A.; Cury, J.; Rocha, E.P.C. 
 IntegronFinder 2.0: Identification and Analysis of Integrons across Bacteria, with a Focus on Antibiotic Resistance in Klebsiella. 
 Microorganisms 2022, 10, 700. https://doi.org/10.3390/microorganisms10040700

 If you use --func-annot in conjunction with file NCBIfam-AMRFinder.hmm please also cite

 Haft, DH et al., Nucleic Acids Res. 2018 Jan 4;46(D1):D851-D860
 PMID: 29112715
 

                     =======================

integron_finder is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

integron_finder is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program (COPYING file).
If not, see [<http://www.gnu.org/licenses/>](http://www.gnu.org/licenses/).

                     =======================

command used: integron_finder --gembase --cpu 20 --func-annot --keep-tmp --local-max --calin-threshold 1 /pasteur/zeus/projets/p02/Gembase/Current/ALL_DB/test_Replicons/ACBA001.0523.00041.fna

                     =======================


INFO     :  ############ Processing replicon ACBA001.0523.00041.001C (1/2) ############

...
WARNING  :  Sequence describe in LSTINF file ACBA001.0523.00041.001C_02479 is not present in /pasteur/zeus/projets/p02/Gembase/Releases/2023/Microbial_0523/Proteins/ACBA001.0523.00041.prt
WARNING  :  Sequence describe in LSTINF file ACBA001.0523.00041.001C_02482 is not present in /pasteur/zeus/projets/p02/Gembase/Releases/2023/Microbial_0523/Proteins/ACBA001.0523.00041.prt
WARNING  :  Sequence describe in LSTINF file ACBA001.0523.00041.001C_02485 is not present in /pasteur/zeus/projets/p02/Gembase/Releases/2023/Microbial_0523/Proteins/ACBA001.0523.00041.prt
...
INFO     :  Starting Default search ... :
INFO     :  Default search done... : 
INFO     :  In replicon ACBA001.0523.00041.001C, there are:
INFO     :  - 0 complete integron(s) found with a total 0 attC site(s)
INFO     :  - 1 CALIN element(s) found with a total of 3 attC site(s)
INFO     :  - 0 In0 element(s) found with a total of 0 attC site
INFO     :  Starting search with local_max...:
INFO     :  Search with local_max was already done, continue... :
INFO     :  In replicon ACBA001.0523.00041.001C, there are:
INFO     :  - 0 complete integron(s) found with a total 0 attC site(s)
INFO     :  - 1 CALIN element(s) found with a total of 3 attC site(s)
INFO     :  - 0 In0 element(s) found with a total of 0 attC site
INFO     :  Adding proteins ... :
INFO     :  Starting functional annotation ...:
Traceback (most recent call last):
  File "/pasteur/zeus/projets/p01/MDM/MDM_conda/mdm_base_env3.12/bin/integron_finder", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/pasteur/zeus/projets/p01/MDM/MDM_conda/mdm_base_env3.12/lib/python3.12/site-packages/integron_finder/scripts/finder.py", line 653, in main
    integron_res, summary = find_integron_in_one_replicon(replicon, config)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/pasteur/zeus/projets/p01/MDM/MDM_conda/mdm_base_env3.12/lib/python3.12/site-packages/integron_finder/scripts/finder.py", line 410, in find_integron_in_one_replicon
    func_annot(integrons, replicon, protein_db, fa_hmm, config, result_tmp_dir)
  File "/pasteur/zeus/projets/p01/MDM/MDM_conda/mdm_base_env3.12/lib/python3.12/site-packages/integron_finder/annotation.py", line 90, in func_annot
    prot_to_annotate.append(prot_db[prot_id])
                            ~~~~~~~^^^^^^^^^
  File "/pasteur/zeus/projets/p01/MDM/MDM_conda/mdm_base_env3.12/lib/python3.12/site-packages/integron_finder/prot_db.py", line 583, in __getitem__
    return self._prot_db[prot_seq_id]
           ~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/pasteur/zeus/projets/p01/MDM/MDM_conda/mdm_base_env3.12/lib/python3.12/site-packages/Bio/File.py", line 238, in __getitem__
    record = self._proxy.get(self._offsets[key])
                             ~~~~~~~~~~~~~^^^^^
KeyError: 'ACBA001.0523.00041.001C_02482'

/!\ please share your input file so we can reproduce the problem

Expected behavior

do try to perform the functional annotation on pseud genes

Screenshots

If applicable, add screenshots, outputs or error traceback to help explain your problem.

Please complete the following information):

OS:

  • [x] Linux
  • [ ] Windows
  • [x ] Mac

Integron_Finder Version:

copy/paste here the output of integron_finder --version

Additional context Add any other context about the problem here.

bneron avatar Apr 22 '25 11:04 bneron