fixed negative mapping quality; still byggy
This commit is contained in:
parent
8512b55ce3
commit
b204437c7e
|
|
@ -428,6 +428,7 @@ static void print_hits(const bntseq_t *bns, const bsw2opt_t *opt, bsw2seq1_t *ks
|
|||
if (p->n_seeds < 2) c *= .2;
|
||||
qual = (int)(c * (p->G - subo) * (250.0 / p->G + 0.03 / opt->a) + .499);
|
||||
if (qual > 250) qual = 250;
|
||||
if (qual < 0) qual = 0;
|
||||
if (p->flag&1) qual = 0;
|
||||
}
|
||||
ksprintf(&str, "\t%d\t", qual);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ typedef struct {
|
|||
|
||||
#include "ksort.h"
|
||||
KSORT_INIT_GENERIC(int)
|
||||
#define __hitG_lt(a, b) ((a).n_seeds > (b).n_seeds || ((a).n_seeds == (b).n_seeds && (a).G > (b).G))
|
||||
#define __hitG_lt(a, b) (((a).G + ((int)(a).n_seeds<<2)) > (b).G + ((int)(b).n_seeds<<2))
|
||||
KSORT_INIT(hitG, bsw2hit_t, __hitG_lt)
|
||||
|
||||
static const bsw2cell_t g_default_cell = { 0, 0, MINUS_INF, MINUS_INF, MINUS_INF, 0, 0, 0, -1, -1, {-1, -1, -1, -1} };
|
||||
|
|
|
|||
Loading…
Reference in New Issue