mirror of
https://github.com/chhylp123/hifiasm.git
synced 2026-09-24 18:08:12 +08:00
Merge pull request #445 from chhylp123/hifiasm_dev_debug
Hifiasm dev debug
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define HA_VERSION "0.19.4-r575"
|
||||
#define HA_VERSION "0.19.4-r584"
|
||||
|
||||
#define VERBOSE 0
|
||||
|
||||
|
||||
+1003
-104
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1066,7 +1066,7 @@ ma_ug_t* copy_untig_graph(ma_ug_t *src);
|
||||
ma_ug_t* output_trio_unitig_graph(asg_t *sg, ma_sub_t* coverage_cut, char* output_file_name,
|
||||
uint8_t flag, ma_hit_t_alloc* sources, ma_hit_t_alloc* reverse_sources,
|
||||
long long tipsLen, float tip_drop_ratio, long long stops_threshold, R_to_U* ruIndex,
|
||||
float chimeric_rate, float drop_ratio, int max_hang, int min_ovlp, int is_bench, bub_label_t* b_mask_t, char *f_prefix, uint8_t *kpt_buf, kvec_asg_arc_t_warp *r_edges);
|
||||
float chimeric_rate, float drop_ratio, int max_hang, int min_ovlp, int gap_fuzz, int is_bench, bub_label_t* b_mask_t, char *f_prefix, uint8_t *kpt_buf, kvec_asg_arc_t_warp *r_edges);
|
||||
asg_t* copy_read_graph(asg_t *src);
|
||||
ma_ug_t *ma_ug_gen(asg_t *g);
|
||||
void ma_ug_destroy(ma_ug_t *ug);
|
||||
@@ -1135,7 +1135,7 @@ void adjust_utg_by_trio(ma_ug_t **ug, asg_t* read_g, uint8_t flag, float drop_ra
|
||||
ma_hit_t_alloc* sources, ma_hit_t_alloc* reverse_sources, ma_sub_t* coverage_cut,
|
||||
long long tipsLen, float tip_drop_ratio, long long stops_threshold,
|
||||
R_to_U* ruIndex, float chimeric_rate, float drop_ratio, int max_hang, int min_ovlp,
|
||||
kvec_asg_arc_t_warp* new_rtg_edges, bub_label_t* b_mask_t);
|
||||
int gap_fuzz, kvec_asg_arc_t_warp* new_rtg_edges, bub_label_t* b_mask_t);
|
||||
uint32_t cmp_untig_graph(ma_ug_t *src, ma_ug_t *dest);
|
||||
void reduce_hamming_error(asg_t *sg, ma_hit_t_alloc* sources, ma_sub_t *coverage_cut,
|
||||
int max_hang, int min_ovlp, long long gap_fuzz);
|
||||
|
||||
@@ -51,7 +51,7 @@ Its latest release could support the telomere-to-telomere assembly by utilizing
|
||||
|
||||
## <a name="why"></a>Why Hifiasm?
|
||||
|
||||
* Hifiasm delivers high-quality assemblies. It tends to generate longer contigs
|
||||
* Hifiasm delivers high-quality telomere-to-telomere assemblies. It tends to generate longer contigs
|
||||
and resolve more segmental duplications than other assemblers.
|
||||
|
||||
* Given Hi-C reads or short reads from the parents, hifiasm can produce overall the best
|
||||
|
||||
+18
-9
@@ -7365,7 +7365,7 @@ void rebuid_idx(ul_resolve_t *uidx)
|
||||
init_ul_str_idx_t(uidx);
|
||||
}
|
||||
|
||||
void shrink_1b(ma_ug_t *ug, uc_block_t *z, uint32_t is_forward)
|
||||
void shrink_1b(ma_ug_t *ug, uc_block_t *z, uc_block_t *lim, uint32_t is_forward)
|
||||
{
|
||||
if(z->ts != 0 || z->te != ug->g->seq[z->hid].len) return;
|
||||
uc_block_t bc = *z;
|
||||
@@ -7377,12 +7377,14 @@ void shrink_1b(ma_ug_t *ug, uc_block_t *z, uint32_t is_forward)
|
||||
} else {
|
||||
z->te -= 1; z->qs += off;
|
||||
}
|
||||
if((lim) && (!((z->qs <= lim->qs) && (z->qe <= lim->qe)))) *z = bc;
|
||||
} else {
|
||||
if((!z->rev)) {
|
||||
z->te -= 1; z->qe -= off;
|
||||
} else {
|
||||
z->ts += 1; z->qe -= off;
|
||||
}
|
||||
if((lim) && (!((z->qs >= lim->qs) && (z->qe >= lim->qe)))) *z = bc;
|
||||
}
|
||||
if((ugl_cover_check(bc.ts, bc.te, &(ug->u.a[bc.hid]))) &&
|
||||
(!ugl_cover_check(z->ts, z->te, &(ug->u.a[z->hid])))) {
|
||||
@@ -7436,7 +7438,7 @@ void renew_ul_vec_t(ul_vec_t *x, ma_ug_t *ug)
|
||||
|
||||
void shrink_ul0(all_ul_t *uls, ul_str_t *str, uint64_t id, integer_t *buf, ma_ug_t *ug)
|
||||
{
|
||||
uint32_t k, c_k, p_k, cv, pv, bl, i; uc_block_t *xi; buf->u.n = 0; nid_t *np = NULL;
|
||||
uint32_t k, c_k, p_k, cv, pv, bl, i; uc_block_t *xi, *yi; buf->u.n = 0; nid_t *np = NULL;
|
||||
asg_arc_t *av; uint32_t nv, s, e, m, d, mm, is_conn; uint64_t *z; ul_vec_t *x;
|
||||
if(str->cn < 2) return;
|
||||
for (k = 0, bl = 0, c_k = p_k = pv = (uint32_t)-1; k < str->cn; k++) {
|
||||
@@ -7464,6 +7466,11 @@ void shrink_ul0(all_ul_t *uls, ul_str_t *str, uint64_t id, integer_t *buf, ma_ug
|
||||
is_conn = 1;
|
||||
}
|
||||
}
|
||||
if(is_conn) {
|
||||
is_conn = 0; assert(k);
|
||||
yi = &(uls->a[id].bb.a[str->a[k-1]>>32]);
|
||||
if((xi->qs >= yi->qs) && (xi->qe >= yi->qe)) is_conn = 1;
|
||||
}
|
||||
if(is_conn) {
|
||||
bl++;
|
||||
} else {
|
||||
@@ -7514,10 +7521,9 @@ void shrink_ul0(all_ul_t *uls, ul_str_t *str, uint64_t id, integer_t *buf, ma_ug
|
||||
x->bb.n = m;
|
||||
assert(x->bb.n > 1);
|
||||
|
||||
|
||||
|
||||
shrink_1b(ug, &(x->bb.a[0]), 1);
|
||||
shrink_1b(ug, &(x->bb.a[x->bb.n-1]), 0);
|
||||
shrink_1b(ug, &(x->bb.a[0]), ((x->bb.n>=2)?&(x->bb.a[1]):(NULL)), 1);
|
||||
shrink_1b(ug, &(x->bb.a[x->bb.n-1]), ((x->bb.n>=2)?&(x->bb.a[x->bb.n-2]):(NULL)), 0);
|
||||
|
||||
d = x->bb.a[0].qs;
|
||||
for (k = 0; k < x->bb.n; k++) {
|
||||
x->bb.a[k].qs -= d; x->bb.a[k].qe -= d;
|
||||
@@ -7546,8 +7552,8 @@ void shrink_ul0(all_ul_t *uls, ul_str_t *str, uint64_t id, integer_t *buf, ma_ug
|
||||
}
|
||||
x->bb.n = m;
|
||||
assert(x->bb.n > 1);
|
||||
shrink_1b(ug, &(x->bb.a[0]), 1);
|
||||
shrink_1b(ug, &(x->bb.a[x->bb.n-1]), 0);
|
||||
shrink_1b(ug, &(x->bb.a[0]), ((x->bb.n>=2)?&(x->bb.a[1]):(NULL)), 1);
|
||||
shrink_1b(ug, &(x->bb.a[x->bb.n-1]), ((x->bb.n>=2)?&(x->bb.a[x->bb.n-2]):(NULL)), 0);
|
||||
d = x->bb.a[0].qs;
|
||||
for (k = 0; k < x->bb.n; k++) {
|
||||
x->bb.a[k].qs -= d; x->bb.a[k].qe -= d;
|
||||
@@ -15686,6 +15692,9 @@ void u2g_hybrid_clean(ul_resolve_t *uidx, ulg_opt_t *ulopt, usg_t *ng, asg64_v *
|
||||
// prt_usg_t(uidx, ng, sb);
|
||||
// usg_arc_cut_length(ng, b, ub, mm_tip>>1, drop, ulopt->is_trio, 1, NULL);
|
||||
usg_bub_clean(ng, &bb, b, ub, mm_tip>>1, drop, 1, bs, f);
|
||||
// fprintf(stderr, "-1bub-[M::%s::] i::%ld, drop::%f\n", __func__, i, drop);
|
||||
// sprintf(sb, "ng_ss::%ld_i::%ld_drop::%f_b::bub", ss, i, drop);
|
||||
// prt_usg_t(uidx, ng, sb);
|
||||
usg_arc_cut_srt_length(ng, b, ub, mm_tip>>1, drop, ulopt->is_trio, 1, NULL, bs);
|
||||
// fprintf(stderr, "-1-[M::%s::] i::%ld, drop::%f\n", __func__, i, drop);
|
||||
// sprintf(sb, "ng_ss::%ld_i::%ld_drop::%f_b", ss, i, drop);
|
||||
@@ -16580,7 +16589,7 @@ ma_ug_t* output_trio_unitig_graph_ul(ug_opt_t *uopt, ul_resolve_t *uidx, char* o
|
||||
|
||||
adjust_utg_by_trio(&ug, uidx->sg, flag, TRIO_THRES, uopt->sources, uopt->reverse_sources,
|
||||
uopt->coverage_cut, uopt->tipsLen, uopt->tip_drop_ratio, uopt->stops_threshold, uopt->ruIndex,
|
||||
uopt->chimeric_rate, uopt->drop_ratio, uopt->max_hang, uopt->min_ovlp, &ne, uopt->b_mask_t);
|
||||
uopt->chimeric_rate, uopt->drop_ratio, uopt->max_hang, uopt->min_ovlp, uopt->gap_fuzz, &ne, uopt->b_mask_t);
|
||||
|
||||
// if(asm_opt.b_low_cov > 0) {
|
||||
// break_ug_contig(&ug, uidx->sg, &R_INF, uopt->coverage_cut, uopt->sources, uopt->ruIndex, &ne,
|
||||
|
||||
+1
-1
@@ -781,7 +781,7 @@ ma_ug_t* get_trio_unitig_graph(asg_t *sg, uint8_t flag, ug_opt_t *opt)
|
||||
adjust_utg_by_trio(&ug, sg, flag, TRIO_THRES, opt->sources, opt->reverse_sources,
|
||||
opt->coverage_cut, opt->tipsLen, opt->tip_drop_ratio, opt->stops_threshold,
|
||||
opt->ruIndex, opt->chimeric_rate, opt->drop_ratio, opt->max_hang, opt->min_ovlp,
|
||||
&new_rtg_edges, opt->b_mask_t);
|
||||
opt->gap_fuzz, &new_rtg_edges, opt->b_mask_t);
|
||||
|
||||
kv_destroy(new_rtg_edges.a);
|
||||
return ug;
|
||||
|
||||
Reference in New Issue
Block a user