final
parent
096225c793
commit
1b9fe1030d
|
|
@ -286,12 +286,15 @@ def simplify_bubbles(graph):
|
|||
graph, nx.DiGraph: a bubble-less de bruijn graph
|
||||
"""
|
||||
fork_nodes = []# empty list containing nodes with 2 or more ancestors
|
||||
|
||||
for node in graph:
|
||||
while graph.in_degree(node) >= 2: # if 2 or more ancestor add node
|
||||
if graph.in_degree(node) >= 2: # if 2 or more ancestor add node
|
||||
pred = [n for n in graph.predecessors(node)]
|
||||
ancestor = algorithms.lowest_common_ancestor(graph,pred[0], pred[1])
|
||||
graph = solve_bubble(graph, ancestor, node)
|
||||
|
||||
|
||||
|
||||
return graph
|
||||
|
||||
def solve_entry_tips():
|
||||
|
|
@ -302,7 +305,6 @@ def solve_out_tips():
|
|||
pass
|
||||
|
||||
def main():
|
||||
print(sys.argv[1])
|
||||
fichier = str(sys.argv[1])
|
||||
k = int(sys.argv[2])
|
||||
hash_table = build_kmer_dict(fichier, k)
|
||||
|
|
|
|||
Loading…
Reference in New Issue