pylogeny.pll module
Wrap C extension for libpll library for use in natural Python.
-
class pylogeny.pll.dataModel(topo, alignm, model=None)[source]
Encapsulating a phylogenetic tree (as topology) + corresponding alignment
into a libpll-associated data structure. Allows for log-likelihood
scoring of this model. MUST BE CLOSED AFTER USE.
-
__init__(topo, alignm, model=None)[source]
Initialize the data model and respective structures.
-
close()[source]
If done with this particular problem. Frees associated memory.
-
getLogLikelihood()[source]
Calculates log-likelihood using libpll.
| Returns: | a floating point value |
-
getNewickString()[source]
Acquire the Newick string of the problem instance.
-
class pylogeny.pll.partitionModel(ali)[source]
A partition model intended for libpll.
-
__init__(ali)[source]
Initialize a partition model (for internal use by libpll).
-
close()[source]
Delete file.
-
createModel(models, partnames, ranges)[source]
Establish a more complex model.
| Parameters: |
- models (a list of strings) – a list of model names (e.g., ‘WAG’, ‘DNA’)
- partnames (a list of strings) – a list of partition names (e.g., ‘p1’, ‘p2’)
- ranges (a list of integer tuples) – a list of range tuples (what ranges of alignment)
|
| Returns: | None
|
-
createSimpleModel(pmodel='WAG')[source]
Establish a simple model (e.g., one type).
| Parameters: | pmodel (a string (default ‘WAG’)) – optional; what protein model to use (as described in pll) |
| Returns: | None |
-
getFileName()[source]
Get the file name of the model file.