Tools#

This library stores code for post-reconstruction analysis of trees. We are always in the process of developing new statistics and tools for helping us interpret trees, and adding them to this library.

Autocorrelation#

tl.compute_morans_i(tree[, meta_columns, X, ...])

Computes Moran's I statistic.

Branch Length Estimation (BLE)#

tl.IIDExponentialBayesian(mutation_rate, ...)

Inference under a subsampled Birth Process with IID memoryless mutations.

tl.IIDExponentialMLE([...])

MLE under a model of IID memoryless CRISPR/Cas9 mutations.

Coupling#

tl.compute_evolutionary_coupling(tree, ...)

Computes Evolutionary Coupling of categorical variables.

Metrics#

tl.calculate_likelihood_continuous(tree[, ...])

Calculates the log likelihood of a tree under a continuous process.

tl.calculate_likelihood_discrete(tree[, ...])

Calculates the log likelihood of a tree under a discrete process.

tl.calculate_parsimony(tree[, ...])

Calculates the number of mutations that have occurred on a tree.

Parameter Estimation#

tl.estimate_missing_data_rates(tree[, ...])

Estimates both missing data parameters given one of the two from a tree.

tl.estimate_mutation_rate(tree[, ...])

Estimates the mutation rate from a tree and character matrix.

Small-Parsimony#

tl.fitch_count(cassiopeia_tree, meta_item[, ...])

Runs the FitchCount algorithm.

tl.fitch_hartigan(cassiopeia_tree, meta_item)

Run the Fitch-Hartigan algorithm.

tl.score_small_parsimony(cassiopeia_tree, ...)

Computes the small-parsimony of the tree.

Topology#

tl.compute_expansion_pvalues(tree[, ...])

Call expansion pvalues on a tree.