This commit is contained in:
Heng Li 2017-09-20 11:47:46 -04:00
parent 645db3350e
commit 03d6894517
3 changed files with 20 additions and 2 deletions

14
hit.c
View File

@ -293,7 +293,19 @@ void mm_join_long(void *km, const mm_mapopt_t *opt, int qlen, int *n_regs_, mm_r
mm_sync_regs(km, *n_regs_, regs);
}
}
/*
void mm_sep_seg(void *km, int n_segs, int qlen_sum, int n_regs0, mm_reg1_t *regs0, mm128_t *a, mm_segreg_t *seg)
{ // TODO: this implement is inefficient given a large n_segs
int s, i, j;
memset(seg, 0, n_segs * sizeof(mm_segreg_t));
for (i = 0; i < n_regs0; ++i) {
mm_reg1_t *r = &regs0[i];
for (j = 0; j < r->cnt; ++j) {
++seg[(a[r->as + j].y&MM_SEED_SEG_MASK)>>MM_SEED_SEG_SHIFT].n_a;
}
}
}
*/
void mm_set_mapq(int n_regs, mm_reg1_t *regs, int min_chain_sc, int match_sc, int rep_len)
{
static const float q_coef = 40.0f;

2
map.c
View File

@ -268,7 +268,7 @@ mm_reg1_t *mm_map_seg(const mm_idx_t *mi, int n_segs, int *qlens, const char *se
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, opt->a * 2 + opt->b);
mm_select_sub(b->km, opt->mask_level, opt->pri_ratio, mi->k*2, opt->best_n, n_regs, regs);
if (!(opt->flag & MM_F_SPLICE))
if (!(opt->flag & MM_F_SPLICE) && !(opt->flag & MM_F_SR))
mm_join_long(b->km, opt, qlen_sum, n_regs, regs, a); // TODO: this can be applied to all-vs-all in principle
}

View File

@ -39,6 +39,12 @@ typedef struct __kstring_t {
} kstring_t;
#endif
typedef struct {
int n_regs, n_a;
mm_reg1_t *regs;
mm128_t *a;
} mm_segreg_t;
double cputime(void);
double realtime(void);