r740: don't attempt merge if bandwidth too large

Sometimes the bandwidth can be >10k.
This commit is contained in:
Heng Li 2014-05-01 11:01:52 -04:00
parent 5aedc978d1
commit 4b2441069f
2 changed files with 3 additions and 4 deletions

View File

@ -377,9 +377,8 @@ int mem_patch_reg(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac,
printf("* potential hit merge between [%d,%d)<=>[%ld,%ld) and [%d,%d)<=>[%ld,%ld), @ %s; w=%d, r=%.4g\n",
a->qb, a->qe, (long)a->rb, (long)a->re, b->qb, b->qe, (long)b->rb, (long)b->re, bns->anns[a->rid].name, w, r);
if (a->re < b->rb || a->qe < b->qb) { // no overlap on query or on ref
if (w > opt->w<<1) return 0; // the bandwidth is too large
if (r >= PATCH_MAX_R_BW) return 0; // relative bandwidth is too large
}
if (w > opt->w<<1 || r >= PATCH_MAX_R_BW) return 0; // the bandwidth or the relative bandwidth is too large
} else if (w > opt->w<<2 || r >= PATCH_MAX_R_BW*2) return 0; // more permissive if overlapping on both ref and query
// global alignment
w += a->w + b->w;
if (bwa_verbose >= 4) printf("* test potential hit merge with global alignment; w=%d\n", w);

2
main.c
View File

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