Skip to content

Commit a83a954

Browse files
Merge pull request #62 from smithlabcode/update-defn-for-pe-ambig
Updating the definition of ambiguous mappers for paired-end
2 parents 9f121df + 25fd5fc commit a83a954

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

data/md5sum.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ e95a8739a378bc5628c76ffbe8293682 tests/reads_1.fq
22
447647120a08d3b58162414fae4f4a39 tests/reads.mstats
33
5487eb32b5492ddba3a95a8461e2ff4c tests/reads_pbat_pe_1.fq
44
aff19aeae4184c38cf364b3a94527098 tests/reads_pbat_pe_2.fq
5-
d5edb7b66a5db666c98b9954306bbc09 tests/reads_pbat_pe.mstats
6-
6976cb8096a7b36dde542dff893271bc tests/reads_pbat_pe.sam
5+
adcdbadcd3cc14bfb57c170802e16bf7 tests/reads_pbat_pe.mstats
6+
07773c36061cbe787c568d97b9ab0d5e tests/reads_pbat_pe.sam
77
514bf940e7d5f44e57291a75e1fc6629 tests/reads_pe_1.fq
88
64e17fc1e424f9cb21879d38ddf745e5 tests/reads_pe_2.fq
9-
e36536c8320a2acbaa66efa0baec145a tests/reads_pe.mstats
10-
4fbbd861d63acee0e01aae8d0d7d071c tests/reads_pe.sam
9+
771991a3d074b6587f6faa8f538f7112 tests/reads_pe.mstats
10+
759c446ff985911feb074fe70843e248 tests/reads_pe.sam
1111
e94e71292fccd255bad3f3694efe7a4b tests/reads_rpbat_pe_1.fq
1212
8bfa00acd0639dc66acd5aa8ac0369d5 tests/reads_rpbat_pe_2.fq
13-
cc99b34bdb1f878d9d49e4140aa8fb19 tests/reads_rpbat_pe.mstats
14-
a0644d10b10bbe96f2fa295f4c02486f tests/reads_rpbat_pe.sam
13+
3a0a49feb314f6cb8fa49c4c114b52fc tests/reads_rpbat_pe.mstats
14+
64566ed0651fabe719f911b86cf05dc6 tests/reads_rpbat_pe.sam
1515
e7a2a3690bc17de0881e7fb2623841ec tests/reads.sam
1616
bcbf01be810cbf4051292813eb6b9225 tests/tRex1.idx

src/abismal.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,13 +445,15 @@ struct pe_element {
445445
}
446446

447447
bool update(const score_t scr, const se_element &s1, const se_element &s2) {
448-
if (scr > aln_score) {
448+
const auto rd = r1.diffs + r2.diffs;
449+
const auto sd = s1.diffs + s2.diffs;
450+
if (scr > aln_score || (scr == aln_score && sd < rd)) {
449451
r1 = s1;
450452
r2 = s2;
451453
aln_score = scr;
452454
return true;
453455
}
454-
else if (scr == aln_score) {
456+
else if (scr == aln_score && sd == rd) {
455457
r1.set_ambig();
456458
return false;
457459
}

0 commit comments

Comments
 (0)