diff --git a/Assembly.cpp b/Assembly.cpp index 9e90b40..a32204f 100644 --- a/Assembly.cpp +++ b/Assembly.cpp @@ -10,8 +10,6 @@ #include "Output.h" #include "htab.h" -void *ha_flt_tab; -ha_pt_t *ha_idx; void ha_get_new_candidates(ha_abuf_t *ab, int64_t rid, UC_Read *ucr, overlap_region_alloc *overlap_list, Candidates_list *cl, double band_width_threshold, int keep_whole_chain); All_reads R_INF; diff --git a/anchor.cpp b/anchor.cpp index ebaacee..3938a72 100644 --- a/anchor.cpp +++ b/anchor.cpp @@ -65,7 +65,7 @@ void ha_get_new_candidates(ha_abuf_t *ab, int64_t rid, UC_Read *ucr, overlap_reg REALLOC(ab->a, ab->m_a); } for (i = 0, k = 0; i < ab->mz.n; ++i) { - uint32_t j; + int j; ha_mz1_t *z = &ab->mz.a[i]; seed1_t *s = &ab->seed[i]; for (j = 0; j < s->n; ++j) { @@ -96,7 +96,7 @@ void ha_get_new_candidates(ha_abuf_t *ab, int64_t rid, UC_Read *ucr, overlap_reg } // copy over to _cl_ - if (ab->m_a >= cl->size) { + if (ab->m_a >= (uint64_t)cl->size) { cl->size = ab->m_a; REALLOC(cl->list, cl->size); } diff --git a/htab.cpp b/htab.cpp index ba139fb..eaadb16 100644 --- a/htab.cpp +++ b/htab.cpp @@ -33,6 +33,9 @@ const unsigned char seq_nt4_table[256] = { // translate ACGT to 0123 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; +void *ha_flt_tab; +ha_pt_t *ha_idx; + /*************************** * Yak specific parameters * ***************************/ @@ -571,6 +574,7 @@ static void *worker_count(void *data, int step, void *in) // callback for kt_pip if (seq_nt4_table[(uint8_t)p->ks->seq.s[i]] >= 4) ++n_N; ha_compress_base(Get_READ(*p->rs_out, p->n_seq), p->ks->seq.s, l, &p->rs_out->N_site[p->n_seq], n_N); + memcpy(&p->rs_out->name[p->rs_out->name_index[p->n_seq]], p->ks->name.s, p->ks->name.l); } } if (s->n_seq == s->m_seq) { diff --git a/htab.h b/htab.h index 180340a..5e97d25 100644 --- a/htab.h +++ b/htab.h @@ -23,6 +23,8 @@ struct ha_abuf_s; typedef struct ha_abuf_s ha_abuf_t; extern const unsigned char seq_nt4_table[256]; +extern void *ha_flt_tab; +extern ha_pt_t *ha_idx; void *ha_ft_gen(const hifiasm_opt_t *asm_opt, All_reads *rs); int ha_ft_isflt(const void *hh, uint64_t y); diff --git a/main.cpp b/main.cpp index 842c0f9..dab9c41 100644 --- a/main.cpp +++ b/main.cpp @@ -9,21 +9,12 @@ int main(int argc, char *argv[]) { int i; - void *flt_tab; - ha_pt_t *idx; - init_opt(&asm_opt); - if (!CommandLine_process(argc, argv, &asm_opt)) return 1; - yak_reset_realtime(); - flt_tab = ha_ft_gen(&asm_opt, &R_INF); - idx = ha_pt_gen(&asm_opt, flt_tab, 0, &R_INF); - ha_pt_destroy(idx); - ha_ft_destroy(flt_tab); - if (0) { - Correct_Reads(asm_opt.number_of_round); - } + ha_flt_tab = ha_ft_gen(&asm_opt, &R_INF); + Correct_Reads(asm_opt.number_of_round); + ha_ft_destroy(ha_flt_tab); destory_All_reads(&R_INF); destory_opt(&asm_opt); fprintf(stderr, "[M::%s] Version: %s\n", __func__, "dummy");