From 99c57b86c55101cee53e905bed0fd3f4b36a00a5 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Mon, 26 Jun 2017 15:28:04 -0400 Subject: [PATCH] r79: drop bad hits --- main.c | 2 +- map.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 6bb7dfb..451fd19 100644 --- a/main.c +++ b/main.c @@ -10,7 +10,7 @@ #include "minimap.h" #include "mmpriv.h" -#define MM_VERSION "2.0-r78-pre" +#define MM_VERSION "2.0-r79-pre" void liftrlimit() { diff --git a/map.c b/map.c index 006b002..c3cb1e3 100644 --- a/map.c +++ b/map.c @@ -55,7 +55,7 @@ mm_tbuf_t *mm_tbuf_init(void) { mm_tbuf_t *b; b = (mm_tbuf_t*)calloc(1, sizeof(mm_tbuf_t)); -// b->km = km_init(); + b->km = km_init(); b->sdb = sdust_buf_init(b->km); return b; } @@ -369,6 +369,8 @@ static void *worker_pipeline(void *shared, int step, void *in) bseq1_t *t = &s->seq[i]; for (j = 0; j < s->n_reg[i]; ++j) { mm_reg1_t *r = &s->reg[i][j]; + if (r->p && r->p->blen - r->p->n_ambi - r->p->n_diff < p->opt->min_score) + continue; if (p->opt->flag & MM_F_OUT_SAM) mm_write_sam(&p->str, mi, t, j, r); else mm_write_paf(&p->str, mi, t, j, r); puts(p->str.s);