Package pal.mep

Class WindowedMutationRate

    • Constructor Detail

      • 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 Detail

      • getMu

        public double getMu()
        returns current day mutation rate.
      • 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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • report

        public void report​(java.io.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
      • 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