phylox.cherrypicking.base.CherryPickingMixin

class phylox.cherrypicking.base.CherryPickingMixin

Bases: object

__init__()

Methods

__init__()

from_cherry_picking_sequence(sequence[, ...])

Creates a PhyloX DiNetwork network from a cherry picking sequence, and possibly a matching sequence of heights of the cherries.

classmethod from_cherry_picking_sequence(sequence, heights=None, label_leaves=True)

Creates a PhyloX DiNetwork network from a cherry picking sequence, and possibly a matching sequence of heights of the cherries.

Parameters:
  • sequence – a cherry picking sequence (i.e., a list of 2-tuples)

  • heights – a list of positive floats with the same length as sequence. If None, the heights will be set to consecutive integers

  • label_leaves – Bool, whether to label the leaves with the nodes/labels used in the sequence

Returns:

a network.