r684: separate end score from min_chain_score

This commit is contained in:
Heng Li 2018-02-05 11:40:38 -05:00
parent 3df5015668
commit dbf284b2d9
6 changed files with 9 additions and 4 deletions

View File

@ -307,7 +307,7 @@ static void mm_fix_bad_ends(const mm_reg1_t *r, const mm128_t *a, int bw, int mi
if (max - min > l >> 1) *as = i;
l += min;
m += min < q_span? min : q_span;
if (l >= bw << 1 || m >= min_match) break;
if (l >= bw << 1 || m >= min_match || m >= r->mlen >> 1) break;
}
*cnt = r->as + r->cnt - *as;
m = l = a[r->as + r->cnt - 1].y >> 32 & 0xff;
@ -321,7 +321,7 @@ static void mm_fix_bad_ends(const mm_reg1_t *r, const mm128_t *a, int bw, int mi
if (max - min > l >> 1) *cnt = i + 1 - *as;
l += min;
m += min < q_span? min : q_span;
if (l >= bw << 1 || m >= min_match) break;
if (l >= bw << 1 || m >= min_match || m >= r->mlen >> 1) break;
}
}
@ -422,7 +422,7 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int
if (is_splice) {
mm_fix_bad_ends_splice(km, opt, mi, r, mat, qlen, qseq0, a, &as1, &cnt1);
} else {
mm_fix_bad_ends(r, a, opt->bw, opt->min_chain_score, &as1, &cnt1);
mm_fix_bad_ends(r, a, opt->bw, opt->min_end_match, &as1, &cnt1);
}
mm_filter_bad_seeds(km, as1, cnt1, a, 10, 40, opt->max_gap>>1, 10);
mm_adjust_minier(mi, qseq0, &a[as1], &rs, &qs);

2
main.c
View File

@ -6,7 +6,7 @@
#include "mmpriv.h"
#include "getopt.h"
#define MM_VERSION "2.8-r677-dirty"
#define MM_VERSION "2.8-r684-dirty"
#ifdef __linux__
#include <sys/resource.h>

View File

@ -120,6 +120,7 @@ typedef struct {
int end_bonus;
int min_dp_max; // drop an alignment if the score of the max scoring segment is below this threshold
int min_ksw_len;
int min_end_match;
int anchor_ext_len, anchor_ext_shift;
int pe_ori, pe_bonus;

2
misc/mapstat.js 100644 → 100755
View File

@ -1,3 +1,5 @@
#!/usr/bin/env k8
var getopt = function(args, ostr) {
var oli; // option letter list index
if (typeof(getopt.place) == 'undefined')

View File

@ -28,6 +28,7 @@ void mm_mapopt_init(mm_mapopt_t *opt)
opt->end_bonus = -1;
opt->min_dp_max = opt->min_chain_score * opt->a;
opt->min_ksw_len = 200;
opt->min_end_match = 200;
opt->anchor_ext_len = 20, opt->anchor_ext_shift = 6;
opt->mini_batch_size = 500000000;

View File

@ -30,6 +30,7 @@ cdef extern from "minimap.h":
int end_bonus
int min_dp_max
int min_ksw_len
int min_end_match;
int anchor_ext_len, anchor_ext_shift
int pe_ori, pe_bonus
float mid_occ_frac