Skip to content

Commit

Permalink
r826: improved alt mapping for PE
Browse files Browse the repository at this point in the history
  • Loading branch information
lh3 committed Sep 15, 2014
1 parent aee53f1 commit bd85af0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bwamem_pair.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "utils.h"

#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "0.7.10-r824-dirty"
#define PACKAGE_VERSION "0.7.10-r826-dirty"
#endif

int bwa_fa2pac(int argc, char *argv[]);
Expand Down

0 comments on commit bd85af0

Please sign in to comment.