Skip to content

Commit

Permalink
integrated new log_gbwt_changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin-Rounthwaite committed Dec 23, 2023
1 parent 7a89e20 commit 9c3e01d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/algorithms/0_oo_normalize_snarls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ std::vector<vg::RebuildJob::mapping_type> SnarlNormalizer::parallel_normalizatio
pair<handle_t, handle_t> new_left_right = integrate_snarl(get<0>(snarl), *get<1>(snarl), get<2>(snarl), get<3>(snarl), get<4>(snarl), get<5>(snarl));
// make a subhandlegraph of the normalized snarl to find the new gbwt paths in the graph.
// cerr << "extraction" << endl;
SubHandleGraph integrated_snarl = extract_subgraph(_graph, _graph.get_id(new_left_right.first), _graph.get_id(new_left_right.second));
// SubHandleGraph integrated_snarl = extract_subgraph(_graph, _graph.get_id(new_left_right.first), _graph.get_id(new_left_right.second));
// cerr << "log changes" << endl;
log_gbwt_changes(get<6>(snarl), integrated_snarl);
log_gbwt_changes(get<6>(snarl), new_left_right);

}
auto integration_time = std::chrono::high_resolution_clock::now();
Expand Down Expand Up @@ -1657,9 +1657,9 @@ vector<int> SnarlNormalizer::normalize_snarl(const id_t source_id, const id_t si
_unskipped_snarls.emplace(make_pair(leftmost_id, rightmost_id));

// make a subhandlegraph of the normalized snarl to find the new gbwt paths in the graph.
SubHandleGraph integrated_snarl = extract_subgraph(_graph, _graph.get_id(new_left_right.first), _graph.get_id(new_left_right.second));
// SubHandleGraph integrated_snarl = extract_subgraph(_graph, _graph.get_id(new_left_right.first), _graph.get_id(new_left_right.second));

log_gbwt_changes(source_to_sink_gbwt_paths, integrated_snarl);
log_gbwt_changes(source_to_sink_gbwt_paths, new_left_right);

// integrated_snarl.for_each_handle([&](const handle_t handle) {
// if (integrated_snarl.get_id(handle) == 2605470)
Expand Down
3 changes: 2 additions & 1 deletion src/algorithms/0_oo_normalize_snarls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ class SnarlNormalizer {

handle_t overwrite_node_id(const id_t old_node_id, const id_t new_node_id);

void log_gbwt_changes(const vector<pair<vector<gbwt::vector_type::value_type>, string>>& source_to_sink_gbwt_paths, const HandleGraph &new_snarl);
void log_gbwt_changes(const vector<pair<gbwt::vector_type, string>>& source_to_sink_gbwt_paths, const pair<handle_t, handle_t> left_and_right_id);
// void log_gbwt_changes(const vector<pair<vector<gbwt::vector_type::value_type>, string>>& source_to_sink_gbwt_paths, const HandleGraph &new_snarl);

bool source_and_sink_handles_map_properly(
const HandleGraph &graph, const id_t new_source_id, const id_t new_sink_id,
Expand Down

0 comments on commit 9c3e01d

Please sign in to comment.