topo phasing

This commit is contained in:
chhylp123
2021-04-22 22:38:52 -04:00
parent 278efaa876
commit a5b29b00bd
3 changed files with 861 additions and 117 deletions
+5 -2
View File
@@ -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_init(k_trans); kv_init(k_trans.idx);
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));
bub.round_id = 0; bub.n_round = 2;
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);
/*******************************for debug************************************/
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************************************/
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_bubble_chain(&bub);
// print_bubble_chain(&bub);
// destory_contig_partition(&hap);
kv_destroy(back_hc_edge.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.idx);
destory_ps_t(&s);
kv_destroy(u.bid); kv_destroy(u.idx); kv_destroy(u.u);
return 1;
+853 -113
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -15,7 +15,7 @@ typedef struct {
}mc_interval_t;
#define mc_node_t int8_t
// #define w_t int32_t
// #define 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))
@@ -87,5 +87,6 @@ static inline double kr_drand_r(uint64_t *x)
u.i = 0x3FFULL << 52 | (*x) >> 12;
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