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:
  • Constructor Details

    • WindowedMutationRate

      protected WindowedMutationRate(WindowedMutationRate toCopy)
    • 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

      public Object clone()
      Specified by:
      clone in class MutationRateModel
    • getCopy

      public MutationRateModel getCopy()
      Specified by:
      getCopy in class MutationRateModel
    • getSummaryTypes

      public String[] getSummaryTypes()
      Specified by:
      getSummaryTypes in interface Summarizable
    • getSummaryValue

      public double getSummaryValue(int summaryType)
      Specified by:
      getSummaryValue in interface Summarizable
    • 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 class MutationRateModel
    • getExpectedSubstitutions

      public final double getExpectedSubstitutions(double time)
      Window must not span zero!
      Specified by:
      getExpectedSubstitutions in class MutationRateModel
    • getEndTime

      public final double getEndTime(double expectedSubs, double startTime)
      Window must not span zero!
      Specified by:
      getEndTime in class MutationRateModel
    • scale

      public final void scale(double scale)
      Linearly scales this mutation rate model.
      Specified by:
      scale in class MutationRateModel
      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 interface Parameterized
      Returns:
      number of parameters
    • getParameter

      public double getParameter(int k)
      Description copied from interface: Parameterized
      get model parameter
      Specified by:
      getParameter in interface Parameterized
      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 interface Parameterized
      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 interface Parameterized
      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 interface Parameterized
      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 interface Parameterized
      Parameters:
      value - parameter value
      k - 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 interface Parameterized
      Parameters:
      value - standard error of parameter value
      k - parameter number
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • report

      public void report(PrintWriter out)
      Description copied from interface: Report
      print human readable report (e.g., on parameters and associated model)
      Specified by:
      report in interface Report
      Parameters:
      out - output stream
    • toSingleLine

      public String toSingleLine()
      Specified by:
      toSingleLine in class MutationRateModel
    • generateFactory

      public MutationRateModel.Factory generateFactory()
      Specified by:
      generateFactory in class MutationRateModel
    • 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