r740: don't attempt merge if bandwidth too large
Sometimes the bandwidth can be >10k.
This commit is contained in:
parent
5aedc978d1
commit
4b2441069f
5
bwamem.c
5
bwamem.c
|
|
@ -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",
|
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);
|
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 (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 (w > opt->w<<1 || r >= PATCH_MAX_R_BW) return 0; // the bandwidth or the relative bandwidth is too large
|
||||||
if (r >= PATCH_MAX_R_BW) return 0; // 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
|
// global alignment
|
||||||
w += a->w + b->w;
|
w += a->w + b->w;
|
||||||
if (bwa_verbose >= 4) printf("* test potential hit merge with global alignment; w=%d\n", w);
|
if (bwa_verbose >= 4) printf("* test potential hit merge with global alignment; w=%d\n", w);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue