Skip to content

Commit

Permalink
Merge pull request #6 from erinyoung/erin-dev
Browse files Browse the repository at this point in the history
Adjusted check after addition/subtraction
  • Loading branch information
erinyoung authored Aug 15, 2022
2 parents 5205d45 + 64fa7d8 commit 86ee772
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bin/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,24 @@
match_start = int(end2) + int(end_diff)
match_end = int(start2) - int(start_diff)

if str(match_start) not in divided[chr2].keys():
for potential_start in divided[chr2].keys():
if (int(potential_start) - 20) <= match_start <= (int(potential_start) + 20):
match_start=int(potential_start)

# sometimes there are small indels
if str(match_start) in divided[chr2].keys():
if int(divided[chr2][str(match_start)]) != int(match_end):
match_end=int(divided[chr2][str(match_start)])

saved_line2= chr2 + ":" + str(match_start) + ":" + str(match_end)
new_group = True

for numbers in group.keys():
if saved_line in group[numbers]['list']:
new_group = False
if (saved_line2 not in group[numbers]['list']) and (start2 in divided[chr2].keys()):
group[numbers]['list'].append(saved_line2)
group[numbers]['list'].append(saved_line2)
elif saved_line2 in group[numbers]['list']:
new_group = False
if saved_line not in group[numbers]['list']:
Expand Down

0 comments on commit 86ee772

Please sign in to comment.