mirror of
https://github.com/chhylp123/hifiasm.git
synced 2026-09-15 12:47:57 +08:00
new gchain
This commit is contained in:
26
Assembly.cpp
26
Assembly.cpp
@@ -1476,6 +1476,31 @@ void Output_PAF()
|
||||
fprintf(stderr, "PAF has been written.\n");
|
||||
}
|
||||
|
||||
void Output_yak_binning()
|
||||
{
|
||||
fprintf(stderr, "Writing binning to disk ...... \n");
|
||||
char* paf_name = (char*)malloc(strlen(asm_opt.output_file_name)+50);
|
||||
sprintf(paf_name, "%s.hap1.bin.log", asm_opt.output_file_name);
|
||||
FILE* oh1 = fopen(paf_name, "w");
|
||||
sprintf(paf_name, "%s.hap2.bin.log", asm_opt.output_file_name);
|
||||
FILE* oh2 = fopen(paf_name, "w");
|
||||
uint64_t i;
|
||||
|
||||
for (i = 0; i < R_INF.total_reads; i++) {
|
||||
if(R_INF.trio_flag[i]==FATHER) {
|
||||
fprintf(oh1, "%.*s\n", (int)Get_NAME_LENGTH(R_INF, i), Get_NAME(R_INF, i));
|
||||
}
|
||||
if(R_INF.trio_flag[i]==MOTHER) {
|
||||
fprintf(oh2, "%.*s\n", (int)Get_NAME_LENGTH(R_INF, i), Get_NAME(R_INF, i));
|
||||
}
|
||||
}
|
||||
|
||||
free(paf_name);
|
||||
fclose(oh1); fclose(oh2);
|
||||
fprintf(stderr, "Binning has been written.\n");
|
||||
}
|
||||
|
||||
|
||||
int check_cluster(uint64_t* list, long long listLen, ma_hit_t_alloc* paf, float threshold)
|
||||
{
|
||||
long long i, k;
|
||||
@@ -1723,6 +1748,7 @@ int ha_assemble(void)
|
||||
if (asm_opt.flag & HA_F_WRITE_EC) Output_corrected_reads();
|
||||
if (asm_opt.flag & HA_F_WRITE_PAF) Output_PAF();
|
||||
if (asm_opt.het_cov == -1024) hap_recalculate_peaks(asm_opt.output_file_name), ovlp_loaded = 2;
|
||||
if (asm_opt.fn_bin_yak[0] && asm_opt.fn_bin_yak[1]) Output_yak_binning();
|
||||
}
|
||||
if (!ovlp_loaded) {
|
||||
ha_flt_tab = ha_idx = NULL;
|
||||
|
||||
Reference in New Issue
Block a user