mirror of
https://github.com/chhylp123/hifiasm.git
synced 2026-10-09 15:40:55 +08:00
removed k_mer_pos_list_alloc
This commit is contained in:
+1
-12
@@ -397,8 +397,6 @@ void* Overlap_calculate_heap_merge(void* arg)
|
|||||||
init_Graph(&DAGCon);
|
init_Graph(&DAGCon);
|
||||||
init_Graph(&POA_Graph);
|
init_Graph(&POA_Graph);
|
||||||
init_Candidates_list(&l);
|
init_Candidates_list(&l);
|
||||||
k_mer_pos_list_alloc array_list;
|
|
||||||
init_k_mer_pos_list_alloc(&array_list);
|
|
||||||
|
|
||||||
overlap_region_alloc overlap_list;
|
overlap_region_alloc overlap_list;
|
||||||
init_overlap_region_alloc(&overlap_list);
|
init_overlap_region_alloc(&overlap_list);
|
||||||
@@ -425,7 +423,7 @@ void* Overlap_calculate_heap_merge(void* arg)
|
|||||||
|
|
||||||
for (i = thr_ID; i < (long long)R_INF.total_reads; i = i + asm_opt.thread_num)
|
for (i = thr_ID; i < (long long)R_INF.total_reads; i = i + asm_opt.thread_num)
|
||||||
{
|
{
|
||||||
///get_new_candidates(i, &g_read, &overlap_list, &array_list, &heap, &l, THRESHOLD_RATE*1.5);
|
//get_new_candidates(i, &g_read, &overlap_list, &array_list, &heap, &l, THRESHOLD_RATE*1.5);
|
||||||
//get_new_candidates(i, &g_read, &overlap_list, &array_list, &l, 0.02, 1);
|
//get_new_candidates(i, &g_read, &overlap_list, &array_list, &l, 0.02, 1);
|
||||||
ha_get_new_candidates(ab, i, &g_read, &overlap_list, &l, 0.02, 1);
|
ha_get_new_candidates(ab, i, &g_read, &overlap_list, &l, 0.02, 1);
|
||||||
|
|
||||||
@@ -463,7 +461,6 @@ void* Overlap_calculate_heap_merge(void* arg)
|
|||||||
destory_buffer_sub_block(¤t_sub_buffer);
|
destory_buffer_sub_block(¤t_sub_buffer);
|
||||||
destory_Candidates_list(&l);
|
destory_Candidates_list(&l);
|
||||||
destory_overlap_region_alloc(&overlap_list);
|
destory_overlap_region_alloc(&overlap_list);
|
||||||
destory_k_mer_pos_list_alloc(&array_list);
|
|
||||||
destory_Graph(&POA_Graph);
|
destory_Graph(&POA_Graph);
|
||||||
destory_Graph(&DAGCon);
|
destory_Graph(&DAGCon);
|
||||||
destory_UC_Read(&g_read);
|
destory_UC_Read(&g_read);
|
||||||
@@ -513,9 +510,6 @@ void* Output_related_reads(void* arg)
|
|||||||
init_Candidates_list(&l);
|
init_Candidates_list(&l);
|
||||||
//init_Candidates_list(&debug_l);
|
//init_Candidates_list(&debug_l);
|
||||||
|
|
||||||
k_mer_pos_list_alloc array_list;
|
|
||||||
init_k_mer_pos_list_alloc(&array_list);
|
|
||||||
|
|
||||||
overlap_region_alloc overlap_list;
|
overlap_region_alloc overlap_list;
|
||||||
init_overlap_region_alloc(&overlap_list);
|
init_overlap_region_alloc(&overlap_list);
|
||||||
|
|
||||||
@@ -577,7 +571,6 @@ void* Output_related_reads(void* arg)
|
|||||||
destory_buffer_sub_block(¤t_sub_buffer);
|
destory_buffer_sub_block(¤t_sub_buffer);
|
||||||
destory_Candidates_list(&l);
|
destory_Candidates_list(&l);
|
||||||
destory_overlap_region_alloc(&overlap_list);
|
destory_overlap_region_alloc(&overlap_list);
|
||||||
destory_k_mer_pos_list_alloc(&array_list);
|
|
||||||
destory_Graph(&POA_Graph);
|
destory_Graph(&POA_Graph);
|
||||||
destory_Graph(&DAGCon);
|
destory_Graph(&DAGCon);
|
||||||
destory_UC_Read(&g_read);
|
destory_UC_Read(&g_read);
|
||||||
@@ -1100,9 +1093,6 @@ void* Final_overlap_calculate_heap_merge(void* arg)
|
|||||||
Candidates_list l;
|
Candidates_list l;
|
||||||
init_Candidates_list(&l);
|
init_Candidates_list(&l);
|
||||||
|
|
||||||
k_mer_pos_list_alloc array_list;
|
|
||||||
init_k_mer_pos_list_alloc(&array_list);
|
|
||||||
|
|
||||||
overlap_region_alloc overlap_list;
|
overlap_region_alloc overlap_list;
|
||||||
init_overlap_region_alloc(&overlap_list);
|
init_overlap_region_alloc(&overlap_list);
|
||||||
|
|
||||||
@@ -1156,7 +1146,6 @@ void* Final_overlap_calculate_heap_merge(void* arg)
|
|||||||
|
|
||||||
destory_Candidates_list(&l);
|
destory_Candidates_list(&l);
|
||||||
destory_overlap_region_alloc(&overlap_list);
|
destory_overlap_region_alloc(&overlap_list);
|
||||||
destory_k_mer_pos_list_alloc(&array_list);
|
|
||||||
destory_UC_Read(&g_read);
|
destory_UC_Read(&g_read);
|
||||||
destory_UC_Read(&overlap_read);
|
destory_UC_Read(&overlap_read);
|
||||||
destory_Cigar_record_alloc(&cigarline);
|
destory_Cigar_record_alloc(&cigarline);
|
||||||
|
|||||||
@@ -687,41 +687,6 @@ void append_window_list(overlap_region* region, uint64_t x_start, uint64_t x_end
|
|||||||
region->w_list_length++;
|
region->w_list_length++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_k_mer_pos_list_alloc(k_mer_pos_list_alloc* list)
|
|
||||||
{
|
|
||||||
list->size = 1000;
|
|
||||||
list->length = 0;
|
|
||||||
//list->list = (k_mer_pos_list*)malloc(sizeof(k_mer_pos_list)*list->size);
|
|
||||||
list->list = (k_mer_pos_list*)calloc(list->size, sizeof(k_mer_pos_list));
|
|
||||||
}
|
|
||||||
|
|
||||||
void clear_k_mer_pos_list_alloc(k_mer_pos_list_alloc* list)
|
|
||||||
{
|
|
||||||
list->length = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void destory_k_mer_pos_list_alloc(k_mer_pos_list_alloc* list)
|
|
||||||
{
|
|
||||||
free(list->list);
|
|
||||||
}
|
|
||||||
|
|
||||||
void append_k_mer_pos_list_alloc(k_mer_pos_list_alloc* list, k_mer_pos* n_list, uint64_t n_length,
|
|
||||||
uint64_t n_end_pos, uint8_t n_direction)
|
|
||||||
{
|
|
||||||
if (list->length + 1 > list->size)
|
|
||||||
{
|
|
||||||
list->size = list->size * 2;
|
|
||||||
list->list = (k_mer_pos_list*)realloc(list->list, sizeof(k_mer_pos_list)*list->size);
|
|
||||||
}
|
|
||||||
|
|
||||||
list->list[list->length].list = n_list;
|
|
||||||
list->list[list->length].length = n_length;
|
|
||||||
list->list[list->length].direction = n_direction;
|
|
||||||
list->list[list->length].end_pos = n_end_pos;
|
|
||||||
|
|
||||||
list->length++;
|
|
||||||
}
|
|
||||||
|
|
||||||
void test_single_list(Candidates_list* candidates, k_mer_pos* n_list, uint64_t n_lengh, uint64_t end_pos, uint64_t strand)
|
void test_single_list(Candidates_list* candidates, k_mer_pos* n_list, uint64_t n_lengh, uint64_t end_pos, uint64_t strand)
|
||||||
{
|
{
|
||||||
uint64_t i;
|
uint64_t i;
|
||||||
|
|||||||
@@ -43,13 +43,6 @@ typedef struct
|
|||||||
uint64_t end_pos;
|
uint64_t end_pos;
|
||||||
} k_mer_pos_list;
|
} k_mer_pos_list;
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
k_mer_pos_list* list;
|
|
||||||
uint64_t size;
|
|
||||||
uint64_t length;
|
|
||||||
} k_mer_pos_list_alloc;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int C_L[CIGAR_MAX_LENGTH];
|
int C_L[CIGAR_MAX_LENGTH];
|
||||||
@@ -152,12 +145,6 @@ void init_Candidates_list(Candidates_list* l);
|
|||||||
void clear_Candidates_list(Candidates_list* l);
|
void clear_Candidates_list(Candidates_list* l);
|
||||||
void destory_Candidates_list(Candidates_list* l);
|
void destory_Candidates_list(Candidates_list* l);
|
||||||
|
|
||||||
void init_k_mer_pos_list_alloc(k_mer_pos_list_alloc* list);
|
|
||||||
void destory_k_mer_pos_list_alloc(k_mer_pos_list_alloc* list);
|
|
||||||
void clear_k_mer_pos_list_alloc(k_mer_pos_list_alloc* list);
|
|
||||||
void append_k_mer_pos_list_alloc(k_mer_pos_list_alloc* list, k_mer_pos* n_list, uint64_t n_length,
|
|
||||||
uint64_t n_end_pos, uint8_t n_direction);
|
|
||||||
|
|
||||||
void init_overlap_region_alloc(overlap_region_alloc* list);
|
void init_overlap_region_alloc(overlap_region_alloc* list);
|
||||||
void clear_overlap_region_alloc(overlap_region_alloc* list);
|
void clear_overlap_region_alloc(overlap_region_alloc* list);
|
||||||
void destory_overlap_region_alloc(overlap_region_alloc* list);
|
void destory_overlap_region_alloc(overlap_region_alloc* list);
|
||||||
|
|||||||
Reference in New Issue
Block a user