PTreeGenerator
1.0
Simple phylogenetic tree generation from multiple sequence alignment.
|
Functions | |
def | findShortestEdge |
Finds the two vertices with minimal edge weight. | |
def | initEdgeLengths |
Initializes all edges in the tree to a given value. | |
def | findConsensusTree |
Returns weighted consensus tree. |
def ptreegen.utilities.tree_utils.findConsensusTree | ( | trees, | |
weights = [] , |
|||
lim = 0 |
|||
) |
Returns weighted consensus tree.
Uses 50% majority rule.
It is a very slightly modified version of Francois-Jose Serra's code (accesible from here: https://github.com/fransua/utils/blob/master/pmodeltest/consensus.py).
Definition at line 44 of file tree_utils.py.
def ptreegen.utilities.tree_utils.findShortestEdge | ( | tree | ) |
Finds the two vertices with minimal edge weight.
If there are more minimal edges with the same weight, the first one found is returned.
tree | reference to any vertex of the processed tree |
Definition at line 18 of file tree_utils.py.
def ptreegen.utilities.tree_utils.initEdgeLengths | ( | tree, | |
value | |||
) |
Initializes all edges in the tree to a given value.
tree | reference to any vertex of the processed tree |
value | a single value for the edge lengths to be initialized to |
Definition at line 32 of file tree_utils.py.