get_agg_prevalence

outbreak_clustering.get_agg_prevalence(root, prevalences, W=None)

Compute the total prevalence of all lineages in a group.

Parameters
  • root -- A tree node representing the root of the group (a frozendict).

  • prevalences -- A map from lineage names to prevalences.

  • W -- A set of tree nodes representing the roots of other groups. All nodes descended from root that are in W or are children of those nodes are excluded.

Returns

The prevalence of the group.