Skip to content

Commit

Permalink
fix ambiguous basepair bug.Thanks to Qiaoping Yuan
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadbakhtiari committed Mar 24, 2019
1 parent 667c2d0 commit 962232b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions advntr/vntr_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,9 @@ def get_hash(string):
continue
window_hash = None
for i in range(0, len(sequence) - keyword_size):
if sequence[i].upper() == 'N' or sequence[i - 1 + keyword_size].upper() == 'N':
if sequence[i].upper() not in 'ACTG' or sequence[i - 1 + keyword_size].upper() not in 'ACTG':
continue
if window_hash is None or sequence[i - 1].upper() == 'N':
if window_hash is None or sequence[i - 1].upper() not in 'ACTG':
if 'N' in sequence[i:i + keyword_size].upper():
window_hash = None
continue
Expand Down

0 comments on commit 962232b

Please sign in to comment.