Skip to content

Commit

Permalink
Merge pull request #4316 from vgteam/pad-fallback-alignments
Browse files Browse the repository at this point in the history
Pad out fallback pair alignments
  • Loading branch information
adamnovak authored Jul 1, 2024
2 parents 5bc8f8a + 870339b commit 1f0e29d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/minimizer_mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1364,6 +1364,14 @@ pair<vector<Alignment>, vector<Alignment>> MinimizerMapper::map_paired(Alignment

// Map single-ended and bail
std::array<vector<Alignment>, 2> mapped_pair = {map(aln1), map(aln2)};
// We have no way to know which mapping ought to go with each other, so pad out
// the shorter list with copies of the first item, so we can report all mappings
// we got.
for (size_t index = 0; index < 2; index++) {
while (mapped_pair[index].size() < mapped_pair[1 - index].size()) {
mapped_pair[index].push_back(mapped_pair[index].front());
}
}
pair_all(mapped_pair);
return {std::move(mapped_pair[0]), std::move(mapped_pair[1])};
}
Expand Down

1 comment on commit 1f0e29d

@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 merge to master. View the full report here.

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

Please sign in to comment.