r742: further control the max bandwidth
I am looking at 6kb bandwidth...
This commit is contained in:
parent
7954e77a1b
commit
fa20c71920
4
bwamem.c
4
bwamem.c
|
|
@ -381,6 +381,7 @@ int mem_patch_reg(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac,
|
|||
} 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;
|
||||
w = w < opt->w<<2? w : opt->w<<2;
|
||||
if (bwa_verbose >= 4) printf("* test potential hit merge with global alignment; w=%d\n", w);
|
||||
bwa_gen_cigar2(opt->mat, opt->o_del, opt->e_del, opt->o_ins, opt->e_ins, w, bns->l_pac, pac, b->qe - a->qb, query + a->qb, a->rb, b->re, &score, 0, 0);
|
||||
q_s = (int)((double)(b->qe - a->qb) / ((b->qe - b->qb) + (a->qe - a->qb)) * (b->score + a->score) + .499); // predicted score from query
|
||||
|
|
@ -1044,9 +1045,10 @@ mem_aln_t mem_reg2aln2(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t
|
|||
i = 0; a.cigar = 0;
|
||||
do {
|
||||
free(a.cigar);
|
||||
w2 = w2 < opt->w<<2? w2 : opt->w<<2;
|
||||
a.cigar = bwa_gen_cigar2(opt->mat, opt->o_del, opt->e_del, opt->o_ins, opt->e_ins, w2, bns->l_pac, pac, qe - qb, (uint8_t*)&query[qb], rb, re, &score, &a.n_cigar, &NM);
|
||||
if (bwa_verbose >= 4) printf("* Final alignment: w2=%d, global_sc=%d, local_sc=%d\n", w2, score, ar->truesc);
|
||||
if (score == last_sc) break; // it is possible that global alignment and local alignment give different scores
|
||||
if (score == last_sc || w2 == opt->w<<2) break; // it is possible that global alignment and local alignment give different scores
|
||||
last_sc = score;
|
||||
w2 <<= 1;
|
||||
} while (++i < 3 && score < ar->truesc - opt->a);
|
||||
|
|
|
|||
2
ksw.c
2
ksw.c
|
|
@ -510,7 +510,7 @@ int ksw_global2(int qlen, const uint8_t *query, int tlen, const uint8_t *target,
|
|||
if (n_cigar_) *n_cigar_ = 0;
|
||||
// allocate memory
|
||||
n_col = qlen < 2*w+1? qlen : 2*w+1; // maximum #columns of the backtrack matrix
|
||||
z = n_cigar_ && cigar_? malloc(n_col * tlen) : 0;
|
||||
z = n_cigar_ && cigar_? malloc((long)n_col * tlen) : 0;
|
||||
qp = malloc(qlen * m);
|
||||
eh = calloc(qlen + 1, 8);
|
||||
// generate the query profile
|
||||
|
|
|
|||
Loading…
Reference in New Issue