next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
PhylogeneticTrees :: Model

Model -- A group-based model

Description

A phylogenetic tree model on tree T has outcomes which 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 mathbbZ/2 or (ℤ/2)2), and the transition probability for pair (g,h) depends only on h-g. This reduces the number of parameters from |G|2 to |G|. Depending on the model, some of the parameters for different group elements are identified to further restrict the model.

An object of class Model stores the necessary information about a group-based model required to compute phylogenetic invariants. This information includes the elements of the group, how those elements are paritioned, and a set of automorphisms of the group that preserve the partitions.

There are four built in models which are 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{}
           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

See also

Methods that use an object of class Model :

Fixed objects of class Model :

For the programmer

The object Model is a type, with ancestor classes HashTable < Thing.