Package jebl.evolution.treesimulation
Class TreeSimulator
- java.lang.Object
-
- jebl.evolution.treesimulation.TreeSimulator
-
public class TreeSimulator extends java.lang.ObjectThis class provides the framework for (backwards-through-time) tree simulation. Basically, this takes a set of tips (optionally at different dates) and repeatedly coalesces them together until the MRCA is reached and the tree is returned. The time intervals between nodes are provided by the IntervalGenerator and an implementation of this is the CoalescentIntervalGenerator in the jebl.evolution.coalescent package.- Version:
- $Id: TreeSimulator.java 1053 2010-05-10 13:00:31Z rambaut $
- Author:
- Andrew Rambaut
-
-
Constructor Summary
Constructors Constructor Description TreeSimulator(java.lang.String taxonPrefix, double[] samplingTimes)TreeSimulator(java.lang.String taxonPrefix, int taxonCount)A constructor for a given number of taxa, all sampled at the same timeTreeSimulator(java.lang.String taxonPrefix, int[] samplingCounts, double[] samplingTimes)TreeSimulator(java.util.Collection<Taxon> taxa, java.lang.String heightAttributeName)A constructor for a given collection of taxa.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)A main() to test the tree simulation classes.RootedTreesimulate(IntervalGenerator intervalGenerator)RootedTreesimulate(IntervalGenerator intervalGenerator, boolean medianHeights)
-
-
-
Constructor Detail
-
TreeSimulator
public TreeSimulator(java.lang.String taxonPrefix, int taxonCount)A constructor for a given number of taxa, all sampled at the same time- Parameters:
taxonCount-
-
TreeSimulator
public TreeSimulator(java.lang.String taxonPrefix, double[] samplingTimes)
-
TreeSimulator
public TreeSimulator(java.lang.String taxonPrefix, int[] samplingCounts, double[] samplingTimes)
-
TreeSimulator
public TreeSimulator(java.util.Collection<Taxon> taxa, java.lang.String heightAttributeName)
A constructor for a given collection of taxa. If the taxa have the attribute given by heightAttributeName then this will be used, otherwise a height of 0.0 will be assumed.- Parameters:
taxa-
-
-
Method Detail
-
simulate
public RootedTree simulate(IntervalGenerator intervalGenerator)
-
simulate
public RootedTree simulate(IntervalGenerator intervalGenerator, boolean medianHeights)
-
main
public static void main(java.lang.String[] args)
A main() to test the tree simulation classes. In this case the interval generator is a simple anonymous class that simply returns the uniform random deviate that it is passed.- Parameters:
args-
-
-