Skip to content

Commit

Permalink
Penalize far apart pairs not more than as if they were two single ends
Browse files Browse the repository at this point in the history
See #321
  • Loading branch information
marcelm committed Aug 27, 2023
1 parent 4893484 commit 19d5d20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* #293: Fix: When mapping single-end reads, many multimappers were previously
assigned a high mapping quality. They now get assigned mapping quality zero
as intended.
* #321: Fix: For paired-end reads that cannot be placed as proper pairs, we now
prefer placing them onto the same chrosome instead of on different ones if
there is a choice.
* #318: Added a `--details` option mainly intended for debugging. When used,
some strobealign-specific tags are added to the SAM output that inform about
things like no. of seeds found, whether mate rescue was performed etc.
Expand Down
2 changes: 1 addition & 1 deletion src/aln.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ inline void align_PE(
if (r1_r2 || r2_r1) {
// Treat a1/a2 as a pair
float x = std::abs(a1.ref_start - a2.ref_start);
combined_score = (double)a1.score + (double)a2.score + log(normal_pdf(x, mu, sigma));
combined_score = (double)a1.score + (double)a2.score + std::max(-20.0f + 0.001f, log(normal_pdf(x, mu, sigma)));
//* (1 - s2 / s1) * min_matches * log(s1);
} else {
// Treat a1/a2 as two single-end reads
Expand Down

0 comments on commit 19d5d20

Please sign in to comment.