r499->false duplications

This commit is contained in:
chhylp123
2023-01-17 04:49:56 -05:00
parent 46391eba26
commit 25d6857d44
9 changed files with 641 additions and 65 deletions

View File

@@ -52,6 +52,7 @@ static ko_longopt_t long_options[] = {
{ "ul-tip", ko_required_argument, 338},
{ "low-het", ko_no_argument, 339},
{ "s-base", ko_required_argument, 340},
{ "bin-only", ko_no_argument, 341},
{ 0, 0, 0 }
};
@@ -193,7 +194,7 @@ void init_opt(hifiasm_opt_t* asm_opt)
asm_opt->max_ov_diff_final = 0.03;
asm_opt->hom_cov = 20;
asm_opt->het_cov = -1024;
asm_opt->max_n_chain = 100;
asm_opt->max_n_chain = MIN_N_CHAIN;
asm_opt->min_hist_kmer_cnt = 5;
asm_opt->load_index_from_disk = 1;
asm_opt->write_index_to_disk = 1;
@@ -260,6 +261,7 @@ void init_opt(hifiasm_opt_t* asm_opt)
asm_opt->is_read_trans = 1;
asm_opt->is_topo_trans = 1;
asm_opt->is_bub_trans = 1;
asm_opt->bin_only = 0;
}
void destory_enzyme(enzyme* f)
@@ -304,6 +306,14 @@ void ha_opt_update_cov(hifiasm_opt_t *opt, int hom_cov)
fprintf(stderr, "[M::%s] updated max_n_chain to %d\n", __func__, opt->max_n_chain);
}
void ha_opt_update_cov_min(hifiasm_opt_t *opt, int hom_cov, int min_chain)
{
int max_n_chain = (int)(hom_cov * opt->high_factor + .499);
opt->hom_cov = hom_cov; opt->max_n_chain = max_n_chain;
if(opt->max_n_chain < min_chain) opt->max_n_chain = min_chain;
fprintf(stderr, "[M::%s] updated max_n_chain to %d\n", __func__, opt->max_n_chain);
}
static int check_file(char* name, const char* opt)
{
if(!name)
@@ -782,8 +792,9 @@ int CommandLine_process(int argc, char *argv[], hifiasm_opt_t* asm_opt)
else if (c == 340) {
asm_opt->trans_base_rate_sec = atof(opt.arg);
if(asm_opt->trans_base_rate_sec < 0) asm_opt->is_base_trans = 0;
} else if (c == 'l')
{ ///0: disable purge_dup; 1: purge containment; 2: purge overlap
}
else if (c == 341) asm_opt->bin_only = 1;
else if (c == 'l') { ///0: disable purge_dup; 1: purge containment; 2: purge overlap
asm_opt->purge_level_primary = asm_opt->purge_level_trio = atoi(opt.arg);
}
else if (c == 's') asm_opt->purge_simi_rate_l2 = asm_opt->purge_simi_rate_l3 = atof(opt.arg);