Documentation
¶
Overview ¶
Package simulate creates random trees.
Index ¶
- func BirthDeath(name string, spRate, extRate float64, rootAge int64, terms int) (*timetree.Tree, bool)
- func Coalescent(name string, n float64, max int64, terms int) *timetree.Tree
- func Uniform(name string, max, min int64, ages []int64) *timetree.Tree
- func Yule(name string, spRate float64, rootAge int64, terms int) (*timetree.Tree, bool)
- type Rander
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BirthDeath ¶
func BirthDeath(name string, spRate, extRate float64, rootAge int64, terms int) (*timetree.Tree, bool)
BirthDeath create a birth-death tree with the given speciation and extinction rate, in million years, stopping when the number of terminals is reached of when all proposed events are in the future. It returns false if less than two terminals are included. BirthDeath panics if terms < 2.
func Coalescent ¶
Coalescent creates a random tree using the Kingman coalescence with a population size of n. see Felsenstein J. (2004) "Inferring Phylogenies", Sinauer, p.456. Coalescent panics if terms < 2.
func Uniform ¶
Uniform creates a random tree using a uniform prior based on the method described by Ronquist et al. (2012) "A total evidence approach to dating with fossils, applied to the early radiation of Hymenoptera" Syst. Biol. 61: 973-999. doi:10.1093/sysbio/sys058. Uniform panics if len(ages) < 2,