fixed bug when retaining 2ndary aln; still buggy

This commit is contained in:
Heng Li
2017-07-02 19:08:30 -04:00
parent da90b614db
commit 74d306a596
5 changed files with 31 additions and 15 deletions
+5 -4
View File
@@ -22,8 +22,9 @@ void mm_mapopt_init(mm_mapopt_t *opt)
opt->max_chain_skip = 15;
opt->min_seedcov_ratio = 0.0f;
opt->pri_ratio = 2.0f;
opt->mask_level = 0.5f;
opt->pri_ratio = 2.0f;
opt->best_n = 5;
opt->max_join_long = 20000;
opt->max_join_short = 2000;
@@ -240,14 +241,14 @@ mm_reg1_t *mm_map_frag(const mm_mapopt_t *opt, const mm_idx_t *mi, mm_tbuf_t *b,
*n_regs = n_u;
if (!(opt->flag & MM_F_AVA)) { // don't choose primary mapping(s) for read overlap
mm_set_parent(b->km, opt->mask_level, *n_regs, regs);
mm_select_sub(b->km, opt->mask_level, opt->pri_ratio, n_regs, regs);
mm_join_long(b->km, opt, qlen, *n_regs, regs, a); // TODO: this can be applied to all-vs-all in principle
mm_select_sub(b->km, opt->mask_level, opt->pri_ratio, opt->best_n, n_regs, regs);
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); // 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);
mm_select_sub(b->km, opt->mask_level, opt->pri_ratio, opt->best_n, n_regs, regs);
}
} else mm_filter_regs(b->km, opt, n_regs, regs);
mm_set_mapq(*n_regs, regs);