Skip to content

Structured Tree Likelihood

Igor Siveroni edited this page Jul 27, 2017 · 51 revisions

The Structured Tree Likelihood component

The STreeLikelihoodODE class computes the log-likelihood of a genealogy given a population model. The STreeLikelihoodODE component takes as input a structured tree set of intervals and an instantiation of a PopModelODE. A typical STreeLikelihoodODE entry looks like this:

<distribution spec='STreeLikelihoodODE' id = 'stlikelihood'
      useStateName='true' popmodel='@sirmodel'             	 
      solvePL='true' method='classicrk' stepSize='0.01'>                
      <treeIntervals spec="STreeIntervals" tree='@tree'> </treeIntervals>                
</distribution>

where @popmodel is reference to a PopModelODE element and '@tree' is a reference to a Tree element.

It is important to take into consideration the following:

  • How do we introduce population structure?
  • How do we time the tree?
  • Equation types and ODE solvers.

Population Structure

Population structure is introduced by mapping tip nodes to deme names. This can be done by annotating the corresponding tree taxa ids with deme information or by introducing an extra type trait. With the former, taxa ids must be suffixed with an underscore followed by the deme information. For example, a tree tip annotated with taxon

  "EBOV|G4973.1|KR105286|SLE|x|2014-08-12_I"  

will be associated to deme I. Deme names must correspond to demes defined in the population model used as input. If the flag useStateName is set to False, deme indices are used instead i.e. the order (starting from zero) in which they appear in the model. The default is useStateName='True'.

Deme information can also be introduced by adding a type trait, that is, a separate trait defined for the same taxon set mapping taxa to deme information: deme names or indices, depending on the value of the useStateName flag. This is done by including a typeTrait parameter.

Tree Dating

Date information can be introduced via a Date trait or by extracting time information from the population model (trajectory parameters). The following must be taken into consideration:

  • If the tree has a Date trait then the date (time) information associated with the trait is used.
  • If no Date Trait is found, then

Clone this wiki locally