new realignment

This commit is contained in:
chhylp123
2022-05-03 00:59:24 -04:00
parent fdf24d5589
commit 8138941a26
8 changed files with 728 additions and 116 deletions
+10 -2
View File
@@ -1486,7 +1486,7 @@ int load_pt_index(void **r_flt_tab, ha_pt_t **r_ha_idx, All_reads* r, hifiasm_op
int uidx_write(void *flt_tab, ha_pt_t *ha_idx, char* file_name)
int uidx_write(void *flt_tab, ha_pt_t *ha_idx, char* file_name, ma_ug_t *ug)
{
char* gfa_name = (char*)malloc(strlen(file_name)+25);
sprintf(gfa_name, "%s.uidx.bin", file_name);
@@ -1496,6 +1496,8 @@ int uidx_write(void *flt_tab, ha_pt_t *ha_idx, char* file_name)
return 0;
}
if(ug) write_dbug(ug, fp);
yak_ft_t *ha_flt_tab = (yak_ft_t*)flt_tab;
if(ha_flt_tab)
@@ -1529,7 +1531,7 @@ int uidx_write(void *flt_tab, ha_pt_t *ha_idx, char* file_name)
}
int uidx_load(void **r_flt_tab, ha_pt_t **r_ha_idx, char* file_name)
int uidx_load(void **r_flt_tab, ha_pt_t **r_ha_idx, char* file_name, ma_ug_t *ug)
{
char* gfa_name = (char*)malloc(strlen(file_name)+25);
sprintf(gfa_name, "%s.uidx.bin", file_name);
@@ -1539,6 +1541,12 @@ int uidx_load(void **r_flt_tab, ha_pt_t **r_ha_idx, char* file_name)
return 0;
}
if(ug && (!test_dbug(ug, fp))) {
fprintf(stderr, "[M::%s] Renew UL Index\n", __func__);
free(gfa_name); fclose(fp);
return 0;
}
ha_pt_t *ha_idx = NULL;
char mode = 0;
int f_flag = 0, i;