From f1228983cb31a23b5bbb8ea7d73c9c8d27641221 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Thu, 4 Mar 2021 18:35:07 +0000 Subject: [PATCH] remember to connect back forwardized nodes --- clip-vg.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clip-vg.cpp b/clip-vg.cpp index df209c5..3a474d9 100644 --- a/clip-vg.cpp +++ b/clip-vg.cpp @@ -678,6 +678,12 @@ void forwardize_paths(MutablePathMutableHandleGraph* graph, const string& ref_pr handle_t handle = graph->get_handle_of_step(step_handle); if (graph->get_is_reverse(handle)) { handle_t flipped_handle = graph->create_handle(graph->get_sequence(handle)); + graph->follow_edges(handle, true, [&](handle_t prev_handle) { + graph->create_edge(prev_handle, flipped_handle); + }); + graph->follow_edges(handle, false, [&](handle_t next_handle) { + graph->create_edge(flipped_handle, next_handle); + }); vector steps = graph->steps_of_handle(handle); size_t ref_count = 0; for (step_handle_t step : steps) {