Package pal.mep
Class MutationRateModel
java.lang.Object
pal.mep.MutationRateModel
- All Implemented Interfaces:
Serializable
,Cloneable
,Parameterized
,Report
,Summarizable
,Units
- Direct Known Subclasses:
ConstantMutationRate
,SteppedMutationRate
,WindowedMutationRate
public abstract class MutationRateModel
extends Object
implements Units, Parameterized, Report, Cloneable, Serializable, Summarizable
This abstract class contains methods that are of general use for
modelling mutation rate changes over time.
- Version:
- $Id: MutationRateModel.java,v 1.12 2004/08/02 05:22:04 matt Exp $
- Author:
- Alexei Drummond
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
An interface for objects which generate fresh MutationRAteModelsNested classes/interfaces inherited from interface pal.misc.Parameterized
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils
-
Field Summary
FieldsFields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MutationRateModel
(int units, double maximumMutationRate) protected
MutationRateModel
(MutationRateModel toCopy) -
Method Summary
Modifier and TypeMethodDescriptionabstract Object
clone()
abstract MutationRateModel.Factory
abstract MutationRateModel
getCopy()
abstract double
getEndTime
(double expectedSubs, double startTime) Return the end time at which expected substitutions has occurred, given we start at start timeabstract double
getExpectedSubstitutions
(double t) Returns integral of mutation rate function (= integral mu(x) dx from 0 to t).double
getExpectedSubstitutions
(double start, double finish) Calculates the integral 1/mu(x) dx between start and finish.protected final double
abstract double
getMutationRate
(double t) Gets the mutation rate, value of mu(t) at time t.Overide if there is any orthogonal hint information availabledouble
getTime
(double expectedSubs) Return the time at which expected substitutions has occurred.int
getUnits()
returns units of measurement.abstract void
scale
(double scale) Linearly scales this mutation rate model.scale
(TimeOrderCharacterData toScale) final void
setUnits
(int u, double maximumMutationRate) sets units of measurement.abstract String
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface pal.misc.Parameterized
getDefaultValue, getLowerLimit, getNumParameters, getParameter, getUpperLimit, setParameter, setParameterSE
Methods inherited from interface pal.misc.Summarizable
getSummaryTypes, getSummaryValue
-
Field Details
-
fo
-
-
Constructor Details
-
MutationRateModel
protected MutationRateModel(int units, double maximumMutationRate) -
MutationRateModel
-
-
Method Details
-
clone
-
getCopy
-
getMutationRate
public abstract double getMutationRate(double t) Gets the mutation rate, value of mu(t) at time t. -
getExpectedSubstitutions
public abstract double getExpectedSubstitutions(double t) Returns integral of mutation rate function (= integral mu(x) dx from 0 to t). -
getTime
public double getTime(double expectedSubs) Return the time at which expected substitutions has occurred. -
getEndTime
public abstract double getEndTime(double expectedSubs, double startTime) Return the end time at which expected substitutions has occurred, given we start at start time -
scale
public abstract void scale(double scale) Linearly scales this mutation rate model.- Parameters:
scale
- getExpectedSubstitutions should return scale instead of 1.0 at time t.
-
getExpectedSubstitutions
public double getExpectedSubstitutions(double start, double finish) Calculates the integral 1/mu(x) dx between start and finish. -
scale
- Returns:
- a TimeOrderCharacterData scaled to use EXPECTED_SUBSTITUTIONS based on this MutationRateModel
- Throws:
IllegalArgumentException
- if units of this Model doenot match the units of the TimeOrderCharacterData object (toScale).
-
setUnits
public final void setUnits(int u, double maximumMutationRate) sets units of measurement.- Parameters:
u
- unitsthe
- maximumMutationRate that is allowable, given the units. This needs to be given intelligently.- Throws:
IllegalArgumentException
- if units are ExpectedSubstitutions
-
getMaximumMutationRate
protected final double getMaximumMutationRate()- Returns:
- the maximum mutation rate as indicated by the user
-
getUnits
public int getUnits()returns units of measurement. -
getOrthogonalHints
Overide if there is any orthogonal hint information available- Returns:
- null
-
toSingleLine
-
generateFactory
-