add options

This commit is contained in:
chhylp123
2020-06-08 17:51:36 -04:00
parent 97f6efc4da
commit 71f6c93d58
4 changed files with 52 additions and 39 deletions
+4 -3
View File
@@ -1201,9 +1201,10 @@ int ha_assemble(void)
if (asm_opt.flag & HA_F_WRITE_PAF) Output_PAF(); if (asm_opt.flag & HA_F_WRITE_PAF) Output_PAF();
ha_triobin(&asm_opt); ha_triobin(&asm_opt);
} }
build_string_graph_without_clean(asm_opt.min_overlap_coverage, R_INF.paf, R_INF.reverse_paf,
R_INF.total_reads, R_INF.read_length, asm_opt.min_overlap_Len, asm_opt.max_hang_Len, asm_opt.clean_round, build_string_graph_without_clean(asm_opt.min_overlap_coverage, R_INF.paf, R_INF.reverse_paf,
asm_opt.gap_fuzz, asm_opt.min_drop_rate, asm_opt.max_drop_rate, asm_opt.output_file_name, asm_opt.large_pop_bubble_size, 0, !ovlp_loaded); R_INF.total_reads, R_INF.read_length, asm_opt.min_overlap_Len, asm_opt.max_hang_Len, asm_opt.clean_round,
asm_opt.gap_fuzz, asm_opt.min_drop_rate, asm_opt.max_drop_rate, asm_opt.output_file_name, asm_opt.large_pop_bubble_size, 0, !ovlp_loaded);
destory_All_reads(&R_INF); destory_All_reads(&R_INF);
return 0; return 0;
} }
+4 -1
View File
@@ -50,6 +50,7 @@ void Print_H(hifiasm_opt_t* asm_opt)
fprintf(stderr, " -n INT small removed unitig threshold [%d]\n", asm_opt->max_short_tip); fprintf(stderr, " -n INT small removed unitig threshold [%d]\n", asm_opt->max_short_tip);
fprintf(stderr, " -x FLOAT max overlap drop ratio [%.2g]\n", asm_opt->max_drop_rate); fprintf(stderr, " -x FLOAT max overlap drop ratio [%.2g]\n", asm_opt->max_drop_rate);
fprintf(stderr, " -y FLOAT min overlap drop ratio [%.2g]\n", asm_opt->min_drop_rate); fprintf(stderr, " -y FLOAT min overlap drop ratio [%.2g]\n", asm_opt->min_drop_rate);
fprintf(stderr, " -u disable post join contigs step which may improve N50. Don't disable in default.\n");
fprintf(stderr, " --version show version number\n"); fprintf(stderr, " --version show version number\n");
fprintf(stderr, " -h show help information\n"); fprintf(stderr, " -h show help information\n");
@@ -361,7 +362,7 @@ int CommandLine_process(int argc, char *argv[], hifiasm_opt_t* asm_opt)
int c; int c;
while ((c = ketopt(&opt, argc, argv, 1, "hvt:o:k:w:m:n:r:a:b:z:x:y:p:c:d:M:P:if:D:FN:1:2:3:4:l:s:O:", long_options)) >= 0) { while ((c = ketopt(&opt, argc, argv, 1, "hvt:o:k:w:m:n:r:a:b:z:x:y:p:c:d:M:P:if:D:FN:1:2:3:4:l:s:O:eu", long_options)) >= 0) {
if (c == 'h') if (c == 'h')
{ {
Print_H(asm_opt); Print_H(asm_opt);
@@ -396,6 +397,8 @@ int CommandLine_process(int argc, char *argv[], hifiasm_opt_t* asm_opt)
else if (c == 'p') asm_opt->small_pop_bubble_size = atoll(opt.arg); else if (c == 'p') asm_opt->small_pop_bubble_size = atoll(opt.arg);
else if (c == 'm') asm_opt->large_pop_bubble_size = atoll(opt.arg); else if (c == 'm') asm_opt->large_pop_bubble_size = atoll(opt.arg);
else if (c == 'n') asm_opt->max_short_tip = atoll(opt.arg); else if (c == 'n') asm_opt->max_short_tip = atoll(opt.arg);
else if (c == 'e') asm_opt->flag |= HA_F_BAN_ASSEMBLY;
else if (c == 'u') asm_opt->flag |= HA_F_BAN_POST_JOIN;
else if (c == 301) asm_opt->flag |= HA_F_VERBOSE_GFA; else if (c == 301) asm_opt->flag |= HA_F_VERBOSE_GFA;
else if (c == 302) asm_opt->flag |= HA_F_WRITE_PAF; 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 == 303) asm_opt->flag |= HA_F_WRITE_EC;
+3 -1
View File
@@ -3,7 +3,7 @@
#include <pthread.h> #include <pthread.h>
#define HA_VERSION "0.7-dirty-r255" #define HA_VERSION "0.7-dirty-r256"
#define VERBOSE 0 #define VERBOSE 0
@@ -15,6 +15,8 @@
#define HA_F_SKIP_TRIOBIN 0x20 #define HA_F_SKIP_TRIOBIN 0x20
#define HA_F_PURGE_CONTAIN 0x40 #define HA_F_PURGE_CONTAIN 0x40
#define HA_F_PURGE_JOIN 0x80 #define HA_F_PURGE_JOIN 0x80
#define HA_F_BAN_POST_JOIN 0x100
#define HA_F_BAN_ASSEMBLY 0x200
#define HA_MIN_OV_DIFF 0.02 // min sequence divergence in an overlap #define HA_MIN_OV_DIFF 0.02 // min sequence divergence in an overlap
+39 -32
View File
@@ -13251,15 +13251,18 @@ kvec_asg_arc_t_warp* new_rtg_edges)
renew_utg(ug, read_g, new_rtg_edges); renew_utg(ug, read_g, new_rtg_edges);
rescue_missing_overlaps_aggressive(*ug, read_g, sources, coverage_cut, ruIndex, max_hang, if (!(asm_opt.flag & HA_F_BAN_POST_JOIN))
min_ovlp, 0, 0, 1, NULL); {
rescue_missing_overlaps_aggressive(*ug, read_g, sources, coverage_cut, ruIndex, max_hang,
min_ovlp, 0, 0, 1, NULL);
renew_utg(ug, read_g, new_rtg_edges); renew_utg(ug, read_g, new_rtg_edges);
rescue_contained_reads_aggressive(*ug, read_g, sources, coverage_cut, ruIndex, max_hang, rescue_contained_reads_aggressive(*ug, read_g, sources, coverage_cut, ruIndex, max_hang,
min_ovlp, 0, 10, 0, 1, NULL, NULL); min_ovlp, 0, 10, 0, 1, NULL, NULL);
renew_utg(ug, read_g, new_rtg_edges); renew_utg(ug, read_g, new_rtg_edges);
}
update_unitig_graph((*ug), read_g, reverse_sources, ruIndex, 1, flag, drop_rate); update_unitig_graph((*ug), read_g, reverse_sources, ruIndex, 1, flag, drop_rate);
@@ -22084,27 +22087,27 @@ kvec_asg_arc_t_warp* new_rtg_edges)
renew_utg(ug, read_g, new_rtg_edges); renew_utg(ug, read_g, new_rtg_edges);
} }
if (!(asm_opt.flag & HA_F_BAN_POST_JOIN))
rescue_missing_overlaps_aggressive(*ug, read_g, sources, coverage_cut, ruIndex, max_hang,
min_ovlp, 0, 0, 1, NULL);
renew_utg(ug, read_g, new_rtg_edges);
rescue_contained_reads_aggressive(*ug, read_g, sources, coverage_cut, ruIndex, max_hang,
min_ovlp, 0, 10, 0, 1, NULL, NULL);
renew_utg(ug, read_g, new_rtg_edges);
if(asm_opt.purge_level_primary > 0)
{ {
just_contain = 0; rescue_missing_overlaps_aggressive(*ug, read_g, sources, coverage_cut, ruIndex, max_hang,
if(asm_opt.purge_level_primary == 1) just_contain = 1; min_ovlp, 0, 0, 1, NULL);
purge_dups(*ug, read_g, coverage_cut, reverse_sources, ruIndex, new_rtg_edges,
asm_opt.purge_simi_rate, asm_opt.purge_overlap_len, max_hang, min_ovlp, bubble_dist,
drop_ratio, just_contain);
delete_useless_nodes(ug);
renew_utg(ug, read_g, new_rtg_edges); renew_utg(ug, read_g, new_rtg_edges);
rescue_contained_reads_aggressive(*ug, read_g, sources, coverage_cut, ruIndex, max_hang,
min_ovlp, 0, 10, 0, 1, NULL, NULL);
renew_utg(ug, read_g, new_rtg_edges);
if(asm_opt.purge_level_primary > 0)
{
just_contain = 0;
if(asm_opt.purge_level_primary == 1) just_contain = 1;
purge_dups(*ug, read_g, coverage_cut, reverse_sources, ruIndex, new_rtg_edges,
asm_opt.purge_simi_rate, asm_opt.purge_overlap_len, max_hang, min_ovlp, bubble_dist,
drop_ratio, just_contain);
delete_useless_nodes(ug);
renew_utg(ug, read_g, new_rtg_edges);
}
} }
@@ -26107,7 +26110,7 @@ ma_sub_t **coverage_cut_ptr, int debug_g)
normalize_ma_hit_t_single_side_advance(sources, n_read); normalize_ma_hit_t_single_side_advance(sources, n_read);
normalize_ma_hit_t_single_side_advance(reverse_sources, n_read); normalize_ma_hit_t_single_side_advance(reverse_sources, n_read);
// debug_info_of_specfic_read(">m64011_190830_220126/117834372/ccs", sources, reverse_sources, // debug_info_of_specfic_read("m64062_190803_042216/122882911/ccs", sources, reverse_sources,
// -1, "clean"); // -1, "clean");
@@ -26369,13 +26372,17 @@ long long bubble_dist, int read_graph, int write)
&R_INF, output_file_name); &R_INF, output_file_name);
} }
try_rescue_overlaps(sources, reverse_sources, n_read, 4); if (!(asm_opt.flag & HA_F_BAN_ASSEMBLY))
{
try_rescue_overlaps(sources, reverse_sources, n_read, 4);
clean_graph(min_dp, sources, reverse_sources, n_read, readLen, mini_overlap_length, clean_graph(min_dp, sources, reverse_sources, n_read, readLen, mini_overlap_length,
max_hang_length, clean_round, gap_fuzz, min_ovlp_drop_ratio, max_ovlp_drop_ratio, max_hang_length, clean_round, gap_fuzz, min_ovlp_drop_ratio, max_ovlp_drop_ratio,
output_file_name, bubble_dist, read_graph, &ruIndex, &sg, &coverage_cut, 0); output_file_name, bubble_dist, read_graph, &ruIndex, &sg, &coverage_cut, 0);
asg_destroy(sg);
free(coverage_cut);
}
asg_destroy(sg);
free(coverage_cut);
destory_R_to_U(&ruIndex); destory_R_to_U(&ruIndex);
} }