phylox.cherrypicking.base.check_reducible_pair

phylox.cherrypicking.base.check_reducible_pair(network, x, y)

Checks whether the pair (x,y) is a reducible pair in the network.

Parameters:
  • network – a phylogenetic network.

  • x – a leaf of the network.

  • y – a leaf of the network.

Returns:

the type of reducible pair (x,y) in the network.

Example:

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