INNER CODE UNIT · C
qp
lh3/ksw2 · ksw2_extd.c:19
qp = (int8_t*)kmalloc(km, qlen * m);
eh = (eh_t*)kcalloc(km, qlen + 1, sizeof(eh_t));
if (with_cigar) {
z = (uint8_t*)kmalloc(km, (size_t)n_col * tlen);
off = (int32_t*)kcalloc(km, tlen, 4);
}
// generate the query profile
for (k = i = 0; k < m; ++k) {
const int8_t *p = &mat[k * m];
for (j = 0; j < qlen; ++j) qp[i++] = p[query[j]];
}
// fill the first row
eh[0].h = 0, eh[0].e = -gapoe - gapoe, eh[0].e2 = -gapoe2 - gapoe2;
for (j = 1; j <= qlen && j <= w; ++j) {
int tmp;
eh[j].h = -(gapo + gape * j) > -(gapo2 + gape2 * j)? -(gapo + gape * j) : -(gapo2 + gape2 * j);