Package pal.coalescent
Class SkylinePlot
- java.lang.Object
-
- pal.coalescent.SkylinePlot
-
public class SkylinePlot extends java.lang.Object implements Report, Units, java.io.Serializable
Skyline plot derived from a strictly bifurcating tree or a coalescent interval. This class provides the "classic" skyline plot method by Pybus, Rambaut and Harvey .2000. Genetics 155:1429-1437, as well as the "generalized" skyline plot method described in Strimmer and Pybus. 2001. MBE submitted.- Version:
- $Id: SkylinePlot.java,v 1.16 2001/07/11 13:51:16 korbinian Exp $
- Author:
- Korbinian Strimmer
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS
-
-
Constructor Summary
Constructors Constructor Description SkylinePlot(CoalescentIntervals ci, double epsilon)
Construct skyline plot from given coalescent intervalsSkylinePlot(Tree tree, double epsilon)
Construct skyline plot from tree
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
computeClassic()
Compute classic skyline plotvoid
computeGeneralized(double epsilon)
Compute generalized skyline plotdouble
findInterval(double time)
Find interval corresponding to a specific timedouble
getAICC()
Compute AICC-corrected log-likelihooddouble
getEpsilon()
Returns epsilonCoalescentIntervals
getIntervals()
Returns the coalescent intervals in this skyline plot.double
getLogLikelihood()
Compute log-likelihooddouble
getMaxPopulationSize()
Returns the largest estimate of population size.double
getMaxTime()
Returns the largest value of time defined in this plot (= maximum value for epsilon)int
getParameterCount()
Returns the number of composite intervals (=number of parameters).double
getPopulationSize(int i)
Returns the population size in interval i.int
getSize()
Returns the number of intervals in this skyline plot.int
getUnits()
Returns unit of time.void
optimize()
Optimize generalized skyline plotvoid
report(java.io.PrintWriter out)
print human readable report (e.g., on parameters and associated model)java.lang.String
toString()
-
-
-
Constructor Detail
-
SkylinePlot
public SkylinePlot(Tree tree, double epsilon)
Construct skyline plot from tree- Parameters:
epsilon
- smoothing parameter (if set < 0 then epsilon will be optimized)
-
SkylinePlot
public SkylinePlot(CoalescentIntervals ci, double epsilon)
Construct skyline plot from given coalescent intervals- Parameters:
epsilon
- smoothing parameter (if set < 0 then epsilon will be optimized)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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)
-
computeClassic
public void computeClassic()
Compute classic skyline plot
-
computeGeneralized
public void computeGeneralized(double epsilon)
Compute generalized skyline plot
-
optimize
public void optimize()
Optimize generalized skyline plot
-
getLogLikelihood
public double getLogLikelihood()
Compute log-likelihood
-
getAICC
public double getAICC()
Compute AICC-corrected log-likelihood
-
findInterval
public double findInterval(double time)
Find interval corresponding to a specific time
-
getMaxTime
public double getMaxTime()
Returns the largest value of time defined in this plot (= maximum value for epsilon)
-
getMaxPopulationSize
public double getMaxPopulationSize()
Returns the largest estimate of population size.
-
getIntervals
public CoalescentIntervals getIntervals()
Returns the coalescent intervals in this skyline plot.
-
getSize
public int getSize()
Returns the number of intervals in this skyline plot.
-
getParameterCount
public int getParameterCount()
Returns the number of composite intervals (=number of parameters).
-
getEpsilon
public double getEpsilon()
Returns epsilon
-
getPopulationSize
public double getPopulationSize(int i)
Returns the population size in interval i.
-
getUnits
public int getUnits()
Returns unit of time.
-
-