mirror of
https://github.com/chhylp123/hifiasm.git
synced 2026-10-11 07:50:55 +08:00
topo phasing
This commit is contained in:
@@ -14238,6 +14238,8 @@ int hic_short_align(const enzyme *fn1, const enzyme *fn2, ha_ug_index* idx)
|
|||||||
kv_u_trans_t k_trans;
|
kv_u_trans_t k_trans;
|
||||||
kv_init(k_trans); kv_init(k_trans.idx);
|
kv_init(k_trans); kv_init(k_trans.idx);
|
||||||
ps_t *s = init_ps_t(11, idx->ug->g->n_seq);
|
ps_t *s = init_ps_t(11, idx->ug->g->n_seq);
|
||||||
|
mb_nodes_t u;
|
||||||
|
kv_init(u.bid); kv_init(u.idx); kv_init(u.u);
|
||||||
memset(&bub, 0, sizeof(bubble_type));
|
memset(&bub, 0, sizeof(bubble_type));
|
||||||
bub.round_id = 0; bub.n_round = 2;
|
bub.round_id = 0; bub.n_round = 2;
|
||||||
for (bub.round_id = 0; bub.round_id < bub.n_round; bub.round_id++)
|
for (bub.round_id = 0; bub.round_id < bub.n_round; bub.round_id++)
|
||||||
@@ -14253,7 +14255,7 @@ int hic_short_align(const enzyme *fn1, const enzyme *fn2, ha_ug_index* idx)
|
|||||||
update_trans_g(idx, &k_trans, &bub);
|
update_trans_g(idx, &k_trans, &bub);
|
||||||
/*******************************for debug************************************/
|
/*******************************for debug************************************/
|
||||||
mc_solve(NULL, NULL, &k_trans, idx->ug, idx->read_g, 0.8, R_INF.trio_flag,
|
mc_solve(NULL, NULL, &k_trans, idx->ug, idx->read_g, 0.8, R_INF.trio_flag,
|
||||||
(bub.round_id == 0? 1 : 0), s->s, 0, /**&bub**/NULL, NULL);
|
(bub.round_id == 0? 1 : 0), s->s, 1, /**&bub**/NULL, &(idx->t_ch->k_trans));
|
||||||
/*******************************for debug************************************/
|
/*******************************for debug************************************/
|
||||||
label_unitigs_sm(s->s, idx->ug);
|
label_unitigs_sm(s->s, idx->ug);
|
||||||
/**
|
/**
|
||||||
@@ -14274,7 +14276,7 @@ int hic_short_align(const enzyme *fn1, const enzyme *fn2, ha_ug_index* idx)
|
|||||||
|
|
||||||
|
|
||||||
///print_debug_bubble_graph(&bub, idx->ug, asm_opt.output_file_name);
|
///print_debug_bubble_graph(&bub, idx->ug, asm_opt.output_file_name);
|
||||||
print_bubble_chain(&bub);
|
// print_bubble_chain(&bub);
|
||||||
// destory_contig_partition(&hap);
|
// destory_contig_partition(&hap);
|
||||||
kv_destroy(back_hc_edge.a);
|
kv_destroy(back_hc_edge.a);
|
||||||
kv_destroy(sl.hits.a);
|
kv_destroy(sl.hits.a);
|
||||||
@@ -14284,6 +14286,7 @@ int hic_short_align(const enzyme *fn1, const enzyme *fn2, ha_ug_index* idx)
|
|||||||
kv_destroy(k_trans);
|
kv_destroy(k_trans);
|
||||||
kv_destroy(k_trans.idx);
|
kv_destroy(k_trans.idx);
|
||||||
destory_ps_t(&s);
|
destory_ps_t(&s);
|
||||||
|
kv_destroy(u.bid); kv_destroy(u.idx); kv_destroy(u.u);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ typedef struct {
|
|||||||
}mc_interval_t;
|
}mc_interval_t;
|
||||||
|
|
||||||
#define mc_node_t int8_t
|
#define mc_node_t int8_t
|
||||||
// #define w_t int32_t
|
// #define w_t int64_t
|
||||||
// #define t_w_t int64_t
|
// #define t_w_t int64_t
|
||||||
// #define w_cast(x) ((t_w_t)((x) < 0 ? (x) - 0.5 : (x) + 0.5))
|
// #define w_cast(x) ((t_w_t)((x) < 0 ? (x) - 0.5 : (x) + 0.5))
|
||||||
|
|
||||||
@@ -87,5 +87,6 @@ static inline double kr_drand_r(uint64_t *x)
|
|||||||
u.i = 0x3FFULL << 52 | (*x) >> 12;
|
u.i = 0x3FFULL << 52 | (*x) >> 12;
|
||||||
return u.d - 1.0;
|
return u.d - 1.0;
|
||||||
}
|
}
|
||||||
void mc_solve(hap_overlaps_list* ovlp, trans_chain* t_ch, kv_u_trans_t *ta, ma_ug_t *ug, asg_t *read_g, double f_rate, uint8_t* trio_flag, uint32_t renew_s, int8_t *s, uint32_t is_sys, bubble_type* bub, mb_nodes_t* u);
|
|
||||||
|
void mc_solve(hap_overlaps_list* ovlp, trans_chain* t_ch, kv_u_trans_t *ta, ma_ug_t *ug, asg_t *read_g, double f_rate, uint8_t* trio_flag, uint32_t renew_s, int8_t *s, uint32_t is_sys, bubble_type* bub, kv_u_trans_t *ref);
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user