mirror of
https://github.com/chhylp123/hifiasm.git
synced 2026-09-30 07:18:11 +08:00
back_up_hic
This commit is contained in:
+291
-694
File diff suppressed because it is too large
Load Diff
@@ -1102,15 +1102,10 @@ typedef struct {
|
||||
} kv_ca_buf_t;
|
||||
|
||||
typedef struct{
|
||||
kvec_t(uint32_t) uIDs;
|
||||
kvec_t(uint32_t) iDXs;
|
||||
kvec_t(uint32_t) rescue_hom;
|
||||
uint32_t* rUidx;
|
||||
uint64_t* rUpos;
|
||||
uint8_t* is_r_het;
|
||||
uint32_t r_num, u_num;
|
||||
uint32_t chain_num;
|
||||
uint32_t l0_chain, l1_chain;
|
||||
kvec_t(bed_in) bed;
|
||||
kvec_t(uint32_t) topo_buf;
|
||||
kvec_t(uint32_t) topo_res;
|
||||
@@ -1181,7 +1176,6 @@ inline uint32_t get_origin_uid(uint32_t v, trans_chain* t_ch, uint32_t *off, uin
|
||||
if(t_ch->rUpos[v>>1] == (uint64_t)-1) return (uint32_t)-1;
|
||||
return (uint32_t)(((t_ch->rUidx[v>>1]>>1)<<1) + ((t_ch->rUidx[v>>1]^v)&1));
|
||||
}
|
||||
void get_chain_trans(trans_chain* t_ch, uint32_t id, uint32_t** x, uint32_t* x_occ, uint32_t** y, uint32_t* y_occ);
|
||||
void chain_origin_trans_uid_by_distance(hap_cov_t *cov, asg_t *read_sg,
|
||||
uint32_t *pri_a, uint32_t pri_n, uint32_t pri_beg, uint64_t *i_pri_len,
|
||||
uint32_t *aux_a, uint32_t aux_n, uint32_t aux_beg, uint64_t *i_aux_len,
|
||||
|
||||
+1
-39
@@ -5452,53 +5452,15 @@ void chain_origin_trans_uid_by_purge(hap_overlaps *x, ma_ug_t *ug, hap_cov_t *co
|
||||
|
||||
void collect_purge_trans_cov(ma_ug_t *ug, hap_overlaps_list* ha, hap_cov_t *cov, uint64_t* position_index)
|
||||
{
|
||||
uint32_t v, i, k, e, s, o, c_uId, p_uId, x_occ, y_occ;
|
||||
ma_utg_t *q = NULL;
|
||||
uint32_t v, i;
|
||||
hap_overlaps *x = NULL;
|
||||
trans_chain* t_ch = cov->t_ch;
|
||||
for (v = 0; v < ha->num; v++)
|
||||
{
|
||||
for (i = 0; i < ha->x[v].a.n; i++)
|
||||
{
|
||||
x = &(ha->x[v].a.a[i]);
|
||||
if(x->yUid < x->xUid) continue;
|
||||
|
||||
chain_origin_trans_uid_by_purge(x, ug, cov, position_index);
|
||||
|
||||
q = &(ug->u.a[x->xUid]); s = x->x_beg_id; e = x->x_end_id; o = 0;
|
||||
for (k = s, p_uId = (uint32_t)-1; k < e; k++)
|
||||
{
|
||||
c_uId = get_origin_uid((o == 1?((q->a[e-k-1]^(uint64_t)(0x100000000))>>32):(q->a[k]>>32)), t_ch, NULL, NULL);
|
||||
if(c_uId == (uint32_t)-1 || p_uId == c_uId) continue;
|
||||
p_uId = c_uId;
|
||||
kv_push(uint32_t, t_ch->uIDs, c_uId);
|
||||
}
|
||||
kv_push(uint32_t, t_ch->iDXs, t_ch->uIDs.n);
|
||||
|
||||
|
||||
q = &(ug->u.a[x->yUid]); s = x->y_beg_id; e = x->y_end_id; o = x->rev;
|
||||
for (k = s, p_uId = (uint32_t)-1; k < e; k++)
|
||||
{
|
||||
c_uId = get_origin_uid((o == 1?((q->a[e-k-1]^(uint64_t)(0x100000000))>>32):(q->a[k]>>32)), t_ch, NULL, NULL);
|
||||
if(c_uId == (uint32_t)-1 || p_uId == c_uId) continue;
|
||||
p_uId = c_uId;
|
||||
kv_push(uint32_t, t_ch->uIDs, c_uId);
|
||||
}
|
||||
kv_push(uint32_t, t_ch->iDXs, t_ch->uIDs.n);
|
||||
|
||||
|
||||
x_occ = y_occ = 0;
|
||||
get_chain_trans(t_ch, t_ch->chain_num, NULL, &x_occ, NULL, &y_occ);
|
||||
if(x_occ == 0 || y_occ == 0)
|
||||
{
|
||||
t_ch->uIDs.n -= (x_occ + y_occ);
|
||||
t_ch->iDXs.n -= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
t_ch->chain_num++;
|
||||
t_ch->l1_chain++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user