tracts.phase_type_distribution.PhTMonoecious#
- class PhTMonoecious(migration_matrix, rho=1)#
Bases:
PhaseTypeDistributionA subclass of PhaseTypeDistribution providing the specific Phase-Type tools for the Monoecious Markov approximation.
- migration_matrix#
The migration matrix given as input without contributions at generations 0 and 1.
- Type:
npt.ArrayLike
- num_populations#
The number of populations considered in the demographic model.
- Type:
int
- num_generations#
The number of generations considered in the demographic model.
- Type:
int
- t0_proportions#
The total contribution from each ancestral population. Corresponds to Eq. (EQ) in the manuscript.
- Type:
npt.ArrayLike
- full_transition_matrix#
The intensity matrix S^M of the Monoecious Markov Model. Corresponds to Eq. (EQ) in the manuscript.
- Type:
npt.ArrayLike
- equilibrium_distribution#
The equilibrium distribution of the Monoecious Markov Model. Corresponds to Eq. (EQ) in the manuscript.
- Type:
npt.ArrayLike
- alpha_list#
A list containing, for each ancestral population p, the initial state of the Phase-Type distribution for the tract length of population p. Correspond to Eq. (EQ) in the manuscript.
- Type:
list
- transition_matrices#
A list containing, for each ancestral population p, the submatrix of full_transition_matrix corresponding to transitions within p. It is used to compute the distribution of tract lengths from population p.
- Type:
list
- S0_list#
A list containing the sum across columns of every transition matrix in transition_matrices.
- Type:
list
- inverse_S0_list#
A list containing the sum across columns of the inverse of every transition matrix in transition_matrices.
- Type:
list
- Parameters:
migration_matrix (npt.ArrayLike) – An array containing the migration proportions from a discrete number of populations over the last generations. Each row is a time, each column is a population. Row zero corresponds to the current generation. The migration rate at the last generation (migration_matrix[-1,:]) is the “founding generation” and should sum up to 1.
rho (float, default 1) – The recombination rate (positive real number).
Notes
Non-listed attributes are for internal use only.