Skip to content

Commit

Permalink
Merge pull request #4464 from vgteam/deconstruct
Browse files Browse the repository at this point in the history
fix bug in nested deconstrution
  • Loading branch information
glennhickey authored Dec 3, 2024
2 parents 36c322a + ada5783 commit 205e43a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/traversal_clusters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@ vector<vector<int>> assign_child_snarls_to_traversals(const PathHandleGraph* gra
const vector<pair<handle_t, handle_t>>& child_snarls) {

// index the child snarls
unordered_map<handle_t, int> handle_to_child;
unordered_map<handle_t, vector<int>> handle_to_child;
for (int64_t i = 0; i < child_snarls.size(); ++i) {
handle_to_child[child_snarls[i].first] = i;
handle_to_child[child_snarls[i].second] = i;
handle_to_child[child_snarls[i].first].push_back(i);
handle_to_child[child_snarls[i].second].push_back(i);
}

// use the index to find which snarls are fully contained in a given traversal
Expand All @@ -249,11 +249,15 @@ vector<vector<int>> assign_child_snarls_to_traversals(const PathHandleGraph* gra
map<int, int> rv_count;
for (const handle_t& handle : trav) {
if (handle_to_child.count(handle)) {
fw_count[handle_to_child[handle]] += 1;
for (int child : handle_to_child[handle]) {
fw_count[child] += 1;
}
}
handle_t rhandle = graph->flip(handle);
if (handle_to_child.count(rhandle)) {
rv_count[handle_to_child[rhandle]] += 1;
for (int child : handle_to_child[handle]) {
rv_count[child] += 1;
}
}
}
vector<int> contained_snarls;
Expand Down

1 comment on commit 205e43a

@adamnovak
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for merge to master. View the full report here.

16 tests passed, 0 tests failed and 0 tests skipped in 17477 seconds

Please sign in to comment.