variant calling

This commit is contained in:
chhylp123
2021-04-10 21:58:53 -04:00
parent 3218618bb4
commit 8f733750c4
5 changed files with 789 additions and 115 deletions
+13 -3
View File
@@ -52,6 +52,8 @@
#define CUT_DIF_HAP 12
///query is the read itself
typedef struct {
uint64_t qns;
@@ -113,15 +115,19 @@ typedef struct {
typedef struct {
uint32_t qs, qe, qn;
uint32_t ts, te, tn;
uint32_t nw;
uint8_t f:7, rev:1;
double nw;
uint8_t f:6, rev:1, del:1;
} u_trans_t;
typedef struct {
size_t n, m;
u_trans_t* a;
kvec_t(uint64_t) idx;
} kv_u_trans_t;
#define u_trans_a(x, id) ((x).a + ((x).idx.a[(id)]>>32))
#define u_trans_n(x, id) ((uint32_t)((x).idx.a[(id)]))
typedef struct {
uint64_t ul;
uint32_t v;
@@ -1144,7 +1150,7 @@ uint64_t get_bub_pop_max_dist(asg_t *g, buf_t *b);
uint64_t get_bub_pop_max_dist_advance(asg_t *g, buf_t *b);
int asg_pop_bubble_primary_trio(ma_ug_t *ug, uint64_t* i_max_dist, uint32_t positive_flag, uint32_t negative_flag, hap_cov_t *cov, uint32_t is_update_chain);
uint64_t asg_bub_pop1_primary_trio(asg_t *g, ma_ug_t *utg, uint32_t v0, uint64_t max_dist, buf_t *b, uint32_t positive_flag,
uint32_t negative_flag, uint32_t is_pop, uint64_t* path_base_len, uint64_t* path_nodes, hap_cov_t *cov, uint32_t is_update_chain);
uint32_t negative_flag, uint32_t is_pop, uint64_t* path_base_len, uint64_t* path_nodes, hap_cov_t *cov, uint32_t is_update_chain, uint32_t keep_d);
void adjust_utg_by_primary(ma_ug_t **ug, asg_t* read_g, float drop_rate,
ma_hit_t_alloc* sources, ma_hit_t_alloc* reverse_sources, ma_sub_t* coverage_cut,
@@ -1176,6 +1182,10 @@ inline uint32_t get_origin_uid(uint32_t v, trans_chain* t_ch, uint32_t *off, uin
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,
ma_ug_t *ug, uint32_t flag, double overall_score, const char* cmd);
#define JUNK_COV 5
#define DISCARD_RATE 0.8