phylox.cherrypicking.base.find_reducible_pairs_with_first

phylox.cherrypicking.base.find_reducible_pairs_with_first(N, x)

Finds a list of reducible pairs (cherries and reticulated cherries) in the network N with leaf x as first element of the pair.

Parameters:
  • N – a phylogenetic network.

  • x – a leaf of the network N.

Returns:

a list of reducible pairs (cherries and reticulated cherries) in the network N with leaf x as first element of the pair.

Example:

>>> from phylox import DiNetwork
>>> from phylox.cherrypicking.base import find_reducible_pairs_with_first
>>> network = DiNetwork(
...     edges=[(-1,0), (0,1), (0,2), (1,2), (1,3), (2,4)],
... )
>>> find_reducible_pairs_with_first(network, 4)
[(4, 3)]