A phylogenetic tree model on tree $T$ has outcomes that are described by assigning each leaf of the tree any label from a particular set (typically the label set is the set of DNA bases, \{A,T,C,G\}). The probability of a certain assignment of labels depends on transition probabilities between each ordered pair of labels. These transition probabilities are the parameters of the model.
In a group based model, the label set is a group $G$ (typically $\mathbb{Z}/2$ or $(\mathbb{Z}/2)^2$), and the transition probability for a pair $(g,h)$ depends only on $h-g$. This reduces the number of parameters from $|G|^2$ to $|G|$. Depending on the model, further identifications of parameters are imposed.
An object of class Model stores the information about a group-based model required to compute phylogenetic invariants. This information includes the elements of the group, how those elements are partitioned, and a set of automorphisms of the group that preserve the partitions.
There are four built-in models: Cavender-Farris-Neyman or binary model (CFNmodel); Jukes-Cantor model (JCmodel); Kimura 2-parameter model (K2Pmodel); and Kimura 3-parameter model (K3Pmodel). Other models can be constructed with model.
i1 : M = CFNmodel o1 = Model{AList => HashTable{0 => {1, 0}}} 1 => {0, 1} Automorphisms => HashTable{} Buckets => {{0}, {1}} Group => {0, 1} o1 : Model |
i2 : T = leafTree(3,{}) o2 = {{0, 1, 2}, {set {0}, set {1}, set {2}}} o2 : LeafTree |
i3 : phyloToricAMatrix(T,M) o3 = | 1 1 0 0 | | 0 0 1 1 | | 1 0 1 0 | | 0 1 0 1 | | 1 0 0 1 | | 0 1 1 0 | 6 4 o3 : Matrix ZZ <--- ZZ |