Ancestors
Class AncestralMarginal

java.lang.Object
  extended by Ancestors.AncestralMarginal

public class AncestralMarginal
extends java.lang.Object

Class to perform marginal reconstruction of internal nodes. Uses the principles of Yang, Kurma and Nei 1995.

Version:
1.0

Nested Class Summary
 class AncestralMarginal.Result
          Class to store the results of a marginal ancestral reconstruction
 class AncestralMarginal.SiteResult
          Class to store the results of a marginal ancestral reconstruction for a single site
 
Constructor Summary
AncestralMarginal(Model m, Alignment a, Tree t)
          Creates an object to calculate an ancestral reconstruction for a given model, alignment and tree
AncestralMarginal(Model m, Alignment a, Tree t, Constrainer con)
          Creates an object to calculate an ancestral reconstruction for a given model, alignment, tree and constraints
 
Method Summary
 AncestralMarginal.Result calculate(Parameters params)
          Calculates the reconstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AncestralMarginal

public AncestralMarginal(Model m,
                         Alignment a,
                         Tree t)
Creates an object to calculate an ancestral reconstruction for a given model, alignment and tree

Parameters:
m - The model
a - The alignment
t - The tree

AncestralMarginal

public AncestralMarginal(Model m,
                         Alignment a,
                         Tree t,
                         Constrainer con)
Creates an object to calculate an ancestral reconstruction for a given model, alignment, tree and constraints

Parameters:
m - The model
a - The alignment
t - The tree
con - The constraints on the internal nodes
Method Detail

calculate

public AncestralMarginal.Result calculate(Parameters params)
                                   throws RateCategory.RateException,
                                          Model.ModelException,
                                          TreeException,
                                          Parameters.ParameterException,
                                          AlignmentException
Calculates the reconstruction

Parameters:
params - The parameters to be used in the reconstruction
Returns:
An object containing the reconstruction and the probability of each state at each node for each site
Throws:
RateCategory.RateException - Thrown if there is an issue with a rate category in the model (e.g. a badly formatted rate).
Model.ModelException - Thrown if there is a problem with the model (e.g. the rate categories differ in their states)
TreeException - Thrown if there is a problem with the tree.
Parameters.ParameterException - Thrown if there is a problem with the parameters (e.g. a requied parameter is not present)
AlignmentException - Thrown if there is a problem with the alignment