Package pal.tree
Class MutationRateModelTree
- java.lang.Object
-
- pal.tree.ParameterizedTree.ParameterizedTreeBase
-
- pal.tree.MutationRateModelTree
-
- All Implemented Interfaces:
java.io.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:
MutationRateModel
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface pal.misc.IdGroup
IdGroup.Utils
-
Nested classes/interfaces inherited from interface pal.math.OrthogonalHints
OrthogonalHints.Utils
-
Nested classes/interfaces inherited from interface pal.misc.Parameterized
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils
-
Nested classes/interfaces inherited from interface pal.tree.ParameterizedTree
ParameterizedTree.Factory, ParameterizedTree.ParameterizedTreeBase
-
Nested classes/interfaces inherited from interface pal.tree.Tree
Tree.TreeBase
-
-
Field Summary
-
Fields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MutationRateModelTree(MutationRateModelTree toCopy)
Cloning constructorMutationRateModelTree(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).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).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Tree
getCopy()
The cheapy copy that just creates a SimpleTreedouble
getDefaultValue(int n)
get default value of parameterint
getInternalParameterBoundaries(int parameter, double[] storage)
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)double
getLnL()
double
getLowerLimit(int n)
Returns lower limit of parameter estimate.MutationRateModel
getMutationRateModel()
returns muint
getNumParameters()
get number of parametersOrthogonalHints
getOrthogonalHints()
double
getParameter(int n)
get model parameterjava.lang.String
getParameterizationInfo()
static ParameterizedTree.Factory
getParameterizedTreeFactory(MutationRateModel.Factory rateModel, TimeOrderCharacterData tocd)
Obtain a ParameterizedTree.Factory for generating Unconstrained treesOrderEnumerator
getSuggestedOrdering(OrderEnumerator defaultOrdering)
If there is a "best" ordering to use it can be specified here, if not should return nulldouble
getUpperLimit(int n)
get upper parameter limitprotected void
heights2parameters()
protected void
parameters2Heights()
void
setLnL(double lnL)
void
setMaxRelativeHeight(double value)
Sets the maximum distance between ancestor and latest descendant.void
setParameter(double param, int n)
set model parametervoid
setParameterSE(double paramSE, int n)
set standard errors for model parameter-
Methods inherited from class pal.tree.ParameterizedTree.ParameterizedTreeBase
createNodeList, getAttribute, getBaseTree, getExternalNode, getExternalNodeCount, getIdCount, getIdentifier, getInternalNode, getInternalNodeCount, getNodeCount, getRoot, getUnits, setAttribute, setBaseTree, setIdentifier, setRoot, toString, whichIdNumber
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pal.misc.IdGroup
getIdCount, getIdentifier, setIdentifier, whichIdNumber
-
Methods inherited from interface pal.tree.Tree
createNodeList, getAttribute, getExternalNode, getExternalNodeCount, getInternalNode, getInternalNodeCount, getRoot, getUnits, setAttribute, setRoot
-
-
-
-
Constructor Detail
-
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 treeThis 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 Detail
-
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 interfaceParameterized
- Returns:
- number of parameters
-
setParameter
public void setParameter(double param, int n)
Description copied from interface:Parameterized
set model parameter- Specified by:
setParameter
in interfaceParameterized
- Parameters:
param
- parameter valuen
- parameter number
-
getParameter
public double getParameter(int n)
Description copied from interface:Parameterized
get model parameter- Specified by:
getParameter
in interfaceParameterized
- Parameters:
n
- parameter number- Returns:
- parameter value
-
getLowerLimit
public double getLowerLimit(int n)
Returns lower limit of parameter estimate.- Specified by:
getLowerLimit
in interfaceParameterized
- 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 interfaceParameterized
- 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 interfaceParameterized
- Parameters:
paramSE
- standard error of parameter valuen
- parameter number
-
getUpperLimit
public double getUpperLimit(int n)
Description copied from interface:Parameterized
get upper parameter limit- Specified by:
getUpperLimit
in interfaceParameterized
- Parameters:
n
- parameter number- Returns:
- upper bound
-
getParameterizationInfo
public java.lang.String getParameterizationInfo()
- Specified by:
getParameterizationInfo
in interfaceParameterizedTree
-
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 interfaceParameterizedTree
- Overrides:
getOrthogonalHints
in classParameterizedTree.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 interfaceOrthogonalHints
- 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 interfaceOrthogonalHints
- 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 interfaceTree
- Overrides:
getCopy
in classParameterizedTree.ParameterizedTreeBase
- Returns:
- a clone of this tree
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
-
getParameterizedTreeFactory
public static final ParameterizedTree.Factory getParameterizedTreeFactory(MutationRateModel.Factory rateModel, TimeOrderCharacterData tocd)
Obtain a ParameterizedTree.Factory for generating Unconstrained trees
-
-