mirror of
https://github.com/lh3/minimap2.git
synced 2026-09-15 13:07:55 +08:00
debugging code
This commit is contained in:
9
index.c
9
index.c
@@ -148,12 +148,13 @@ int mm_idx_getseq2(const mm_idx_t *mi, uint32_t rid, uint32_t st, uint32_t en, u
|
||||
uint32_t i, z;
|
||||
memset(b, 0, en - st);
|
||||
z = mm_idx_bed_query(mi, (uint64_t)rid << 32 | st);
|
||||
for (i = z + 1; i < mi->n_R; ++i) {
|
||||
for (i = z < 0? 0 : z; i < mi->n_R; ++i) {
|
||||
uint32_t j, rr, rs, re;
|
||||
rr = mi->R[i].x >> 32, rs = (uint32_t)mi->R[i].x, re = mi->R[i].end;
|
||||
if (rr != rid || rs >= en) break;
|
||||
assert(rs >= st);
|
||||
for (j = rs; j < re; ++j)
|
||||
if (rr > rid || rs >= en) break;
|
||||
if (rr < rid) continue;
|
||||
re = re < en? re : en;
|
||||
for (j = st > rs? st : rs; j < re; ++j)
|
||||
b[j - st] = mi->R[i].score;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +112,9 @@ void ksw_extd2_sse(void *km, int qlen, const uint8_t *query, int tlen, const uin
|
||||
if (qd) {
|
||||
int8_t *tmp = (int8_t*)dv;
|
||||
for (t = 0; t < tlen; ++t) tmp[t] = -qd[t];
|
||||
fprintf(stderr, "%d\t%d\t%x\n", tlen, qlen, flag&KSW_EZ_RIGHT);
|
||||
for (t = 0; t < tlen; ++t) fputc("ACGTN"[target[t]], stderr); fputc('\n', stderr);
|
||||
for (t = 0; t < tlen; ++t) fputc('0' + qd[t], stderr); fputc('\n', stderr);
|
||||
}
|
||||
if (!approx_max) {
|
||||
H = (int32_t*)kmalloc(km, tlen_ * 16 * 4);
|
||||
@@ -383,6 +386,7 @@ void ksw_extd2_sse(void *km, int qlen, const uint8_t *query, int tlen, const uin
|
||||
last_st = st, last_en = en;
|
||||
//for (t = st0; t <= en0; ++t) printf("(%d,%d)\t(%d,%d,%d,%d)\t%d\n", r, t, ((int8_t*)u)[t], ((int8_t*)v)[t], ((int8_t*)x)[t], ((int8_t*)y)[t], H[t]); // for debugging
|
||||
}
|
||||
fprintf(stderr, "score: %d\n", ez->score);
|
||||
kfree(km, mem);
|
||||
if (!approx_max) kfree(km, H);
|
||||
if (with_cigar) { // backtrack
|
||||
|
||||
Reference in New Issue
Block a user