r826: improved alt mapping for PE
This commit is contained in:
parent
aee53f1334
commit
bd85af08ab
|
|
@ -276,9 +276,9 @@ int mem_sam_pe(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac, co
|
|||
char **XA[2];
|
||||
// check if an end has multiple hits even after mate-SW
|
||||
for (i = 0; i < 2; ++i) {
|
||||
for (j = 1; j < a[i].n; ++j)
|
||||
for (j = 1; j < n_pri[i]; ++j)
|
||||
if (a[i].a[j].secondary < 0 && a[i].a[j].score >= opt->T) break;
|
||||
is_multi[i] = j < a[i].n? 1 : 0;
|
||||
is_multi[i] = j < n_pri[i]? 1 : 0;
|
||||
}
|
||||
if (is_multi[0] || is_multi[1]) goto no_pairing; // TODO: in rare cases, the true hit may be long but with low score
|
||||
// compute mapQ for the best SE hit
|
||||
|
|
@ -316,7 +316,7 @@ int mem_sam_pe(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac, co
|
|||
int k = a[i].a[z[i]].secondary;
|
||||
if (k >= 0) { // switch secondary and primary
|
||||
assert(a[i].a[k].secondary < 0);
|
||||
for (j = 0; j < a[i].n; ++j)
|
||||
for (j = 0; j < n_pri[i]; ++j)
|
||||
if (a[i].a[j].secondary == k || j == k)
|
||||
a[i].a[j].secondary = z[i];
|
||||
a[i].a[z[i]].secondary = -1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue