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];
|
char **XA[2];
|
||||||
// check if an end has multiple hits even after mate-SW
|
// check if an end has multiple hits even after mate-SW
|
||||||
for (i = 0; i < 2; ++i) {
|
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;
|
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
|
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
|
// 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;
|
int k = a[i].a[z[i]].secondary;
|
||||||
if (k >= 0) { // switch secondary and primary
|
if (k >= 0) { // switch secondary and primary
|
||||||
assert(a[i].a[k].secondary < 0);
|
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)
|
if (a[i].a[j].secondary == k || j == k)
|
||||||
a[i].a[j].secondary = z[i];
|
a[i].a[j].secondary = z[i];
|
||||||
a[i].a[z[i]].secondary = -1;
|
a[i].a[z[i]].secondary = -1;
|
||||||
|
|
|
||||||
2
main.c
2
main.c
|
|
@ -4,7 +4,7 @@
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef PACKAGE_VERSION
|
#ifndef PACKAGE_VERSION
|
||||||
#define PACKAGE_VERSION "0.7.10-r824-dirty"
|
#define PACKAGE_VERSION "0.7.10-r826-dirty"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int bwa_fa2pac(int argc, char *argv[]);
|
int bwa_fa2pac(int argc, char *argv[]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue