Skip to content

Commit

Permalink
Merge pull request #309 from nspope/fix-mutation-count
Browse files Browse the repository at this point in the history
Fix excess mutation count at last edge (closes #308)
  • Loading branch information
hyanwong authored Aug 20, 2023
2 parents 41c2689 + ff27b0d commit 9e17948
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tsdate/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def get_mut_edges(ts):
"""
mut_edges = np.zeros(ts.num_edges, dtype=np.int64)
for m in ts.mutations():
mut_edges[m.edge] += 1
if m.edge != tskit.NULL:
mut_edges[m.edge] += 1
return mut_edges

@staticmethod
Expand Down

0 comments on commit 9e17948

Please sign in to comment.