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.FactoryNested 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
foFields 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()doublegetDefaultValue(int k) get default value of parameterfinal doublegetEndTime(double expectedSubs, double startTime) Window must not span zero!final doublegetExpectedSubstitutions(double time) Window must not span zero!static final MutationRateModel.FactorygetFactory(double muWindow, double muBackground, double windowCenter, double windowWidth, int units, double maximumMutationRate) Generate a MutationRateModel.Factory class for a WindowedMutationRatedoublegetLowerLimit(int k) get lower parameter limitdoublegetMu()returns current day mutation rate.final doublegetMutationRate(double t) Gets the mutation rate, value of mu(t) at time t.intget number of parametersdoublegetParameter(int k) get model parameterString[]doublegetSummaryValue(int summaryType) doublegetUpperLimit(int k) get upper parameter limitvoidreport(PrintWriter out) print human readable report (e.g., on parameters and associated model)final voidscale(double scale) Linearly scales this mutation rate model.voidsetParameter(double value, int k) set model parametervoidsetParameterSE(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:
clonein classMutationRateModel
-
getCopy
- Specified by:
getCopyin classMutationRateModel
-
getSummaryTypes
- Specified by:
getSummaryTypesin interfaceSummarizable
-
getSummaryValue
public double getSummaryValue(int summaryType) - Specified by:
getSummaryValuein interfaceSummarizable
-
getMu
public double getMu()returns current day mutation rate. -
getMutationRate
public final double getMutationRate(double t) Description copied from class:MutationRateModelGets the mutation rate, value of mu(t) at time t.- Specified by:
getMutationRatein classMutationRateModel
-
getExpectedSubstitutions
public final double getExpectedSubstitutions(double time) Window must not span zero!- Specified by:
getExpectedSubstitutionsin classMutationRateModel
-
getEndTime
public final double getEndTime(double expectedSubs, double startTime) Window must not span zero!- Specified by:
getEndTimein classMutationRateModel
-
scale
public final void scale(double scale) Linearly scales this mutation rate model.- Specified by:
scalein classMutationRateModel- Parameters:
scale- getExpectedSubstitutions should return scale instead of 1.0 at time t.
-
getNumParameters
public int getNumParameters()Description copied from interface:Parameterizedget number of parameters- Specified by:
getNumParametersin interfaceParameterized- Returns:
- number of parameters
-
getParameter
public double getParameter(int k) Description copied from interface:Parameterizedget model parameter- Specified by:
getParameterin interfaceParameterized- Parameters:
k- parameter number- Returns:
- parameter value
-
getUpperLimit
public double getUpperLimit(int k) Description copied from interface:Parameterizedget upper parameter limit- Specified by:
getUpperLimitin interfaceParameterized- Parameters:
k- parameter number- Returns:
- upper bound
-
getLowerLimit
public double getLowerLimit(int k) Description copied from interface:Parameterizedget lower parameter limit- Specified by:
getLowerLimitin interfaceParameterized- Parameters:
k- parameter number- Returns:
- lower bound
-
getDefaultValue
public double getDefaultValue(int k) Description copied from interface:Parameterizedget default value of parameter- Specified by:
getDefaultValuein interfaceParameterized- Parameters:
k- parameter number- Returns:
- default value
-
setParameter
public void setParameter(double value, int k) Description copied from interface:Parameterizedset model parameter- Specified by:
setParameterin interfaceParameterized- Parameters:
value- parameter valuek- parameter number
-
setParameterSE
public void setParameterSE(double value, int k) Description copied from interface:Parameterizedset standard errors for model parameter- Specified by:
setParameterSEin interfaceParameterized- Parameters:
value- standard error of parameter valuek- parameter number
-
toString
-
report
Description copied from interface:Reportprint human readable report (e.g., on parameters and associated model) -
toSingleLine
- Specified by:
toSingleLinein classMutationRateModel
-
generateFactory
- Specified by:
generateFactoryin 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
-