mirror of
https://github.com/chhylp123/hifiasm.git
synced 2026-09-15 12:47:57 +08:00
minimizer filtering apparently works
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#define Get_Cigar_Length(RECORD) (RECORD>>2)
|
||||
|
||||
void *ha_gen_flt_tab(const hifiasm_opt_t *asm_opt);
|
||||
void *ha_gen_mzidx(const hifiasm_opt_t *asm_opt, const void *flt_tab);
|
||||
|
||||
void Counting_multiple_thr();
|
||||
void Build_hash_table_multiple_thr();
|
||||
void Overlap_calculate_multipe_thr();
|
||||
|
||||
@@ -65,6 +65,7 @@ void init_opt(hifiasm_opt_t* asm_opt)
|
||||
asm_opt->mat_index = NULL;
|
||||
asm_opt->thread_num = 1;
|
||||
asm_opt->k_mer_length = 41;
|
||||
asm_opt->mz_win = 41;
|
||||
asm_opt->bf_shift = 37;
|
||||
asm_opt->high_factor = 10.0f;
|
||||
asm_opt->no_HPC = 0;
|
||||
|
||||
@@ -15,6 +15,7 @@ typedef struct {
|
||||
char* mat_index;
|
||||
int thread_num;
|
||||
int k_mer_length;
|
||||
int mz_win;
|
||||
int bf_shift;
|
||||
float high_factor;
|
||||
int no_HPC;
|
||||
|
||||
1
main.cpp
1
main.cpp
@@ -17,6 +17,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
yak_reset_realtime();
|
||||
flt_tab = ha_gen_flt_tab(&asm_opt);
|
||||
ha_gen_mzidx(&asm_opt, flt_tab);
|
||||
ha_hf_destroy(flt_tab);
|
||||
if (0) {
|
||||
Correct_Reads(asm_opt.number_of_round);
|
||||
|
||||
@@ -496,3 +496,24 @@ void ha_hf_destroy(void *h)
|
||||
{
|
||||
yak_hh_destroy((yak_hh_t*)h);
|
||||
}
|
||||
|
||||
void *ha_gen_mzidx(const hifiasm_opt_t *asm_opt, const void *flt_tab)
|
||||
{
|
||||
int64_t cnt[YAK_N_COUNTS];
|
||||
int peak_hom, peak_het;
|
||||
yak_copt_t opt;
|
||||
yak_ch_t *h;
|
||||
yak_copt_init(&opt);
|
||||
opt.is_HPC = !asm_opt->no_HPC;
|
||||
opt.k = asm_opt->k_mer_length;
|
||||
opt.w = asm_opt->mz_win;
|
||||
opt.n_thread = asm_opt->thread_num;
|
||||
opt.bf_shift = asm_opt->bf_shift;
|
||||
h = yak_count_file(&opt, asm_opt->num_reads, asm_opt->read_file_names, flt_tab);
|
||||
yak_ch_hist(h, cnt, opt.n_thread);
|
||||
fprintf(stderr, "[M::%s] count[%d] = %ld (for sanity check)\n", __func__, YAK_MAX_COUNT, (long)cnt[YAK_MAX_COUNT]);
|
||||
peak_hom = yak_analyze_count(YAK_N_COUNTS, cnt, &peak_het);
|
||||
if (peak_hom > 0) fprintf(stderr, "[M::%s] peak_hom: %d; peak_het: %d\n", __func__, peak_hom, peak_het);
|
||||
yak_ch_destroy(h);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user