Skip to content

Commit 49b2c1f

Browse files
committed
Fix off-by-one bug in enforce_triplets
1 parent 8d48378 commit 49b2c1f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

buddysuite/AlignBuddy.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -747,15 +747,14 @@ def enforce_triplets(alignbuddy):
747747
position += 1
748748
else:
749749
position = 1
750-
check_end_gaps = 0
751750
back_indx = -1
752751
while output[back_indx] in ["-", None]:
753-
check_end_gaps += 1 if output[back_indx] == "-" else 0
754752
back_indx -= 1
753+
back_indx += 1
755754
for res in held_residues:
756755
output[back_indx] = res
757756
back_indx += 1
758-
back_indx += 1
757+
759758
for i in range(back_indx * -1):
760759
output[back_indx] = "-"
761760
back_indx += 1

0 commit comments

Comments
 (0)