nzimme 5 vuotta sitten
vanhempi
commit
1b9fe1030d
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      debruijn/debruijn.py

+ 4 - 2
debruijn/debruijn.py Näytä tiedosto

@@ -286,12 +286,15 @@ def simplify_bubbles(graph):
286 286
         graph, nx.DiGraph: a bubble-less de bruijn graph
287 287
     """
288 288
     fork_nodes = []# empty list containing nodes with 2 or more ancestors
289
+
289 290
     for node in graph:
290
-        while graph.in_degree(node) >= 2: # if 2 or more ancestor add node
291
+        if graph.in_degree(node) >= 2: # if 2 or more ancestor add node
291 292
             pred = [n for n in graph.predecessors(node)] 
292 293
             ancestor = algorithms.lowest_common_ancestor(graph,pred[0], pred[1])
293 294
             graph = solve_bubble(graph, ancestor, node)
294 295
 
296
+
297
+
295 298
     return graph
296 299
 
297 300
 def solve_entry_tips():
@@ -302,7 +305,6 @@ def solve_out_tips():
302 305
     pass
303 306
 
304 307
 def main():
305
-    print(sys.argv[1])
306 308
     fichier = str(sys.argv[1])
307 309
     k = int(sys.argv[2])
308 310
     hash_table = build_kmer_dict(fichier, k)