diff --git a/NEWS.md b/NEWS.md index cb05d54..7cf6ee4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,14 @@ +Release 0.9-r223 (9 March 2023) +------------------------------- + +Notable change: + + * Bugfix: not query proteins were outputted with option `-u`. + +(0.9: 9 March 2023, r223) + + + Release 0.8-r220 (6 March 2023) ------------------------------- diff --git a/map.c b/map.c index f53dadf..1270cd6 100644 --- a/map.c +++ b/map.c @@ -289,24 +289,24 @@ static void *worker_pipeline(void *shared, int step, void *in) return in; } else if (step == 2) { // step 2: output step_t *s = (step_t*)in; - int32_t j; for (i = 0; i < p->n_threads; ++i) mp_tbuf_destroy(s->buf[i]); free(s->buf); for (i = 0; i < s->n_seq; ++i) { - int32_t best_sc = -1; - if (s->n_reg[i] == 0) { - mp_write_output(&p->str, 0, p->mi, &s->seq[i], 0, p->opt, 0, 0); - fwrite(p->str.s, 1, p->str.l, stdout); - } else { + int32_t best_sc = -1, j, n_out; + if (s->n_reg[i] > 0) best_sc = s->reg[i][0].p? s->reg[i][0].p->dp_max : s->reg[i][0].chn_sc; - } - for (j = 0; j < s->n_reg[i] && j < p->opt->out_n; ++j) { + for (j = 0, n_out = 0; j < s->n_reg[i] && j < p->opt->out_n; ++j) { const mp_reg1_t *r = &s->reg[i][j]; int32_t sc = r->p? r->p->dp_max : r->chn_sc; if (sc <= 0 || sc < (double)best_sc * p->opt->out_sim) continue; if (r->qe - r->qs < (double)s->seq[i].l_seq * p->opt->out_cov) continue; mp_write_output(&p->str, 0, p->mi, &s->seq[i], r, p->opt, ++p->id, j + 1); fwrite(p->str.s, 1, p->str.l, stdout); + ++n_out; + } + if (n_out == 0) { + mp_write_output(&p->str, 0, p->mi, &s->seq[i], 0, p->opt, 0, 0); + fwrite(p->str.s, 1, p->str.l, stdout); } for (j = 0; j < s->n_reg[i]; ++j) { free(s->reg[i][j].feat); diff --git a/miniprot.1 b/miniprot.1 index 423005e..caab7e5 100644 --- a/miniprot.1 +++ b/miniprot.1 @@ -1,4 +1,4 @@ -.TH miniprot 1 "6 March 2023" "miniprot-0.8 (r220)" "Bioinformatics tools" +.TH miniprot 1 "9 March 2023" "miniprot-0.9 (r223)" "Bioinformatics tools" .SH NAME .PP miniprot - protein-to-genome alignment with splicing and frameshifts diff --git a/miniprot.h b/miniprot.h index 49fae17..cd81b90 100644 --- a/miniprot.h +++ b/miniprot.h @@ -3,7 +3,7 @@ #include -#define MP_VERSION "0.8-r220" +#define MP_VERSION "0.9-r223" #define MP_F_NO_SPLICE 0x1 #define MP_F_NO_ALIGN 0x2