Skip to content

Commit

Permalink
Check mu
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Jul 2, 2024
1 parent 46551e1 commit d90badc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lshmm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ def get_emission_matrix_haploid_hkylike(mu, kappa=None):
:param float mu: Probability of mutation to any allele.
:param float kappa: Transition-to-transversion rate ratio.
"""
if mu < 0.0 or mu > 1.0:
raise ValueError("Probability of mutation must be in [0, 1].")
if kappa is not None:
if kappa <= 0:
raise ValueError("Transition-to-transversion rate ratio must be positive.")
Expand Down

0 comments on commit d90badc

Please sign in to comment.