Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnovak committed Feb 7, 2025
1 parent 976236f commit d4407e8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
14 changes: 8 additions & 6 deletions src/algorithms/chain_items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,14 @@ transition_iterator zip_tree_transition_iterator(const std::vector<SnarlDistance
size_t max_read_lookback_bases) {

// TODO: Remove seeds because we only bring it here for debugging and it complicates the dependency relationships
return [&seeds, &zip_code_tree, max_lookback_bases](const VectorView<Anchor>& to_chain,
const SnarlDistanceIndex& distance_index,
const HandleGraph& graph,
size_t max_indel_bases,
const transition_iteratee& callback) {

return [&seeds, &zip_code_tree, max_graph_lookback_bases, max_read_lookback_bases](
const VectorView<Anchor>& to_chain,
const SnarlDistanceIndex& distance_index,
const HandleGraph& graph,
size_t max_indel_bases,
const transition_iteratee& callback
) {

// We need a way to map from the seeds that zip tree thinks about to the anchors that we think about. So we need to index the anchors by leading/trailing seed.
// TODO: Should we make someone else do the indexing so we can make the Anchor not need to remember the seed?
std::unordered_map<size_t, size_t> seed_to_starting;
Expand Down
13 changes: 9 additions & 4 deletions src/minimizer_mapper_from_chains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ vector<Alignment> MinimizerMapper::map_from_chains(Alignment& aln) {
ZipCodeForest zip_code_forest;
crash_unless(distance_index);
zip_code_forest.fill_in_forest(seeds, minimizers, *distance_index,
max_lookback_bases, aln.sequence().size() * zipcode_tree_scale);
max_graph_lookback_bases, aln.sequence().size() * zipcode_tree_scale);

#ifdef debug_print_forest
if (show_work) {
Expand Down Expand Up @@ -3195,6 +3195,8 @@ Alignment MinimizerMapper::find_chain_alignment(
// We will measure the graph distance on the link path actually found, for work-showing.
// This gets filled from either the WFA alignment we have already, or the BGA alignment we are about to compute.
size_t link_graph_path_length;
// We also measure the score for work-showing.
int link_score;

if (link_alignment) {
// We found a link alignment
Expand Down Expand Up @@ -3224,7 +3226,9 @@ Alignment MinimizerMapper::find_chain_alignment(
link_graph_path_length = path_from_length(link_path);
append_path(composed_path, std::move(link_path));
}
composed_score += link_alignment.score;

link_score = link_alignment.score;
composed_score += link_score;
} else {
// The sequence to the next thing is too long, or we couldn't reach it doing connect().
// Fall back to another alignment method
Expand Down Expand Up @@ -3289,13 +3293,14 @@ Alignment MinimizerMapper::find_chain_alignment(
Path link_path(link_aln.path());
link_graph_path_length = path_from_length(link_path);
append_path(composed_path, std::move(link_path));
composed_score += link_aln.score();
link_score = link_aln.score();
composed_score += link_score;
}

if (show_work) {
#pragma omp critical (cerr)
{
cerr << log_name() << "Aligned and added link of " << link_length << " bp read and " << link_graph_path_length << " bp graph via " << link_alignment_source << " with score of " << link_aln.score() << std::endl;
cerr << log_name() << "Aligned and added link of " << link_length << " bp read and " << link_graph_path_length << " bp graph via " << link_alignment_source << " with score of " << link_score << std::endl;
}
}

Expand Down

1 comment on commit d4407e8

@adamnovak
Copy link
Member Author

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 branch debug-zipcode-tree. View the full report here.

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

Please sign in to comment.