Phase-type models#

tracts.phase_type.base_phase_type

Defines PhaseTypeDistribution, the abstract base class for computing tract length densities and histograms from migration matrices under a phase-type Markov approximation.

tracts.phase_type.monoecious

Defines PhTMonoecious, the PhaseTypeDistribution subclass implementing the Monoecious Markov approximation (unbiased migration and recombination rates).

tracts.phase_type.dioecious

Defines PhTDioecious, the PhaseTypeDistribution subclass implementing the Dioecious Fine (DF) and Dioecious Coarse (DC) Markov approximations (independent male/female migration and recombination rates, including on the X chromosome).

tracts.phase_type.hybrid_pedigree

Hybrid-pedigree refinements (H-DC, H-DF) of the Dioecious phase-type approximations: enumerates the possible migration settings over a fixed-depth pedigree and averages PhTDioecious predictions over them, weighted by their probability under the model.

tracts.phase_type.plot

Plotting helpers for Phase-Type tract length densities and histograms.