deprekate / PHANOTATE

PHANOTATE: a tool to annotate phage genomes.
GNU General Public License v3.0
69 stars 8 forks source link

Develop: incorrect output #26

Open linsalrob opened 2 years ago

linsalrob commented 2 years ago

The develop branch has two output errors:

  1. Genbank files (printed to STDOUT) occasionally contain an additional line of the format:
92033_gap 92355_gap
  1. fasta files (whether to STDOUT or to a file) crash with the error:
  File "/home/edwa0468/GitHubs/PHANOTATE/venv/lib/python3.9/site-packages/phanotate-2.0-py3.9-linux-x86_64.egg/phanotate/file_handling.py", line 157, in write_fasta   
    if(feature.type == 'CDS'):
AttributeError: 'NoneType' object has no attribute 'type'

There is an additional gap object added to the record which is not a CDS, and so the code

feature = contig_orfs.get_feature(left, right)

returns None

For (1), these are printed (line 126, file_handling.py and for (2) the None is not handled correctly at lines 155-157, file_handling.py.