From 18b69f1a725d366cd4292714cbf3bf7c75d96f97 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Fri, 3 Apr 2020 22:19:55 -0400 Subject: [PATCH] r187: reversed round in clear_opt() --- Assembly.cpp | 4 ++-- CommandLines.cpp | 4 ++-- CommandLines.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assembly.cpp b/Assembly.cpp index 7e3895d..601d7f3 100644 --- a/Assembly.cpp +++ b/Assembly.cpp @@ -1315,14 +1315,14 @@ int ha_assemble(void) // error correction assert(asm_opt.number_of_round > 0); for (r = 0; r < asm_opt.number_of_round; ++r) { - clear_opt(&asm_opt, asm_opt.number_of_round - r); // this update asm_opt.roundID and a few other fields + clear_opt(&asm_opt, r); // this update asm_opt.roundID and a few other fields ha_overlap_and_correct(r); fprintf(stderr, "[M::%s::%.3f*%.2f] ==> corrected reads for round %d\n", __func__, yak_realtime(), yak_cputime() / yak_realtime(), r + 1); } Output_corrected_reads(); fprintf(stderr, "[M::%s::%.3f*%.2f] ==> written corrected reads to disk\n", __func__, yak_realtime(), yak_cputime() / yak_realtime()); // overlap between corrected reads - clear_opt(&asm_opt, 0); + clear_opt(&asm_opt, asm_opt.number_of_round); ha_overlap_final(); fprintf(stderr, "[M::%s::%.3f*%.2f] ==> found overlaps for the final round\n", __func__, yak_realtime(), yak_cputime() / yak_realtime()); ha_ft_destroy(ha_flt_tab); diff --git a/CommandLines.cpp b/CommandLines.cpp index fab4cd3..684873b 100644 --- a/CommandLines.cpp +++ b/CommandLines.cpp @@ -101,13 +101,13 @@ void destory_opt(hifiasm_opt_t* asm_opt) } } -void clear_opt(hifiasm_opt_t* asm_opt, int last_round) +void clear_opt(hifiasm_opt_t* asm_opt, int round) { asm_opt->complete_threads = 0; asm_opt->num_bases = 0; asm_opt->num_corrected_bases = 0; asm_opt->num_recorrected_bases = 0; - asm_opt->roundID = asm_opt->number_of_round - last_round; + asm_opt->roundID = round; } int check_file(char* name, const char* opt) diff --git a/CommandLines.h b/CommandLines.h index cbce419..38056e6 100644 --- a/CommandLines.h +++ b/CommandLines.h @@ -3,7 +3,7 @@ #include -#define HA_VERSION "0.3.0-dirty-r186" +#define HA_VERSION "0.3.0-dirty-r187" #define VERBOSE 0 #define VERBOSE_GFA 0 @@ -56,7 +56,7 @@ extern hifiasm_opt_t asm_opt; void init_opt(hifiasm_opt_t* asm_opt); void destory_opt(hifiasm_opt_t* asm_opt); -void clear_opt(hifiasm_opt_t* asm_opt, int last_round); +void clear_opt(hifiasm_opt_t* asm_opt, int round); int CommandLine_process(int argc, char *argv[], hifiasm_opt_t* asm_opt); double Get_T(void);