mirror of
https://github.com/chhylp123/hifiasm.git
synced 2026-09-21 11:48:12 +08:00
debug hic_hits
This commit is contained in:
+3
-14
@@ -10757,7 +10757,7 @@ R_to_U* ruIndex, float chimeric_rate, float drop_ratio, int max_hang, int min_ov
|
||||
ma_ug_destroy(ug);
|
||||
kv_destroy(new_rtg_edges.a);
|
||||
|
||||
///output_unitig_graph(sg, coverage_cut, output_file_name, sources, ruIndex, max_hang, min_ovlp);
|
||||
output_unitig_graph(sg, coverage_cut, output_file_name, sources, ruIndex, max_hang, min_ovlp);
|
||||
output_trio_unitig_graph(sg, coverage_cut, output_file_name, FATHER, sources,
|
||||
reverse_sources, bubble_dist, (asm_opt.max_short_tip*2), 0.15, 3, ruIndex,
|
||||
0.05, 0.9, max_hang, min_ovlp, 0);
|
||||
@@ -26089,13 +26089,11 @@ ma_sub_t **coverage_cut_ptr, int debug_g)
|
||||
/*******************************for debug***************************************/
|
||||
}
|
||||
|
||||
|
||||
rescue_bubble_by_chain(sg, coverage_cut, sources, reverse_sources, bubble_dist,
|
||||
(asm_opt.max_short_tip*2), 0.15, 3, ruIndex, 0.05, 0.9, max_hang_length, mini_overlap_length, 10, gap_fuzz);
|
||||
|
||||
if (ha_opt_triobin(&asm_opt) && ha_opt_hic(&asm_opt))
|
||||
{
|
||||
rescue_bubble_by_chain(sg, coverage_cut, sources, reverse_sources, bubble_dist,
|
||||
(asm_opt.max_short_tip*2), 0.15, 3, ruIndex, 0.05, 0.9, max_hang_length, mini_overlap_length, 10, gap_fuzz);
|
||||
|
||||
char *buf = (char*)calloc(strlen(output_file_name) + 25, 1);
|
||||
sprintf(buf, "%s.hic.bench", output_file_name);
|
||||
benchmark_hic_graph(sg, coverage_cut, buf, sources, reverse_sources, bubble_dist,
|
||||
@@ -26104,9 +26102,6 @@ ma_sub_t **coverage_cut_ptr, int debug_g)
|
||||
}
|
||||
else if (ha_opt_triobin(&asm_opt))
|
||||
{
|
||||
rescue_bubble_by_chain(sg, coverage_cut, sources, reverse_sources, bubble_dist,
|
||||
(asm_opt.max_short_tip*2), 0.15, 3, ruIndex, 0.05, 0.9, max_hang_length, mini_overlap_length, 10, gap_fuzz);
|
||||
|
||||
char *buf = (char*)calloc(strlen(output_file_name) + 25, 1);
|
||||
sprintf(buf, "%s.dip", output_file_name);
|
||||
output_unitig_graph(sg, coverage_cut, buf, sources, ruIndex, max_hang_length, mini_overlap_length);
|
||||
@@ -26121,9 +26116,6 @@ ma_sub_t **coverage_cut_ptr, int debug_g)
|
||||
}
|
||||
else if(ha_opt_hic(&asm_opt))
|
||||
{
|
||||
rescue_bubble_by_chain(sg, coverage_cut, sources, reverse_sources, bubble_dist,
|
||||
(asm_opt.max_short_tip*2), 0.15, 3, ruIndex, 0.05, 0.9, max_hang_length, mini_overlap_length, 10, gap_fuzz);
|
||||
|
||||
char *buf = (char*)calloc(strlen(output_file_name) + 25, 1);
|
||||
sprintf(buf, "%s.hic", output_file_name);
|
||||
output_hic_graph(sg, coverage_cut, buf, sources, reverse_sources, bubble_dist,
|
||||
@@ -26139,9 +26131,6 @@ ma_sub_t **coverage_cut_ptr, int debug_g)
|
||||
output_read_graph(sg, coverage_cut, output_file_name, n_read);
|
||||
}
|
||||
|
||||
rescue_bubble_by_chain(sg, coverage_cut, sources, reverse_sources, bubble_dist,
|
||||
(asm_opt.max_short_tip*2), 0.15, 3, ruIndex, 0.05, 0.9, max_hang_length, mini_overlap_length, 10, gap_fuzz);
|
||||
|
||||
output_contig_graph_primary_pre(sg, coverage_cut, output_file_name, sources, reverse_sources,
|
||||
asm_opt.small_pop_bubble_size, asm_opt.max_short_tip, ruIndex, max_hang_length, mini_overlap_length);
|
||||
|
||||
|
||||
+2
-1
@@ -1049,7 +1049,8 @@ typedef struct{
|
||||
double weight;
|
||||
uint32_t uID:31, del:1;
|
||||
uint64_t dis;
|
||||
uint64_t occ:63, scaff:1;
|
||||
uint64_t occ;
|
||||
///uint64_t occ:63, scaff:1;
|
||||
///uint32_t enzyme;
|
||||
} hc_edge;
|
||||
|
||||
|
||||
@@ -11401,19 +11401,17 @@ int hic_short_align(const enzyme *fn1, const enzyme *fn2, ha_ug_index* idx)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int hic_short_align_debug(const char *fn1, const char *fn2, ha_ug_index* idx)
|
||||
int hic_short_align_back(const char *fn1, const char *fn2, ha_ug_index* idx)
|
||||
{
|
||||
double index_time = yak_realtime();
|
||||
sldat_t sl;
|
||||
gzFile fp1, fp2;
|
||||
kvec_hc_edge back_hc_edge;
|
||||
kv_init(back_hc_edge.a);
|
||||
gzFile fp1, fp2;
|
||||
if ((fp1 = gzopen(fn1, "r")) == 0) return 0;
|
||||
if ((fp2 = gzopen(fn2, "r")) == 0) return 0;
|
||||
sl.ks1 = kseq_init(fp1);
|
||||
sl.ks2 = kseq_init(fp2);
|
||||
|
||||
sl.idx = idx;
|
||||
sl.link = idx->link;
|
||||
sl.chunk_size = 20000000;
|
||||
@@ -11430,20 +11428,20 @@ int hic_short_align_debug(const char *fn1, const char *fn2, ha_ug_index* idx)
|
||||
// load_reads(&R2, fn2);
|
||||
// test_reads(&R1, fn1);
|
||||
/*******************************for debug************************************/
|
||||
|
||||
fprintf(stderr, "+sl->hits.a.n: %u\n", (uint32_t)sl.hits.a.n);
|
||||
kt_pipeline(3, worker_pipeline, &sl, 3);
|
||||
fprintf(stderr, "+sl->hits.a.n: %u\n", (uint32_t)sl.hits.a.n);
|
||||
dedup_hits(&sl.hits);
|
||||
fprintf(stderr, "+sl->hits.a.n: %u\n", (uint32_t)sl.hits.a.n);
|
||||
fprintf(stderr, "-sl->hits.a.n: %u\n", (uint32_t)sl.hits.a.n);
|
||||
fprintf(stderr, "fn1: %s, fn2: %s\n", fn1, fn2);
|
||||
|
||||
/*******************************for debug************************************/
|
||||
// sort_hits(&sl.hits);
|
||||
// print_hits(idx, &sl.hits, fn1);
|
||||
/*******************************for debug************************************/
|
||||
|
||||
dedup_hits(&sl.hits);
|
||||
write_hc_hits(&sl.hits, asm_opt.output_file_name);
|
||||
}
|
||||
|
||||
///fprintf(stderr, "u.n: %d, uID_bits: %lu, pos_bits: %lu, sl.hits.a.n: %u\n", (uint32_t)idx->ug->u.n, idx->uID_bits, idx->pos_bits, (uint32_t)sl.hits.a.n);
|
||||
fprintf(stderr, "u.n: %d, uID_bits: %lu, pos_bits: %lu, sl.hits.a.n: %u\n", (uint32_t)idx->ug->u.n, idx->uID_bits, idx->pos_bits, (uint32_t)sl.hits.a.n);
|
||||
|
||||
H_partition hap;
|
||||
MT M;
|
||||
@@ -11515,7 +11513,6 @@ int hic_short_align_debug(const char *fn1, const char *fn2, ha_ug_index* idx)
|
||||
destory_G_partition(gp); free(gp);
|
||||
kv_destroy(sl.hits.a);
|
||||
destory_bubbles(&bub);
|
||||
|
||||
kseq_destroy(sl.ks1);
|
||||
kseq_destroy(sl.ks2);
|
||||
gzclose(fp1);
|
||||
@@ -11537,7 +11534,7 @@ void hic_analysis(ma_ug_t *ug, asg_t* read_g, hc_links* link)
|
||||
ug_index->link = link;
|
||||
///test_unitig_index(ug_index, ug);
|
||||
///hic_short_align(asm_opt.hic_reads[0], asm_opt.hic_reads[1], ug_index);
|
||||
hic_short_align_debug(asm_opt.hic_reads[0]->a[0], asm_opt.hic_reads[1]->a[0], ug_index);
|
||||
hic_short_align_back(asm_opt.hic_reads[0]->a[0], asm_opt.hic_reads[1]->a[0], ug_index);
|
||||
|
||||
destory_hc_pt_index(ug_index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user