Package pal.tree

Class MutationRateModelTree

All Implemented Interfaces:
Serializable, OrthogonalHints, IdGroup, Parameterized, Units, UnitsProvider, ParameterizedTree, Tree

public class MutationRateModelTree extends ParameterizedTree.ParameterizedTreeBase implements OrthogonalHints, ParameterizedTree
Provides parameter interface to any clock-like tree with serially sampled tips (parameters are the minimal node height differences at each internal node). Any mutation rate model can be used.

Version:
$Id: MutationRateModelTree.java,v 1.19 2003/06/04 03:17:52 matt Exp $
Author:
Alexei Drummond
See Also:
  • Constructor Details

    • MutationRateModelTree

      public MutationRateModelTree(Tree t, TimeOrderCharacterData tocd, MutationRateModel model)
      take any tree and afford it with an interface suitable for a clock-like tree (parameters are the minimal node height differences at each internal node). Includes model parameters as parameters of tree

      This parameterisation of a clock-tree, ensuring that all parameters are independent of each other is due to Andrew Rambaut (personal communication).

    • MutationRateModelTree

      public MutationRateModelTree(Tree t, TimeOrderCharacterData tocd, MutationRateModel model, boolean includeModelParameters)
      take any tree and afford it with an interface suitable for a clock-like tree (parameters are the minimal node height differences at each internal node).

      This parameterisation of a clock-tree, ensuring that all parameters are independent of each other is due to Andrew Rambaut (personal communication).

    • MutationRateModelTree

      protected MutationRateModelTree(MutationRateModelTree toCopy)
      Cloning constructor
  • Method Details

    • setMaxRelativeHeight

      public void setMaxRelativeHeight(double value)
      Sets the maximum distance between ancestor and latest descendant.
    • getNumParameters

      public int getNumParameters()
      Description copied from interface: Parameterized
      get number of parameters
      Specified by:
      getNumParameters in interface Parameterized
      Returns:
      number of parameters
    • setParameter

      public void setParameter(double param, int n)
      Description copied from interface: Parameterized
      set model parameter
      Specified by:
      setParameter in interface Parameterized
      Parameters:
      param - parameter value
      n - parameter number
    • getParameter

      public double getParameter(int n)
      Description copied from interface: Parameterized
      get model parameter
      Specified by:
      getParameter in interface Parameterized
      Parameters:
      n - parameter number
      Returns:
      parameter value
    • getLowerLimit

      public double getLowerLimit(int n)
      Returns lower limit of parameter estimate.
      Specified by:
      getLowerLimit in interface Parameterized
      Parameters:
      n - parameter number
      Returns:
      lower bound
    • getDefaultValue

      public double getDefaultValue(int n)
      Description copied from interface: Parameterized
      get default value of parameter
      Specified by:
      getDefaultValue in interface Parameterized
      Parameters:
      n - parameter number
      Returns:
      default value
    • setParameterSE

      public void setParameterSE(double paramSE, int n)
      Description copied from interface: Parameterized
      set standard errors for model parameter
      Specified by:
      setParameterSE in interface Parameterized
      Parameters:
      paramSE - standard error of parameter value
      n - parameter number
    • getUpperLimit

      public double getUpperLimit(int n)
      Description copied from interface: Parameterized
      get upper parameter limit
      Specified by:
      getUpperLimit in interface Parameterized
      Parameters:
      n - parameter number
      Returns:
      upper bound
    • getParameterizationInfo

      public String getParameterizationInfo()
      Specified by:
      getParameterizationInfo in interface ParameterizedTree
    • getMutationRateModel

      public MutationRateModel getMutationRateModel()
      returns mu
    • parameters2Heights

      protected void parameters2Heights()
    • heights2parameters

      protected void heights2parameters()
    • setLnL

      public void setLnL(double lnL)
    • getLnL

      public double getLnL()
    • getOrthogonalHints

      public OrthogonalHints getOrthogonalHints()
      Specified by:
      getOrthogonalHints in interface ParameterizedTree
      Overrides:
      getOrthogonalHints in class ParameterizedTree.ParameterizedTreeBase
      Returns:
      null by default (implying not hint information)
    • getSuggestedOrdering

      public OrderEnumerator getSuggestedOrdering(OrderEnumerator defaultOrdering)
      Description copied from interface: OrthogonalHints
      If there is a "best" ordering to use it can be specified here, if not should return null
      Specified by:
      getSuggestedOrdering in interface OrthogonalHints
      Parameters:
      defaultOrdering - The ordering suggested by the optimiser, may be null!
      Returns:
      null, or default ordering if no known best ordering
    • getInternalParameterBoundaries

      public int getInternalParameterBoundaries(int parameter, double[] storage)
      Description copied from interface: OrthogonalHints
      A boundary is a value of a parameter for which values lower than the boundary and values higher than the boundary are better treated as two separate functions (IE, they are only piecewise connected), and minimisation should be performed over both ranges individually (and then the true minimum taken as the minimuma of the ranges)
      Specified by:
      getInternalParameterBoundaries in interface OrthogonalHints
      Returns:
      the number of boundary locations stored in storage, or -1 if not enough room, or 0 if there are no boundaries (other than the normal parameter range)
    • getCopy

      public Tree getCopy()
      Description copied from class: ParameterizedTree.ParameterizedTreeBase
      The cheapy copy that just creates a SimpleTree
      Specified by:
      getCopy in interface Tree
      Overrides:
      getCopy in class ParameterizedTree.ParameterizedTreeBase
      Returns:
      a clone of this tree
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • getParameterizedTreeFactory

      public static final ParameterizedTree.Factory getParameterizedTreeFactory(MutationRateModel.Factory rateModel, TimeOrderCharacterData tocd)
      Obtain a ParameterizedTree.Factory for generating Unconstrained trees