Skip to content

Commit

Permalink
fix a bug that reduce recall rate
Browse files Browse the repository at this point in the history
  • Loading branch information
tjiangHIT committed Nov 15, 2019
1 parent 112f855 commit 17225ed
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions src/cuteSV/cuteSV
Original file line number Diff line number Diff line change
Expand Up @@ -165,33 +165,33 @@ def analysis_split_read(split_read, SV_size, RLength, read_name, candidate):



# if len(SP_list) >= 3 and trigger_INS_TRA == 1:
# if SP_list[0][4] == SP_list[-1][4]:
# # print(SP_list[0])
# # print(SP_list[-1])
# if SP_list[0][5] != SP_list[-1][5]:
# pass
# else:
# if SP_list[0][5] == '+':
# ele_1 = SP_list[0]
# ele_2 = SP_list[-1]
# else:
# ele_1 = [RLength-SP_list[-1][1], RLength-SP_list[-1][0]]+SP_list[-1][2:]
# ele_2 = [RLength-SP_list[0][1],RLength-SP_list[0][0]]+SP_list[0][2:]
# # print(ele_1)
# # print(ele_2)
# dis_ref = ele_2[2] - ele_1[3]
# dis_read = ele_2[0] - ele_1[1]
# if dis_ref < 100 and dis_read - dis_ref >= SV_size and dis_read - dis_ref <= 100000:
# # print(min(ele_2[2], ele_1[3]), dis_read - dis_ref, read_name)
# if ele_1[4] not in candidate['INS']:
# candidate['INS'][ele_1[4]] = list()
# candidate["INS"][ele_2[4]].append([min(ele_2[2], ele_1[3]), dis_read - dis_ref, read_name])

# if dis_ref <= -SV_size:
# if ele_2[4] not in candidate["DUP"]:
# candidate["DUP"][ele_2[4]] = list()
# candidate["DUP"][ele_2[4]].append([ele_2[2], ele_1[3], read_name])
if len(SP_list) >= 3 and trigger_INS_TRA == 1:
if SP_list[0][4] == SP_list[-1][4]:
# print(SP_list[0])
# print(SP_list[-1])
if SP_list[0][5] != SP_list[-1][5]:
pass
else:
if SP_list[0][5] == '+':
ele_1 = SP_list[0]
ele_2 = SP_list[-1]
else:
ele_1 = [RLength-SP_list[-1][1], RLength-SP_list[-1][0]]+SP_list[-1][2:]
ele_2 = [RLength-SP_list[0][1],RLength-SP_list[0][0]]+SP_list[0][2:]
# print(ele_1)
# print(ele_2)
dis_ref = ele_2[2] - ele_1[3]
dis_read = ele_2[0] - ele_1[1]
if dis_ref < 100 and dis_read - dis_ref >= SV_size and dis_read - dis_ref <= 100000:
# print(min(ele_2[2], ele_1[3]), dis_read - dis_ref, read_name)
if ele_1[4] not in candidate['INS']:
candidate['INS'][ele_1[4]] = list()
candidate["INS"][ele_2[4]].append([min(ele_2[2], ele_1[3]), dis_read - dis_ref, read_name])

if dis_ref <= -SV_size:
if ele_2[4] not in candidate["DUP"]:
candidate["DUP"][ele_2[4]] = list()
candidate["DUP"][ele_2[4]].append([ele_2[2], ele_1[3], read_name])

def acquire_clip_pos(deal_cigar):
seq = list(cigar.Cigar(deal_cigar).items())
Expand Down

0 comments on commit 17225ed

Please sign in to comment.