Library for the Development and Use of Phylogenetic Network Methods
Component-based model building factory for constructing probabilistic phylogenetic models.
Abstract class (do not instantiate this), that represents the behavior for any phylogenetic network model component that gets fed into a ModelFactory.
Initialize a model component that has a set of dependencies (component types) that must be added to the model before this component can be built.
| Parameter | Type | Description |
|---|---|---|
| dependencies | set[type] | A set of model component types that need to be built first before this component can be added. |
Given a model, hook up this component to it.
| Parameter | Type | Description |
|---|---|---|
| model | Model | The model currently being built. |
Network Component Description: This component should be the first component built into the model, as most other components will be connected to the network in some way.
Builder for the network component of a phylogenetic model.
| Parameter | Type | Description |
|---|---|---|
| dependencies | set[type] | list of component dependencies |
| net | Network | A network |
| node_constructor | Callable | A construction method for custom model network nodes. |
Attaches a network to the given Model
| Parameter | Type | Description |
|---|---|---|
| model | Model | A Model object, most likely completely empty. |
Component that links network leaves with taxon data from a MSA object.
Initialize this MSA component.
| Parameter | Type | Description |
|---|---|---|
| dependencies | set[type] | list of component dependencies |
| aln | MSA | MSA object that is associated with the network. |
| grouping | dict[str, str], optional | A dictionary that maps sequence names to group names. |
Attach the MSA object to the model by setting the data field for each leaf node.
| Parameter | Type | Description |
|---|---|---|
| model | Model | The model that is being built. |
A factory class that builds a phylogenetic model from a set of model components.
Initialize the model factory with a set of model components.
Submit a model component to the factory.
| Parameter | Type | Description |
|---|---|---|
| item | ModelComponent | A model component to be built. |
Build the model from the components.