phylogeny.core package¶
Submodules¶
phylogeny.core.distance module¶
-
class
phylogeny.core.distance.
DistanceMatrix
[source]¶ Bases:
numpy.ndarray
Wrapper for the Numpy array class with methods proper of a distance matrix.
For documentation for the Numpy array, read the Numpy documentation.
-
classmethod
from_sequences
(sequences, distance_fn=<function simple_distance>)[source]¶ From the given sequences, compute pairwise edit distances.
-
classmethod
phylogeny.core.fpc module¶
The four point condition.
The Four Point Condition holds for any additive matrix.
Let’s say we have the following unrooted tree:
1 -\ /- 3
>--<
2 -/ \- 4
Let the distance between leaves ‘a’ and ‘b’ be D(a,b). Consider the three following pairwise sums:
- D(1,2) + D(3,4)
- D(1,3) + D(2,4)
- D(1,4) + D(2,3)
The smallest of these sums has to be D(1,2)+D(3,4), since it covers all the edges of the tree connecting the four leaves, EXCEPT for the ones on the path separating 1 and 2 from 3 and 4. Furthermore, the two larger of the three pairwise sums have to be identical, since they cover the same set of edges.
The Four Point Condition is the statement that the two largest values of the three pairwise distance sums are the same.
- – Based on an explanation from the book:
- “Computational Phylogenetics. An introduction to designing methods for phylogeny estimation” by Tandy Warnow
phylogeny.core.tree module¶
-
class
phylogeny.core.tree.
Tree
(*args, leaves=None, **kwargs)[source]¶ Bases:
ete3.coretype.tree.TreeNode
Wrapper for the ETE Tree class adapted for the purposes of phylogeny reconstruction.
For documentation for the ETE Tree, read the ETE3 documentation.