API Documentation¶
An example Python package, illustrating current best-practises.
-
kingman.simulate(sample_size, random_seed=None)¶ Simulates the Kingman coalescent for the specified sample size and random seed.
Returns a tuple (parent, time) which describes the simulated history of the sample as an oriented forest.
parentis a list of integers, in which the parent of nodejisparent[j].timean array of floating point values in which the time at which nodejwas created istime[j]. See http://jeromekelleher.github.io/ercs/#oriented-trees-and-forests for further information on oriented forests.Time is measured in units of 4Ne generations, following Hudson’s ms.
Parameters: - sample_size (integer) – The sample size; must be >= 2.
- random_seed (integer or None) – The random seed for simulations
Return type: (list, list)