phylox.rearrangement.heuristics.utils.LowestReticAndTreeNodeAbove

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

Finds a list of lowest tree nodes and a list of lowest reticulation nodes above a given set of nodes.

Parameters:
  • network – a phylogenetic network.

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

  • allnodes – a boolean value that determines whether we try to find all lowest nodes (True) or only one lowest 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 children in the excludedSet. If not allNodes, then these lists have length at most 1.