Skip to content

Commit

Permalink
Merge pull request #71 from Meltpinkg/master
Browse files Browse the repository at this point in the history
Fix a bug that will report the fake SV. ref #64
  • Loading branch information
tjiangHIT authored Jan 23, 2022
2 parents 4800470 + 32bebeb commit e2786bc
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/cuteSV/cuteSV
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,7 @@ def parse_read(read, Chr_name, SV_size, min_mapq, max_split_parts, min_read_len,
if element[0] in [0, 2, 7, 8]:
shift_ins += element[1]
if element[0] == 1 and element[1] >= SV_size:
shift_ins += 1
Combine_sig_in_same_read_ins.append([pos_start+shift_ins-1, element[1],
Combine_sig_in_same_read_ins.append([pos_start+shift_ins, element[1],
str(read.query_sequence[shift_ins_read-element[1]-hardclip_left:shift_ins_read-hardclip_left])])


Expand Down
6 changes: 5 additions & 1 deletion src/cuteSV/cuteSV_resolveDUP.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ def resolution_DUP(path, chr, read_count, max_cluster_bias, sv_size,
semi_dup_cluster = []
semi_dup_cluster.append([pos_1, pos_2, read_id])
else:
semi_dup_cluster.append([pos_1, pos_2, read_id])
if semi_dup_cluster[-1][0] == semi_dup_cluster[-1][1] == 0:
semi_dup_cluster = []
semi_dup_cluster.append([pos_1, pos_2, read_id])
else:
semi_dup_cluster.append([pos_1, pos_2, read_id])

if len(semi_dup_cluster) >= read_count:
if semi_dup_cluster[-1][0] == semi_dup_cluster[-1][1] == 0:
Expand Down
12 changes: 10 additions & 2 deletions src/cuteSV/cuteSV_resolveINDEL.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ def resolution_DEL(path, chr, svtype, read_count, threshold_gloab, max_cluster_b
semi_del_cluster = []
semi_del_cluster.append([pos, indel_len, read_id])
else:
semi_del_cluster.append([pos, indel_len, read_id])
if semi_del_cluster[-1][0] == semi_del_cluster[-1][1] == 0:
semi_del_cluster = []
semi_del_cluster.append([pos, indel_len, read_id])
else:
semi_del_cluster.append([pos, indel_len, read_id])

if len(semi_del_cluster) >= read_count:
if semi_del_cluster[-1][0] == semi_del_cluster[-1][1] == 0:
Expand Down Expand Up @@ -256,7 +260,11 @@ def resolution_INS(path, chr, svtype, read_count, threshold_gloab,
semi_ins_cluster = []
semi_ins_cluster.append([pos, indel_len, read_id, ins_seq])
else:
semi_ins_cluster.append([pos, indel_len, read_id, ins_seq])
if semi_ins_cluster[-1][0] == semi_ins_cluster[-1][1] == 0:
semi_ins_cluster = []
semi_ins_cluster.append([pos, indel_len, read_id, ins_seq])
else:
semi_ins_cluster.append([pos, indel_len, read_id, ins_seq])

if len(semi_ins_cluster) >= read_count:
if semi_ins_cluster[-1][0] == semi_ins_cluster[-1][1] == 0:
Expand Down
6 changes: 5 additions & 1 deletion src/cuteSV/cuteSV_resolveINV.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ def resolution_INV(path, chr, svtype, read_count, max_cluster_bias, sv_size,
semi_inv_cluster = []
semi_inv_cluster.append([breakpoint_1_in_read, breakpoint_2_in_read, read_id, strand])
else:
semi_inv_cluster.append([breakpoint_1_in_read, breakpoint_2_in_read, read_id, strand])
if semi_inv_cluster[-1][0] == semi_inv_cluster[-1][1] == 0:
semi_inv_cluster = []
semi_inv_cluster.append([breakpoint_1_in_read, breakpoint_2_in_read, read_id, strand])
else:
semi_inv_cluster.append([breakpoint_1_in_read, breakpoint_2_in_read, read_id, strand])

if len(semi_inv_cluster) >= read_count:
if semi_inv_cluster[-1][0] == semi_inv_cluster[-1][1] == 0:
Expand Down
6 changes: 5 additions & 1 deletion src/cuteSV/cuteSV_resolveTRA.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ def resolution_TRA(path, chr_1, chr_2, read_count, overlap_size, max_cluster_bia
semi_tra_cluster = []
semi_tra_cluster.append([pos_1, pos_2, read_id, BND_type])
else:
semi_tra_cluster.append([pos_1, pos_2, read_id, BND_type])
if semi_tra_cluster[-1][0] == semi_tra_cluster[-1][1] == 0:
semi_tra_cluster = []
semi_tra_cluster.append([pos_1, pos_2, read_id, BND_type])
else:
semi_tra_cluster.append([pos_1, pos_2, read_id, BND_type])

if len(semi_tra_cluster) >= read_count:
if semi_tra_cluster[-1][0] == semi_tra_cluster[-1][1] == 0:
Expand Down

0 comments on commit e2786bc

Please sign in to comment.