Skip to content

Commit

Permalink
bugfix (biopython#4914)
Browse files Browse the repository at this point in the history
Co-authored-by: Michiel Jan Laurens de Hoon <mdehoon@Michiels-MacBook-Air.local>
  • Loading branch information
mdehoon and Michiel Jan Laurens de Hoon authored Jan 16, 2025
1 parent eef8c08 commit 29c931b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Bio/Align/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3580,7 +3580,9 @@ def counts(self):
# Don't count seq1 vs seq2 and seq2 vs seq1
break
for a, b in zip(seq1, seq2):
if a == "-" or b == "-":
if a == "-" and b == "-":
pass
elif a == "-" or b == "-":
gaps += 1
elif a == b:
identities += 1
Expand Down
2 changes: 1 addition & 1 deletion Doc/Tutorial/chapter_align.rst
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ customized.
0 AGGTTT-- 6
<BLANKLINE>
>>> alignment.counts()
AlignmentCounts(gaps=8, identities=14, mismatches=2)
AlignmentCounts(gaps=6, identities=14, mismatches=2)
Letter frequencies
~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit 29c931b

Please sign in to comment.