Skip to content

Commit 8a9dd12

Browse files
author
Jon Palmer
committed
skip emapper 2-2.0.4 as cant parse correctly
1 parent 5576e14 commit 8a9dd12

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

funannotate/annotate.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ def getEggNogHeadersv2(input):
199199
def parseEggNoggMapper(input, output, GeneDict):
200200
# try to parse header
201201
version, prefix = getEggnogVersion(input)
202+
if version and version > ('2.0.0') and version < ('2.0.5'):
203+
lib.log.error('Unable to parse emapper results from v{}, please use either v1.0.3 or >=v2.0.5'.format(version))
204+
return {}
202205
if not prefix: # we have to guess here, sorry
203206
prefix = 'ENOG50'
204207
if not version: # also then we guess
@@ -744,9 +747,10 @@ def __init__(self, prog):
744747
if lib.checkannotations(eggnog_result):
745748
lib.log.info("Parsing EggNog Annotations")
746749
EggNog = parseEggNoggMapper(eggnog_result, eggnog_out, GeneProducts)
747-
num_annotations = lib.line_count(eggnog_out)
748-
lib.log.info('{0:,}'.format(num_annotations) +
749-
' COG and EggNog annotations added')
750+
if lib.checkannotations(eggnog_out):
751+
num_annotations = lib.line_count(eggnog_out)
752+
lib.log.info('{0:,}'.format(num_annotations) +
753+
' COG and EggNog annotations added')
750754
else:
751755
lib.log.error("No Eggnog-mapper results found.")
752756
EggNog = {}

0 commit comments

Comments
 (0)