r983: bugfix - wrong mate info

Picard now gives a clean bill.
This commit is contained in:
Heng Li 2014-11-10 13:15:11 -05:00
parent a81603217e
commit 7eabcf42c4
2 changed files with 8 additions and 3 deletions

View File

@ -362,8 +362,13 @@ int mem_sam_pe(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac, co
no_pairing:
for (i = 0; i < 2; ++i) {
if (a[i].n && a[i].a[0].score >= opt->T)
h[i] = mem_reg2aln(opt, bns, pac, s[i].l_seq, s[i].seq, &a[i].a[0]);
int which = -1;
if (a[i].n) {
if (a[i].a[0].score >= opt->T) which = 0;
else if (n_pri[i] < a[i].n && a[i].a[n_pri[i]].score >= opt->T)
which = n_pri[i];
}
if (which >= 0) h[i] = mem_reg2aln(opt, bns, pac, s[i].l_seq, s[i].seq, &a[i].a[which]);
else h[i] = mem_reg2aln(opt, bns, pac, s[i].l_seq, s[i].seq, 0);
}
if (!(opt->flag & MEM_F_NOPAIRING) && h[0].rid == h[1].rid && h[0].rid >= 0) { // if the top hits from the two ends constitute a proper pair, flag it.

2
main.c
View File

@ -4,7 +4,7 @@
#include "utils.h"
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "0.7.10-r963-dirty"
#define PACKAGE_VERSION "0.7.10-r983-dirty"
#endif
int bwa_fa2pac(int argc, char *argv[]);