r450: differentiate exact repeats via mapq
This commit is contained in:
parent
a13691d00d
commit
935a6e6064
1
hit.c
1
hit.c
|
|
@ -383,6 +383,7 @@ void mm_set_mapq(int n_regs, mm_reg1_t *regs, int min_chain_sc, int match_sc, in
|
|||
mapq -= (int)(4.343f * logf(r->n_sub + 1) + .499f);
|
||||
mapq = mapq > 0? mapq : 0;
|
||||
r->mapq = mapq < 60? mapq : 60;
|
||||
if (r->p && r->p->dp_max > r->p->dp_max2 && r->mapq == 0) r->mapq = 1;
|
||||
} else r->mapq = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
main.c
2
main.c
|
|
@ -6,7 +6,7 @@
|
|||
#include "mmpriv.h"
|
||||
#include "getopt.h"
|
||||
|
||||
#define MM_VERSION "2.2-r448-dirty"
|
||||
#define MM_VERSION "2.2-r450-dirty"
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/resource.h>
|
||||
|
|
|
|||
7
pe.c
7
pe.c
|
|
@ -135,6 +135,13 @@ void mm_pair(void *km, int max_gap_ref, int pe_bonus, int sub_diff, int match_sc
|
|||
}
|
||||
if (r[0]->mapq < mapq_pe) r[0]->mapq = (r[0]->mapq + mapq_pe) / 2;
|
||||
if (r[1]->mapq < mapq_pe) r[1]->mapq = (r[1]->mapq + mapq_pe) / 2;
|
||||
if (sc.n == 1) {
|
||||
if (r[0]->mapq < 2) r[0]->mapq = 2;
|
||||
if (r[1]->mapq < 2) r[1]->mapq = 2;
|
||||
} else if (max > sc.a[sc.n - 2]) {
|
||||
if (r[0]->mapq < 1) r[0]->mapq = 1;
|
||||
if (r[1]->mapq < 1) r[1]->mapq = 1;
|
||||
}
|
||||
}
|
||||
|
||||
kfree(km, a);
|
||||
|
|
|
|||
Loading…
Reference in New Issue