Skip to content

Commit

Permalink
fix for single species
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Palmer authored and Jon Palmer committed Jul 22, 2016
1 parent a856eac commit de3f675
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions bin/funannotate-compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,23 +708,25 @@ def __init__(self,prog):
#get stats, this is all single copy orthologs
if len(args.input) > 1:
scoCount = len(sco_hits)
else:
scoCount = 0
for i in range(0, len(stats)):
orthos = 0
for index, row in orth_hits[scinames[i]].iteritems():
if row != '*':
add = row.count(',') + 1
orthos += add
singletons = 0
for index, row in dftrim.iterrows():
if row[scinames[i]] != '*':
others = []
for y in range(0, len(row)):
others.append(row[y])
others = set(others)
if len(others) == 2:
singletons += 1
for i in range(0, len(stats)):
orthos = 0
for index, row in orth_hits[scinames[i]].iteritems():
if row != '*':
add = row.count(',') + 1
orthos += add
singletons = 0
for index, row in dftrim.iterrows():
if row[scinames[i]] != '*':
others = []
for y in range(0, len(row)):
others.append(row[y])
others = set(others)
if len(others) == 2:
singletons += 1
else:
scoCount = 0
singletons = 0
orthos = 0
stats[i].append("{0:,}".format(singletons))
stats[i].append("{0:,}".format(orthos))
stats[i].append("{0:,}".format(scoCount))
Expand Down

0 comments on commit de3f675

Please sign in to comment.