r451: changed rep_len mapq heuristic

This commit is contained in:
Heng Li 2017-09-28 14:23:14 -04:00
parent 935a6e6064
commit 2a554a92e9
2 changed files with 2 additions and 6 deletions

6
hit.c
View File

@ -366,12 +366,8 @@ void mm_set_mapq(int n_regs, mm_reg1_t *regs, int min_chain_sc, int match_sc, in
r->mapq = 0;
} else if (r->parent == r->id) {
int mapq, subsc;
float pen_s1 = r->score > 100? 1.0f : 0.01f * r->score;
float pen_s1 = (r->score > 100? 1.0f : 0.01f * r->score) * ((float)r->score / (r->score + rep_len));
float pen_cm = r->cnt > 10? 1.0f : 0.1f * r->cnt;
if (r->score <= 100 && rep_len > 0) {
pen_s1 = 0.01f * (r->score - rep_len);
pen_s1 = pen_s1 > 0.1f? pen_s1 : 0.1f;
}
pen_cm = pen_s1 < pen_cm? pen_s1 : pen_cm;
subsc = r->subsc > min_chain_sc? r->subsc : min_chain_sc;
if (r->p && r->p->dp_max2 > 0 && r->p->dp_max > 0) {

2
main.c
View File

@ -6,7 +6,7 @@
#include "mmpriv.h"
#include "getopt.h"
#define MM_VERSION "2.2-r450-dirty"
#define MM_VERSION "2.2-r451-dirty"
#ifdef __linux__
#include <sys/resource.h>