UL graph with graph cleaning

This commit is contained in:
chhylp123
2022-08-02 15:48:16 -04:00
parent 91de382bde
commit 89e0d1aafa
4 changed files with 1746 additions and 109 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
#include <pthread.h>
#include <stdint.h>
#define HA_VERSION "0.16.5-r413"
#define HA_VERSION "0.16.6-r416"
#define VERBOSE 0
+18 -7
View File
@@ -14818,7 +14818,7 @@ const char* command)
uint32_t print_debug_gfa(asg_t *read_g, ma_ug_t *ug, ma_sub_t* coverage_cut, const char* output_file_name,
ma_hit_t_alloc* sources, R_to_U* ruIndex, int max_hang, int min_ovlp, int is_polish, int is_update_ou, int is_check_alter_lable)
ma_hit_t_alloc* sources, R_to_U* ruIndex, int max_hang, int min_ovlp, int is_update_ou, int is_check_alter_lable, int is_seq)
{
kvec_asg_arc_t_warp new_rtg_edges;
kv_init(new_rtg_edges.a);
@@ -14844,13 +14844,24 @@ ma_hit_t_alloc* sources, R_to_U* ruIndex, int max_hang, int min_ovlp, int is_pol
}
if(is_update_ou) update_ug_ou(ug, read_g);
if(is_polish) ma_ug_seq(ug, read_g, coverage_cut, sources, &new_rtg_edges, max_hang, min_ovlp, 0, 0);
if(is_seq) {
ma_ug_seq(ug, read_g, coverage_cut, sources, &new_rtg_edges, max_hang, min_ovlp, 0, 0);
}
// if(is_polish) ma_ug_seq(ug, read_g, coverage_cut, sources, &new_rtg_edges, max_hang, min_ovlp, 0, 0);
fprintf(stderr, "Writing raw unitig GFA to disk... \n");
char* gfa_name = (char*)malloc(strlen(output_file_name)+25);
sprintf(gfa_name, "%s.r_utg.noseq.gfa", output_file_name);
FILE* output_file = fopen(gfa_name, "w");
ma_ug_print_simple(ug, read_g, coverage_cut, sources, ruIndex, "utg", output_file);
char* gfa_name = (char*)malloc(strlen(output_file_name)+50);
FILE* output_file = NULL;
if(is_seq) {
sprintf(gfa_name, "%s.r_utg.gfa", output_file_name);
output_file = fopen(gfa_name, "w");
ma_ug_print(ug, read_g, coverage_cut, sources, ruIndex, "utg", output_file);
} else {
sprintf(gfa_name, "%s.r_utg.noseq.gfa", output_file_name);
output_file = fopen(gfa_name, "w");
ma_ug_print_simple(ug, read_g, coverage_cut, sources, ruIndex, "utg", output_file);
}
fclose(output_file);
free(gfa_name);
@@ -31552,7 +31563,7 @@ ma_sub_t **coverage_cut_ptr, int debug_g)
ul_realignment_gfa(&uopt, sg, clean_round, min_ovlp_drop_ratio, max_ovlp_drop_ratio,
asm_opt.max_short_tip, &b_mask_t, ha_opt_triobin(&asm_opt));
}
print_debug_gfa(sg, NULL, coverage_cut, "UL.debug", sources, ruIndex, max_hang_length, mini_overlap_length, 0, 0, 0);
// print_debug_gfa(sg, NULL, coverage_cut, "UL.debug", sources, ruIndex, max_hang_length, mini_overlap_length, 0, 0, 0);
/**
asg_cut_tip(sg, asm_opt.max_short_tip);
///debug_info_of_specfic_node("m64043_200505_112554/8849050/ccs", sg, "inner_1");
+2 -1
View File
@@ -1080,7 +1080,7 @@ int asg_arc_del_triangular_directly(asg_t *g, long long min_edge_length,
ma_hit_t_alloc* reverse_sources, R_to_U* ruIndex);
int asg_arc_del_short_diploid_by_exact(asg_t *g, int max_ext, ma_hit_t_alloc* sources);
uint32_t print_debug_gfa(asg_t *read_g, ma_ug_t *ug, ma_sub_t* coverage_cut, const char* output_file_name,
ma_hit_t_alloc* sources, R_to_U* ruIndex, int max_hang, int min_ovlp, int is_polish, int is_update_ou, int is_check_alter_lable);
ma_hit_t_alloc* sources, R_to_U* ruIndex, int max_hang, int min_ovlp, int is_update_ou, int is_check_alter_lable, int is_seq);
void debug_info_of_specfic_node(const char* name, asg_t *g, R_to_U* ruIndex, const char* command);
ma_ug_t *gen_polished_ug(const ug_opt_t *uopt, asg_t *sg);
void output_unitig_graph(asg_t *sg, ma_sub_t* coverage_cut, char* output_file_name,
@@ -1089,6 +1089,7 @@ void flat_soma_v(asg_t *sg, ma_hit_t_alloc* sources, R_to_U* ruIndex);
void hic_clean(asg_t* read_g);
int64_t count_edges_v_w(asg_t *g, uint32_t v, uint32_t w);
void renew_utg(ma_ug_t **ug, asg_t* read_g, kvec_asg_arc_t_warp* edge);
void merge_unitig_content(ma_utg_t* collection, ma_ug_t* ug, asg_t* read_g, kvec_asg_arc_t_warp* edge);
#define JUNK_COV 5
#define DISCARD_RATE 0.8
+1725 -100
View File
File diff suppressed because it is too large Load Diff