ivy.chars.evolve module

Functions for evolving traits and trees.

ivy.chars.evolve.brownian(root, sigma=1.0, init=0.0, values={})[source]

Recursively evolve a trait by Brownian motion up from the node root.

  • sigma: standard deviation of the normal random variate after one unit of branch length
  • init: initial value

Returns: values - a dictionary mapping nodes to evolved values

ivy.chars.evolve.test_brownian()[source]

Evolve a trait up an example tree of primates:.

((((Homo:0.21,Pongo:0.21)N1:0.28,Macaca:0.49)N2:0.13, Ateles:0.62)N3:0.38,Galago:1.00)root;

Returns: (root, data) - the root node and evolved data.