genomeannotation / annie

annie = ANNotation Information Extractor
MIT License
6 stars 3 forks source link

Fix for header that doesn't contain GN= or PE= in sport database #4

Closed Juke34 closed 8 years ago

Juke34 commented 8 years ago

In the last Swissprot database I dowloaded there is some cases where the sequence headers don't have GN= or PE=. Consequently I get this error: File "/home/jacda119/git/Annie/src/sprot.py", line 49, in get_fasta_info while words[i].find("GN=") == -1 and words[i].find("PE=") == -1: IndexError: list index out of range.

I propose a simple fix to not goes over the word table index.

tedsta commented 8 years ago

Thanks!