before window filling

This commit is contained in:
chhylp123
2022-10-01 23:42:38 -04:00
parent bbd3394b4a
commit 41437764f0
5 changed files with 88 additions and 41 deletions

View File

@@ -6030,7 +6030,19 @@ static void worker_for_ul_scall_alignment(void *data, long i, int tid) // callba
// fprintf(stderr, "[M::%s::%lu::] l1->%u; l2->%u\n", UL_INF.nid.a[s->id+i].a, s->len[i], l1, l2);
}
overlap_region *gen_aux_ovlp(overlap_region_alloc* ol)
{
if (ol->length + 1 > ol->size) {
uint64_t sl = ol->size;
ol->size = ol->length + 1;
kroundup64(ol->size);
REALLOC(ol->list, ol->size);
/// need to set new space to be 0
memset(ol->list + sl, 0, sizeof(overlap_region)*(ol->size - sl));
}
memset((&(ol->list[ol->length+1])), 0, sizeof(overlap_region));
return &(ol->list[ol->length+1]);
}
static void worker_for_ul_rescall_alignment(void *data, long i, int tid) // callback for kt_for()
{
@@ -6040,6 +6052,7 @@ static void worker_for_ul_rescall_alignment(void *data, long i, int tid) // call
int64_t /**rid = s->id+i,**/ winLen = MIN((((double)THRESHOLD_MAX_SIZE)/s->opt->diff_ec_ul), WINDOW), ton = 0;
uint32_t high_occ = 2, phase = 1;
asg64_v b0, b1, b2;
overlap_region *aux_o = NULL;
// uint64_t align = 0;
// if(UL_INF.a[s->id+i].rlen != s->len[i]) {
@@ -6050,7 +6063,7 @@ static void worker_for_ul_rescall_alignment(void *data, long i, int tid) // call
// if(s->id+i!=41927 && s->id+i!=47072 && s->id+i!=67641 && s->id+i!=90305 && s->id+i!=698342 && s->id+i!=329421) {
// return;
// }
// if((s->id+i!=291) /**&& (s->id+i!=44) && (s->id+i!=948)**/) return;
// if((s->id+i!=6) /**&& (s->id+i!=44) && (s->id+i!=948)**/) return;
// fprintf(stderr, "\n[M::%s] rid::%ld, len::%lu, name::%.*s\n", __func__, s->id+i, s->len[i],
// (int32_t)UL_INF.nid.a[s->id+i].n, UL_INF.nid.a[s->id+i].a);
@@ -6073,10 +6086,11 @@ static void worker_for_ul_rescall_alignment(void *data, long i, int tid) // call
// memset(&b->self_read, 0, sizeof(b->self_read));
ul_lalign(&b->olist, &b->clist, s->uu, s->seq[i], s->len[i], &b->self_read, &b->ovlp_read,
&b->correct, &b->exz, &b->exz1, &b->hap, &b->r_buf, s->opt->diff_ec_ul, winLen, NULL, s->id+i, s->opt->k, NULL);
&b->correct, &b->exz, &b->hap, &b->r_buf, aux_o, s->opt->diff_ec_ul, winLen, NULL, s->id+i, s->opt->k, NULL);
// ul_lalign_old_ed(&b->olist, &b->clist, s->uu, s->seq[i], s->len[i], &b->self_read, &b->ovlp_read,
// &b->correct, &b->hap, &b->r_buf, s->opt->diff_ec_ul, winLen, 1, NULL);
ton = b->olist.length;//all alignments pass similary check
aux_o = gen_aux_ovlp(&b->olist);///must be here
gl_chain_flter(&b->olist, &b->correct, &(s->sps[tid]), bl, s->uu, s->opt->diff_ec_ul, winLen, s->len[i], s->uopt, &phase);
if(phase) {
@@ -6092,7 +6106,7 @@ static void worker_for_ul_rescall_alignment(void *data, long i, int tid) // call
copy_asg_arr(b->hap.snp_srt, b0); copy_asg_arr(s->sps[tid], b1); copy_asg_arr(b->r_buf.a, b2);
ul_lalign(&b->olist, &b->clist, s->uu, s->seq[i], s->len[i], &b->self_read, &b->ovlp_read,
&b->correct, &b->exz, &b->exz1, &b->hap, &b->r_buf, s->opt->diff_ec_ul, winLen, &(bl->lo), s->id+i, s->opt->k, NULL);
&b->correct, &b->exz, &b->hap, &b->r_buf, aux_o, s->opt->diff_ec_ul, winLen, &(bl->lo), s->id+i, s->opt->k, NULL);
// ul_lalign_old_ed(&b->olist, &b->clist, s->uu, s->seq[i], s->len[i], &b->self_read, &b->ovlp_read,
// &b->correct, &b->hap, &b->r_buf, s->opt->diff_ec_ul, winLen, 0, NULL);
}