ivy.ages module

Calculate node ages from branch lengths.

The function of interest is ages2lengths

ivy.ages.ages2lengths(node, node_ages, results={})[source]

Convert node ages to branch lengths

Parameters:
  • node (Node) – Node object
  • node_ages (dict) – Dict mapping nodes to ages
Returns:

mapping of nodes to lengths

Return type:

dict

ivy.ages.min_ages(node, leaf_ages, results={})[source]

Calculate minimum ages given fixed ages in leaf_ages

Parameters:
  • node (Node) – A node object
  • leaf_ages (dict) – A dict mapping leaf nodes to ages
Returns:

mapping of nodes to ages

Return type:

dict

ivy.ages.smooth(node, node_ages, results={})[source]

adjust ages of internal nodes by smoothing