Skip to content

Commit

Permalink
Avoid MAPQ=60 for single-end multimappers
Browse files Browse the repository at this point in the history
by ensuring that we compute at least two alignments even if the first that
is found has edit distance 0.

See #293
  • Loading branch information
marcelm committed Aug 23, 2023
1 parent 40748fe commit 715fced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aln.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static inline void align_SE(
int min_mapq_diff = best_edit_distance;
for (auto &nam : nams) {
float score_dropoff = (float) nam.n_hits / n_max.n_hits;
if (tries >= max_tries || best_edit_distance == 0 || score_dropoff < dropoff_threshold) {
if (tries >= max_tries || (max_tries > 1 && best_edit_distance == 0) || score_dropoff < dropoff_threshold) {
break;
}
bool consistent_nam = reverse_nam_if_needed(nam, read, references, k);
Expand Down

0 comments on commit 715fced

Please sign in to comment.