get_joint_prob_mat module¶
- itrails.get_joint_prob_mat.get_joint_prob_mat(t_A, t_B, t_AB, t_C, rho_A, rho_B, rho_AB, rho_C, rho_ABC, coal_A, coal_B, coal_AB, coal_C, coal_ABC, n_int_AB, n_int_ABC, cut_AB, cut_ABC)[source]¶
Compute the joint probability matrix via sequential Markov chain steps and state combination.
This function calculates the joint probability matrix for a system involving three sets of species (or speciation events) using input parameters for time, recombination rates, and coalescent rates. It constructs individual transition matrices for separate species or combined states, then sequentially simulates the Markov chain process for species pairs (AB) and the combined species (ABC) to produce the final joint probability matrix.
- Parameters:
t_A (float) – Time (in coalescent units) for species A.
t_B (float) – Time (in coalescent units) for species B.
t_AB (float) – Time (in coalescent units) between speciation events for species A and B.
t_C (float) – Time (in coalescent units) for species C.
rho_A (float) – Recombination rate for species A.
rho_B (float) – Recombination rate for species B.
rho_AB (float) – Recombination rate for the combined species A and B.
rho_C (float) – Recombination rate for species C.
rho_ABC (float) – Recombination rate for the combined species A, B, and C.
coal_A (float) – Coalescent rate for species A.
coal_B (float) – Coalescent rate for species B.
coal_AB (float) – Coalescent rate for the combined species A and B.
coal_C (float) – Coalescent rate for species C.
coal_ABC (float) – Coalescent rate for the combined species A, B, and C.
n_int_AB (int) – Number of discretized time intervals for the A-B process.
n_int_ABC (int) – Number of discretized time intervals for the A-B-C process.
cut_AB (Array-like) – Cutpoints in the A-B process.
cut_ABC (Array-like) – Cutpoints in the A-B-C process.
- Returns:
A numba typed dictionary mapping state tuples to numpy arrays containing the joint probability matrices computed via the Markov chain process.
- Return type:
dict