Coalescent models#
Coalescent models for simulating genealogies. Besides the standard Kingman coalescent, this module implements the beta coalescent and Dirac coalescent models.
- class StandardCoalescent[source]#
Bases:
CoalescentModelStandard (Kingman) coalescent model. Refer to the Msprime docs for more information.
- class BetaCoalescent(alpha: float, scale_time: bool = True)[source]#
Bases:
MultipleMergerCoalescentBeta coalescent model. Refer to the Msprime docs for more information.
- __init__(alpha: float, scale_time: bool = True)[source]#
Initialize the beta coalescent model.
- Parameters:
alpha (
float) – The alpha parameter of the beta coalescent model.scale_time (
bool) – Whether to scale coalescence time as described in Msprime docs. IfFalse, the timescale is set to N.
-
scale_time:
bool# Whether to scale coalescence time.
-
alpha:
float# The alpha parameter of the beta coalescent model.
- class DiracCoalescent(psi: float, c: float, scale_time: bool = True)[source]#
Bases:
MultipleMergerCoalescentDirac coalescent model. Refer to the Msprime docs for more information.
- __init__(psi: float, c: float, scale_time: bool = True)[source]#
Initialize the Dirac coalescent model.
- Parameters:
psi (
float) – The fraction of the population replaced by offspring in one large reproduction event.c (
float) – The rate of potential multiple merger events.scale_time (
bool) – Whether to scale coalescence time as described in Msprime docs. If False, the timescale is set to N.
-
psi:
float# The fraction of the population replaced by offspring in one large reproduction event.
-
c:
float# The rate of potential multiple merger events.
-
scale_time:
bool# Whether to scale coalescence time.