r126: filter by fraction of seed coverage

otherwise we may get too many poor overlap mappings.
This commit is contained in:
Heng Li
2017-06-30 22:15:45 -04:00
parent d73bb28097
commit 426c2975f6
6 changed files with 41 additions and 23 deletions
+3 -2
View File
@@ -20,6 +20,7 @@ void mm_mapopt_init(mm_mapopt_t *opt)
opt->bw = 1000;
opt->max_gap = 10000;
opt->max_chain_skip = 15;
opt->min_seedcov_ratio = 0.0f;
opt->pri_ratio = 2.0f;
opt->mask_level = 0.5f;
@@ -243,12 +244,12 @@ mm_reg1_t *mm_map_frag(const mm_mapopt_t *opt, const mm_idx_t *mi, mm_tbuf_t *b,
mm_join_long(b->km, opt, qlen, *n_regs, regs, a); // TODO: this can be applied to all-vs-all in principle
}
if (opt->flag & MM_F_CIGAR) {
regs = mm_align_skeleton(b->km, opt, mi, qlen, seq, n_regs, regs, a);
regs = mm_align_skeleton(b->km, opt, mi, qlen, seq, n_regs, regs, a); // this calls mm_filter_regs()
if (!(opt->flag & MM_F_AVA)) {
mm_update_parent(b->km, opt->mask_level, *n_regs, regs);
mm_select_sub(b->km, opt->mask_level, opt->pri_ratio, n_regs, regs);
}
}
} else mm_filter_regs(b->km, opt, n_regs, regs);
mm_set_mapq(*n_regs, regs);
// free