diff --git a/CommandLines.cpp b/CommandLines.cpp index 8c599cc..60d1a90 100644 --- a/CommandLines.cpp +++ b/CommandLines.cpp @@ -15,6 +15,7 @@ static ko_longopt_t long_options[] = { { "write-paf", ko_no_argument, 302 }, { "write-ec", ko_no_argument, 303 }, { "skip-triobin", ko_no_argument, 304 }, + { "purge-trio", ko_no_argument, 305 }, { 0, 0, 0 } }; @@ -355,19 +356,20 @@ int CommandLine_process(int argc, char *argv[], hifiasm_opt_t* asm_opt) else if (c == 302) asm_opt->flag |= HA_F_WRITE_PAF; else if (c == 303) asm_opt->flag |= HA_F_WRITE_EC; else if (c == 304) asm_opt->flag |= HA_F_SKIP_TRIOBIN; + else if (c == 305) asm_opt->flag |= HA_F_PURGE_TRIO; else if (c == ':') { fprintf(stderr, "[ERROR] missing option argument in \"%s\"\n", argv[opt.i - 1]); - return 0; + return 1; } else if (c == '?') { fprintf(stderr, "[ERROR] unknown option in \"%s\"\n", argv[opt.i - 1]); - return 0; + return 1; } } - if (argc == 1) + if (argc == opt.ind) { Print_H(asm_opt); return 0; diff --git a/CommandLines.h b/CommandLines.h index 146406f..467124d 100644 --- a/CommandLines.h +++ b/CommandLines.h @@ -3,7 +3,7 @@ #include -#define HA_VERSION "0.5.0" +#define HA_VERSION "0.5-dirty-r246" #define VERBOSE 0 @@ -13,6 +13,7 @@ #define HA_F_WRITE_EC 0x8 #define HA_F_WRITE_PAF 0x10 #define HA_F_SKIP_TRIOBIN 0x20 +#define HA_F_PURGE_TRIO 0x40 typedef struct { int flag; diff --git a/Overlaps.cpp b/Overlaps.cpp index 4fa642d..0aedd5d 100644 --- a/Overlaps.cpp +++ b/Overlaps.cpp @@ -13222,10 +13222,12 @@ kvec_asg_arc_t_warp* new_rtg_edges) renew_utg(ug, read_g, new_rtg_edges); delete_useless_nodes(ug); - purge_dups(*ug, read_g, coverage_cut, reverse_sources, ruIndex, new_rtg_edges, 0.75, 50, 50, 0.5, max_hang, - min_ovlp, bubble_dist, drop_ratio, 1); - delete_useless_nodes(ug); + if (asm_opt.flag & HA_F_PURGE_TRIO) { + purge_dups(*ug, read_g, coverage_cut, reverse_sources, ruIndex, new_rtg_edges, 0.75, 50, 50, 0.5, max_hang, + min_ovlp, bubble_dist, drop_ratio, 1); + delete_useless_nodes(ug); + } set_drop_trio_flag(*ug);