diff --git a/main.c b/main.c index d9008f2..c27d6e9 100644 --- a/main.c +++ b/main.c @@ -10,7 +10,7 @@ #include "minimap.h" #include "mmpriv.h" -#define MM_VERSION "2.0-r169-pre" +#define MM_VERSION "2.0-r170-pre" void liftrlimit() { @@ -48,6 +48,7 @@ static struct option long_options[] = { { "no-kalloc", no_argument, 0, 0 }, { "print-qname", no_argument, 0, 0 }, { "no-self", no_argument, 0, 0 }, + { "print-seed", no_argument, 0, 0 }, { "version", no_argument, 0, 'V' }, { "min-count", required_argument, 0, 'n' }, { "min-chain-score",required_argument, 0, 'm' }, @@ -100,7 +101,8 @@ int main(int argc, char *argv[]) else if (c == 0 && long_idx == 2) keep_name = 0; // --int-rname else if (c == 0 && long_idx == 3) mm_dbg_flag |= MM_DBG_NO_KALLOC; // --no-kalloc else if (c == 0 && long_idx == 4) mm_dbg_flag |= MM_DBG_PRINT_QNAME; // --print-qname - else if (c == 0 && long_idx == 5) opt.flag |= MM_F_NO_SELF; + else if (c == 0 && long_idx == 5) opt.flag |= MM_F_NO_SELF; // --no-self + else if (c == 0 && long_idx == 6) mm_dbg_flag |= MM_DBG_PRINT_QNAME | MM_DBG_PRINT_SEED; // --print-seed else if (c == 'V') { puts(MM_VERSION); return 0; diff --git a/map.c b/map.c index 8ca14b8..2e42dd1 100644 --- a/map.c +++ b/map.c @@ -236,6 +236,10 @@ mm_reg1_t *mm_map_frag(const mm_mapopt_t *opt, const mm_idx_t *mi, mm_tbuf_t *b, if (m[i].is_alloc) kfree(b->km, m[i].x.r); kfree(b->km, m); + if (mm_dbg_flag & MM_DBG_PRINT_SEED) + for (i = 0; i < n_a; ++i) + fprintf(stderr, "SD\t%d\t%c\t%s\t%d\t%d\n", (int32_t)a[i].y, "+-"[a[i].x>>63], mi->seq[a[i].x<<1>>33].name, (int32_t)a[i].x, (int32_t)(a[i].y>>32&0xff)); + n_u = mm_chain_dp(opt->max_gap, opt->bw, opt->max_chain_skip, opt->min_cnt, opt->min_chain_score, n_a, a, &u, b->km); regs = mm_gen_regs(b->km, qlen, n_u, u, a); *n_regs = n_u; @@ -296,7 +300,7 @@ static void worker_for(void *_data, long i, int tid) // kt_for() callback { step_t *step = (step_t*)_data; if (mm_dbg_flag & MM_DBG_PRINT_QNAME) - fprintf(stderr, "Processing query %s on thread %d\n", step->seq[i].name, tid); + fprintf(stderr, "QR\t%s\t%d\n", step->seq[i].name, tid); step->reg[i] = mm_map(step->p->mi, step->seq[i].l_seq, step->seq[i].seq, &step->n_reg[i], step->buf[tid], step->p->opt, step->seq[i].name); } diff --git a/mmpriv.h b/mmpriv.h index 8d1b8d8..6fff097 100644 --- a/mmpriv.h +++ b/mmpriv.h @@ -10,6 +10,7 @@ #define MM_DBG_NO_KALLOC 0x1 #define MM_DBG_PRINT_QNAME 0x2 +#define MM_DBG_PRINT_SEED 0x4 #ifndef kroundup32 #define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))