tracts.hybrid_pedigree#

This module implements the hybrid pedigree model for tract length distributions. It computes a mixture of Phase-Type distributions, each describing the tract length distribution conditioned on a pedigree structure. Dioecious admixture is considered on a finite chromosome.

See Appendix E of the manuscript for details on the model and the implementation.

Functions

HP_loglik(mig_matrix_f, mig_matrix_m, rr_f, ...)

Calculates the maximum-likelihood in a Poisson Random Field.

HP_tract_length_histogram_multi_windowed(...)

Calculates the tract length histogram on multiple chromosomes of lengths chrom_lengths.

all_possible_trees_as_arrays(T, N[, mig_at_last])

density_hybrid_pedigree(which_migration, ...)

generate_trees(current_gen, max_gen, N[, ...])

get_pedigree(T)

hybrid_pedigree_distribution(mig_matrix_f, ...)

This function computes the tract length distribution as a Phase-Type density or histogram on a finite chromosome of length L, using the Hybrid-Pedigree model.

prob_of_pop_setting(ms, ...)

tree_to_array(tree, max_nodes)

Convert a tree to its array representation.