Skip to content

Commit 925d4b8

Browse files
Jon PalmerJon Palmer
Jon Palmer
authored and
Jon Palmer
committed
fix eggnog parser if COG and description empty
1 parent 6f7dfc9 commit 925d4b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/library.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -991,13 +991,15 @@ def parseEggNoggMapper(input, output):
991991
if not NOG in Definitions:
992992
Definitions[NOG] = Description
993993
out.write("%s\tnote\tEggNog:%s\n" % (ID, NOG))
994-
out.write("%s\tnote\tCOG:%s\n" % (ID, cols[10].replace(' ','')))
994+
if cols[10] != '':
995+
out.write("%s\tnote\tCOG:%s\n" % (ID, cols[10].replace(' ','')))
995996
if Gene != '':
996997
product = Gene.lower()+'p'
997998
product = capfirst(product)
998999
out.write("%s\tname\t%s\n" % (ID.split('-T1')[0], Gene))
9991000
out.write("%s\tproduct\t%s\n" % (ID, product))
1000-
out.write("%s\tnote\t%s\n" % (ID, Description))
1001+
if Description != '':
1002+
out.write("%s\tnote\t%s\n" % (ID, Description))
10011003
return Definitions
10021004

10031005
def runEggNog(file, HMM, annotations, cpus, evalue, tmpdir, output):

0 commit comments

Comments
 (0)