Reconstructing ancestral states

This app takes a model_result and returns a tabular_result consisting of the posterior probabilities of ancestral states for each node of a tree. These probabilities are computed using the marginal reconstruction algorithm.

We first fit a model to the sample data.

Define the ancestral_states app

The tabular_result is keyed by the node name. Each value is a DictArray, with header corresponding to the states and rows corresponding to alignment position.

If not included in the newick tree file, the internal node names are automatically generated open loading. You can establish what those are by interrogating the tree bound to the likelihood function object. (If you move your mouse cursor over the nodes, their names will appear as hover text.)