disable integer correction; disable contain dedup

This commit is contained in:
chhylp123
2023-03-10 09:12:07 -05:00
parent 85c643e85d
commit af4be8ca1a
7 changed files with 1073 additions and 57 deletions
+3
View File
@@ -56,6 +56,7 @@ static ko_longopt_t long_options[] = {
{ "bin-only", ko_no_argument, 341},
{ "ul-round", ko_required_argument, 342},
{ "prt-raw", ko_no_argument, 343},
{ "integer-correct", ko_required_argument, 344},
{ 0, 0, 0 }
};
@@ -267,6 +268,7 @@ void init_opt(hifiasm_opt_t* asm_opt)
asm_opt->bin_only = 0;
asm_opt->ul_clean_round = 1;
asm_opt->prt_dbg_gfa = 0;
asm_opt->integer_correct_round = 0;
}
void destory_enzyme(enzyme* f)
@@ -801,6 +803,7 @@ int CommandLine_process(int argc, char *argv[], hifiasm_opt_t* asm_opt)
else if (c == 341) asm_opt->bin_only = 1;
else if (c == 342) asm_opt->ul_clean_round = atol(opt.arg);
else if (c == 343) asm_opt->prt_dbg_gfa = 1;
else if (c == 344) asm_opt->integer_correct_round = atol(opt.arg);
else if (c == 'l') { ///0: disable purge_dup; 1: purge containment; 2: purge overlap
asm_opt->purge_level_primary = asm_opt->purge_level_trio = atoi(opt.arg);
}
+2 -1
View File
@@ -5,7 +5,7 @@
#include <pthread.h>
#include <stdint.h>
#define HA_VERSION "0.19.0-r543"
#define HA_VERSION "0.19.0-r550"
#define VERBOSE 0
@@ -140,6 +140,7 @@ typedef struct {
uint8_t bin_only;
int32_t ul_clean_round;
int32_t prt_dbg_gfa;
int32_t integer_correct_round;
} hifiasm_opt_t;
extern hifiasm_opt_t asm_opt;
+6 -1
View File
@@ -33683,10 +33683,15 @@ ma_hit_t_alloc* src, uint64_t* readLen, R_to_U* ruIndex, bub_label_t *b_mask_t,
sg = ma_sg_gen_ul(src, n_read, *cov, ruIndex, max_hang_length, mini_overlap_length, UL_COV_THRES);
if(asm_opt.prt_dbg_gfa) prt_dbg_gfa(sg, "raw", *cov, src, ruIndex, max_hang_length, mini_overlap_length);
gen_ug_opt_t(&uopt, src, NULL, max_hang_length, mini_overlap_length, gap_fuzz, min_dp, readLen, *cov, ruIndex, -1, -1, -1, -1, -1, b_mask_t);
///debug
// asg_symm(sg);
// dedup_contain_g(&uopt, sg);
if(clean_contain_g(&uopt, sg, 0)) update_sg_uo(sg, src);
// prt_specfic_sge(sg, 10498, 10505, "--*--");
asg_arc_del_trans_ul(sg, gap_fuzz);
// prt_specfic_sge(sg, 10498, 10505, "--#--");
// prt_specfic_sge(sg, 10498, 10505, "--#--");
}
init_bub_label_t(b_mask_t, MIN(10, asm_opt.thread_num), sg->n_seq);
+13 -5
View File
@@ -1922,6 +1922,8 @@ void flex_asg_t_cleanup(flex_asg_t *fg)
fg->g->is_srt = 0;
}
asg_cleanup(fg->g);
// asg_symm(fg->g);
// asg_arc_del_trans_ul(fg->g, fg->gap_fuzz);
}
void asg_arc_cut_contain(flex_asg_t *fg, asg64_v *in, asg64_v *in0, R_to_U* rI, float ou_rat, uint32_t only_trans_nn)
@@ -2770,7 +2772,7 @@ double ou_drop_rate, int64_t max_tip, int64_t gap_fuzz, bub_label_t *b_mask_t, i
asg_arc_cut_tips(sg, max_tip, &bu, is_ou, is_ou?rI:NULL);
// fprintf(stderr, "[M::%s] count_edges_v_w(sg, 49778, 49847)->%ld\n", __func__, count_edges_v_w(sg, 49778, 49847));
// if(is_ou) dedup_contain_g(uopt, sg);
for (i = 0; i < clean_round; i++, drop += step) {
if(drop > max_ovlp_drop_ratio) drop = max_ovlp_drop_ratio;
if(is_ou) {
@@ -2800,7 +2802,10 @@ double ou_drop_rate, int64_t max_tip, int64_t gap_fuzz, bub_label_t *b_mask_t, i
// prt_specfic_sge(sg, 10531, 10519, "--3--");
// if(is_ou) asg_arc_cut_contain(fg, &bu, &ba, rI, ((i+1)<clean_round)?ou_drop_rate:-1);
if(is_ou) asg_arc_cut_contain(fg, &bu, &ba, rI, ou_drop_rate, 0);
if(is_ou) {
asg_arc_cut_contain(fg, &bu, &ba, rI, ou_drop_rate, 0);
// dedup_contain_g(uopt, sg);
}
asg_arc_identify_simple_bubbles_multi(sg, b_mask_t, 1);
asg_arc_cut_bub_links(sg, &bu, HARD_OL_DROP, HARD_OL_SEC_DROP, HARD_OU_DROP, is_ou, asm_opt.large_pop_bubble_size, rev, rI, max_tip);
@@ -2818,9 +2823,7 @@ double ou_drop_rate, int64_t max_tip, int64_t gap_fuzz, bub_label_t *b_mask_t, i
if(is_ou) {
if(ul_refine_alignment(uopt, sg)) update_sg_uo(sg, src);
// debug_out = 1;
if(clean_contain_g(uopt, sg, 1)) update_sg_uo(sg, src);
// exit(1);
}
}
@@ -2831,6 +2834,7 @@ double ou_drop_rate, int64_t max_tip, int64_t gap_fuzz, bub_label_t *b_mask_t, i
if(is_ou) {
asg_arc_cut_contain(fg, &bu, &ba, rI, ou_drop_rate, 0);
asg_arc_cut_contain(fg, &bu, &ba, rI, -1, 1);
// dedup_contain_g(uopt, sg);
if(clean_contain_g(uopt, sg, 1)) update_sg_uo(sg, src);
}
if(!is_ou) asg_iterative_semi_circ(sg, src, &bu, max_tip, 1);
@@ -2874,7 +2878,11 @@ double ou_drop_rate, int64_t max_tip, int64_t gap_fuzz, bub_label_t *b_mask_t, i
ug_ext_gfa(uopt, sg, ug_ext_len);
// if(is_ou) dedup_contain_g(uopt, sg);
// exit(1)
output_unitig_graph(sg, uopt->coverage_cut, o_file, src, rI, uopt->max_hang, uopt->min_ovlp);
// exit(1);
// flat_bubbles(sg, ruIndex->is_het); free(ruIndex->is_het); ruIndex->is_het = NULL;
flat_soma_v(sg, src, rI);
@@ -17154,7 +17162,7 @@ ul_renew_t *ropt, const char *bin_file, uint64_t free_uld, uint64_t is_bridg, ui
print_raw_uls_aln(uidx, asm_opt.output_file_name);
// }
ul_re_correct(uidx, 3);
ul_re_correct(uidx, asm_opt.integer_correct_round/**3**/);
init_ulg_opt_t(&uu, uopt, clean_round, 0.2, 0.6, min_ovlp_drop_ratio, max_ovlp_drop_ratio, 0.55, max_tip, max_ul_tip, b_mask_t, is_trio);
// print_debug_gfa(sg, init_ug, uopt->coverage_cut, "UL.debug0", uopt->sources, uopt->ruIndex, uopt->max_hang, uopt->min_ovlp, 0, 0, 1);
/**ul2ul_idx_t *u2o = **/gen_ul2ul(uidx, uopt, &uu, 0, is_bridg);
+1
View File
@@ -39,5 +39,6 @@ bubble_type *gen_bubble_chain(asg_t *sg, ma_ug_t *ug, ug_opt_t *uopt, uint8_t **
void filter_sg_by_ug(asg_t *rg, ma_ug_t *ug, ug_opt_t *uopt);
void ug_ext_gfa(ug_opt_t *uopt, asg_t *sg, uint32_t max_len);
void update_sg_uo(asg_t *g, ma_hit_t_alloc *src);
uint32_t get_arcs(asg_t *g, uint32_t v, uint32_t* idx, uint32_t idx_n);
#endif
+1047 -50
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -125,5 +125,6 @@ uint64_t check_ul_ov_t_consist(ul_ov_t *x, ul_ov_t *y, int64_t ql, int64_t tl, d
uint32_t infer_se(uint32_t qs, uint32_t qe, uint32_t ts, uint32_t te, uint32_t rev,
uint32_t rqs, uint32_t rqe, uint32_t *rts, uint32_t *rte);
uint32_t clean_contain_g(const ug_opt_t *uopt, asg_t *sg, uint32_t push_trans);
void dedup_contain_g(const ug_opt_t *uopt, asg_t *sg);
#endif