Skip to content

Commit 3134660

Browse files
author
nadiadavidson
committed
Fixes a bug which was making some clustering going into an infinite loop when doing successor checking.
1 parent 96a42f7 commit 3134660

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

BuildSuperTranscript.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ def successor_check(graph,n,tmerge):
2424
ess = [node for node in graph.successors(n)] #Get list of succesors
2525
#Succesor node only has one incoming path and is the only option for the previous node
2626
#Run until there is no successor node to add
27-
while(len(ess)==1 and len(graph.in_edges(ess))<=1):
27+
#check if ess is already in tmerge list (for case of a looped chain)
28+
while(len(ess)==1 and len(graph.in_edges(ess))<=1 and (ess[0] not in tmerge)):
2829
tmerge.append(ess[0])
2930
ess = [node for node in graph.successors(ess[0])]
30-
#might need to check if ess is already in tmerge list (for case of a looped chain)????
31+
3132
#return the list of nodes to merge
3233
return(tmerge)
3334

Lace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ def Split(genome,corsetfile,ncore,maxTran,outdir,full_clean):
184184
print("( ) / _\ / )( __)")
185185
print("/ (_/\/ \( (__ ) _) ")
186186
print("\_____/\_/\_/\_____)(____)")
187-
print("Lace Version: 1.12")
188-
print("Last Editted: 22/02/19")
187+
print("Lace Version: 1.13")
188+
print("Last Editted: 10/03/19")
189189

190190

191191
#Make argument parser

0 commit comments

Comments
 (0)