r852: a minor when large --end-bonus is in use

We may use a large --end-bonus to mimic end-to-end alignment. In the short-read
mode, the candidate alignment region may be out of the band, which leads to
truncated alignment.
This commit is contained in:
Heng Li 2018-10-15 21:28:27 -04:00
parent 5d5d392c02
commit d04ac068fd
2 changed files with 3 additions and 1 deletions

View File

@ -591,9 +591,11 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int
qs0 = 0, qe0 = qlen;
l = qs;
l += l * opt->a + opt->end_bonus > opt->q? (l * opt->a + opt->end_bonus - opt->q) / opt->e : 0;
l = l < opt->bw? l : opt->bw;
rs0 = rs - l > 0? rs - l : 0;
l = qlen - qe;
l += l * opt->a + opt->end_bonus > opt->q? (l * opt->a + opt->end_bonus - opt->q) / opt->e : 0;
l = l < opt->bw? l : opt->bw;
re0 = re + l < (int32_t)mi->seq[rid].len? re + l : mi->seq[rid].len;
} else {
// compute rs0 and qs0

2
main.c
View File

@ -6,7 +6,7 @@
#include "mmpriv.h"
#include "ketopt.h"
#define MM_VERSION "2.13-r850"
#define MM_VERSION "2.13-r852-dirty"
#ifdef __linux__
#include <sys/resource.h>