This commit is contained in:
chhylp123
2021-08-12 11:16:10 -04:00
parent 6ea66e1290
commit bfff640a82
8 changed files with 646 additions and 113 deletions
-64
View File
@@ -778,70 +778,6 @@ skip_dp:
return chainLen;
}
void calculate_overlap_region_by_chaining_back(Candidates_list* candidates, overlap_region_alloc* overlap_list,
uint64_t readID, uint64_t readLength, All_reads* R_INF, double band_width_threshold, int add_beg_end)
{
overlap_region tmp_region;
long long i = 0;
uint64_t current_ID;
uint64_t current_stand;
if (candidates->length == 0)
{
return;
}
long long sub_region_beg;
long long sub_region_end;
init_fake_cigar(&(tmp_region.f_cigar));
i = 0;
while (i < candidates->length)
{
current_ID = candidates->list[i].readID;
current_stand = candidates->list[i].strand;
///reference read
tmp_region.x_id = readID;
tmp_region.x_pos_strand = current_stand;
///query read
tmp_region.y_id = current_ID;
///here the strand of query is always 0
tmp_region.y_pos_strand = 0;
sub_region_beg = i;
sub_region_end = i;
i++;
while (i < candidates->length
&&
current_ID == candidates->list[i].readID
&&
current_stand == candidates->list[i].strand)
{
sub_region_end = i;
i++;
}
if (tmp_region.x_id == tmp_region.y_id)
{
continue;
}
chain_DP(candidates->list + sub_region_beg,
sub_region_end - sub_region_beg + 1, &(candidates->chainDP), &tmp_region, band_width_threshold,
25, Get_READ_LENGTH((*R_INF), tmp_region.x_id), Get_READ_LENGTH((*R_INF), tmp_region.y_id));
///if (tmp_region.x_id != tmp_region.y_id && tmp_region.shared_seed > 1)
if (tmp_region.x_id != tmp_region.y_id)
{
append_inexact_overlap_region_alloc(overlap_list, &tmp_region, R_INF, add_beg_end);
}
}
destory_fake_cigar(&(tmp_region.f_cigar));
}
void calculate_overlap_region_by_chaining(Candidates_list* candidates, overlap_region_alloc* overlap_list, kvec_t_u64_warp* chain_idx,