phylox.rearrangement.heuristics.utils.HighestNodesBelow

phylox.rearrangement.heuristics.utils.HighestNodesBelow(network, excludedSet, allnodes=False)

Finds a list of highest tree nodes and a list of highest reticulation nodes below a given set of nodes.

Parameters:
  • network – a phylogenetic network.

  • excludedSet – a set of nodes of the network, must include the root.

  • allnodes – a boolean value that determines whether we try to find all highest nodes (True) or only one highest node of each type (False, Default). In the latter case, we return not two lists, but two nodes.

Returns:

A list of tree nodes and a list of reticulation nodes, so that each element of these lists has all their parents in the excludedSet. If not allNodes, then these lists have length at most 1.