Package pal.mep
Class WindowedMutationRate
java.lang.Object
pal.mep.MutationRateModel
pal.mep.WindowedMutationRate
- All Implemented Interfaces:
Serializable
,Cloneable
,Parameterized
,Report
,Summarizable
,Units
public class WindowedMutationRate
extends MutationRateModel
implements Report, Summarizable, Parameterized, Serializable
This class models a windowed mutation rate
(parameter: mu = mutation rate).
- Version:
- $Id: WindowedMutationRate.java,v 1.8 2004/08/02 05:22:04 matt Exp $
- Author:
- Alexei Drummond
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class pal.mep.MutationRateModel
MutationRateModel.Factory
Nested classes/interfaces inherited from interface pal.misc.Parameterized
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils
-
Field Summary
Fields inherited from class pal.mep.MutationRateModel
fo
Fields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS
-
Constructor Summary
ConstructorsModifierConstructorDescriptionWindowedMutationRate
(double muWindow, double muBackground, double windowCenter, double windowWidth, int units, boolean fixedb, double maximumMutationRate) Construct mutation rate model of a give rate in given units.WindowedMutationRate
(double muWindow, double muBackground, double windowCenter, double windowWidth, int units, double maximumMutationRate) Construct mutation rate model of a give rate in given units.WindowedMutationRate
(double muBackground, double windowCenter, double windowWidth, int units, double maximumMutationRate) Construct mutation rate model of a give rate in given units.WindowedMutationRate
(double windowCenter, double windowWidth, int units, double maximumMutationRate) Construct mutation model with default settingsprotected
-
Method Summary
Modifier and TypeMethodDescriptionclone()
getCopy()
double
getDefaultValue
(int k) get default value of parameterfinal double
getEndTime
(double expectedSubs, double startTime) Window must not span zero!final double
getExpectedSubstitutions
(double time) Window must not span zero!static final MutationRateModel.Factory
getFactory
(double muWindow, double muBackground, double windowCenter, double windowWidth, int units, double maximumMutationRate) Generate a MutationRateModel.Factory class for a WindowedMutationRatedouble
getLowerLimit
(int k) get lower parameter limitdouble
getMu()
returns current day mutation rate.final double
getMutationRate
(double t) Gets the mutation rate, value of mu(t) at time t.int
get number of parametersdouble
getParameter
(int k) get model parameterString[]
double
getSummaryValue
(int summaryType) double
getUpperLimit
(int k) get upper parameter limitvoid
report
(PrintWriter out) print human readable report (e.g., on parameters and associated model)final void
scale
(double scale) Linearly scales this mutation rate model.void
setParameter
(double value, int k) set model parametervoid
setParameterSE
(double value, int k) set standard errors for model parametertoString()
Methods inherited from class pal.mep.MutationRateModel
getExpectedSubstitutions, getMaximumMutationRate, getOrthogonalHints, getTime, getUnits, scale, setUnits
-
Constructor Details
-
WindowedMutationRate
-
WindowedMutationRate
public WindowedMutationRate(double windowCenter, double windowWidth, int units, double maximumMutationRate) Construct mutation model with default settings -
WindowedMutationRate
public WindowedMutationRate(double muBackground, double windowCenter, double windowWidth, int units, double maximumMutationRate) Construct mutation rate model of a give rate in given units. -
WindowedMutationRate
public WindowedMutationRate(double muWindow, double muBackground, double windowCenter, double windowWidth, int units, boolean fixedb, double maximumMutationRate) Construct mutation rate model of a give rate in given units. -
WindowedMutationRate
public WindowedMutationRate(double muWindow, double muBackground, double windowCenter, double windowWidth, int units, double maximumMutationRate) Construct mutation rate model of a give rate in given units.
-
-
Method Details
-
clone
- Specified by:
clone
in classMutationRateModel
-
getCopy
- Specified by:
getCopy
in classMutationRateModel
-
getSummaryTypes
- Specified by:
getSummaryTypes
in interfaceSummarizable
-
getSummaryValue
public double getSummaryValue(int summaryType) - Specified by:
getSummaryValue
in interfaceSummarizable
-
getMu
public double getMu()returns current day mutation rate. -
getMutationRate
public final double getMutationRate(double t) Description copied from class:MutationRateModel
Gets the mutation rate, value of mu(t) at time t.- Specified by:
getMutationRate
in classMutationRateModel
-
getExpectedSubstitutions
public final double getExpectedSubstitutions(double time) Window must not span zero!- Specified by:
getExpectedSubstitutions
in classMutationRateModel
-
getEndTime
public final double getEndTime(double expectedSubs, double startTime) Window must not span zero!- Specified by:
getEndTime
in classMutationRateModel
-
scale
public final void scale(double scale) Linearly scales this mutation rate model.- Specified by:
scale
in classMutationRateModel
- Parameters:
scale
- getExpectedSubstitutions should return scale instead of 1.0 at time t.
-
getNumParameters
public int getNumParameters()Description copied from interface:Parameterized
get number of parameters- Specified by:
getNumParameters
in interfaceParameterized
- Returns:
- number of parameters
-
getParameter
public double getParameter(int k) Description copied from interface:Parameterized
get model parameter- Specified by:
getParameter
in interfaceParameterized
- Parameters:
k
- parameter number- Returns:
- parameter value
-
getUpperLimit
public double getUpperLimit(int k) Description copied from interface:Parameterized
get upper parameter limit- Specified by:
getUpperLimit
in interfaceParameterized
- Parameters:
k
- parameter number- Returns:
- upper bound
-
getLowerLimit
public double getLowerLimit(int k) Description copied from interface:Parameterized
get lower parameter limit- Specified by:
getLowerLimit
in interfaceParameterized
- Parameters:
k
- parameter number- Returns:
- lower bound
-
getDefaultValue
public double getDefaultValue(int k) Description copied from interface:Parameterized
get default value of parameter- Specified by:
getDefaultValue
in interfaceParameterized
- Parameters:
k
- parameter number- Returns:
- default value
-
setParameter
public void setParameter(double value, int k) Description copied from interface:Parameterized
set model parameter- Specified by:
setParameter
in interfaceParameterized
- Parameters:
value
- parameter valuek
- parameter number
-
setParameterSE
public void setParameterSE(double value, int k) Description copied from interface:Parameterized
set standard errors for model parameter- Specified by:
setParameterSE
in interfaceParameterized
- Parameters:
value
- standard error of parameter valuek
- parameter number
-
toString
-
report
Description copied from interface:Report
print human readable report (e.g., on parameters and associated model) -
toSingleLine
- Specified by:
toSingleLine
in classMutationRateModel
-
generateFactory
- Specified by:
generateFactory
in classMutationRateModel
-
getFactory
public static final MutationRateModel.Factory getFactory(double muWindow, double muBackground, double windowCenter, double windowWidth, int units, double maximumMutationRate) Generate a MutationRateModel.Factory class for a WindowedMutationRate
-