r1185: don't lower supp mapq with -5

This commit is contained in:
Heng Li 2017-09-11 09:58:41 -04:00
parent a9c688ac92
commit 340babdd67
2 changed files with 3 additions and 2 deletions

View File

@ -1026,7 +1026,8 @@ void mem_reg2sam(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac,
if (p->secondary >= 0) q->sub = -1; // don't output sub-optimal score
if (l && p->secondary < 0) // if supplementary
q->flag |= (opt->flag&MEM_F_NO_MULTI)? 0x10000 : 0x800;
if (l && !p->is_alt && q->mapq > aa.a[0].mapq) q->mapq = aa.a[0].mapq;
if (!(opt->flag&MEM_F_PRIMARY5) && l && !p->is_alt && q->mapq > aa.a[0].mapq)
q->mapq = aa.a[0].mapq; // lower mapq for supplementary mappings, unless -5 is applied
++l;
}
if (aa.n == 0) { // no alignments good enough; then write an unaligned record

2
main.c
View File

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