phylox.networkproperties.properties.count_reducible_pairs
- phylox.networkproperties.properties.count_reducible_pairs(network)
finds the number of reducible pairs in the network split up by number of cherries and number of reticulated cherries.
- Parameters:
network – a phylogenetic network.
- Returns:
a dictionary with the number of reducible pairs in the network keys are “cherries” and “reticulate_cherries”
- Example:
>>> from phylox import DiNetwork >>> from phylox.networkproperties.properties import count_reducible_pairs >>> network = DiNetwork( ... edges=[(-1,0),(0,1),(1,2),(1,3),(2,3),(2,4),(3,5),(0,6),(6,7),(6,8)], ... ) >>> counts = count_reducible_pairs(network) >>> counts["cherries"] == 1 and counts["reticulate_cherries"] == 1 True