Bases: ete2.coretype.tree.TreeNode
Extends the standard TreeNode instance. It adds specific attributes and methods to work with phylogentic trees.
Parameters: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns: | a tree node object which represents the base of the tree. |
New in version 2.x.
Returns the best outgroup according to topological ages and node sizes.
Currently Experimental !!
Returns a list of all duplication and speciation events detected after this node. Nodes are assumed to be duplications when a species overlap is found between its child linages. Method is described more detail in:
“The Human Phylome.” Huerta-Cepas J, Dopazo H, Dopazo J, Gabaldon T. Genome Biol. 2007;8(6):R109.
Returns the farthest oldest leaf to the current one. It requires an species2age dictionary with the age estimation for all species.
Parameters: | is_leaf_fn (None) – A pointer to a function that receives a node instance as unique argument and returns True or False. It can be used to dynamically collapse nodes, so they are seen as leaves. |
---|
New in version 2.1.
Returns the farthest oldest node (leaf or internal). The difference with get_farthest_oldest_leaf() is that in this function internal nodes grouping seqs from the same species are collapsed.
Returns a list of duplication and speciation events in which the current node has been involved. Scanned nodes are also labeled internally as dup=True|False. You can access this labels using the ‘node.dup’ sintaxis.
Method: the algorithm scans all nodes from the given leafName to the root. Nodes are assumed to be duplications when a species overlap is found between its child linages. Method is described more detail in:
“The Human Phylome.” Huerta-Cepas J, Dopazo H, Dopazo J, Gabaldon T. Genome Biol. 2007;8(6):R109.
Returns the set of species covered by its partition.
Returns True id species names under this node are all included in a given list or set of species names.
Returns an iterator over the species grouped by this node.
Returns the reconcilied topology with the provided species tree, and a list of evolutionary events inferred from such reconciliation.
Sets the parsing function used to extract species name from a node’s name.
Parameters: | fn – Pointer to a parsing python function that receives nodename as first argument and returns the species name. |
---|
# Example of a parsing function to extract species names for
# all nodes in a given tree.
def parse_sp_name(node_name):
return node_name.split("_")[1]
tree.set_species_naming_function(parse_sp_name)
Basic evolutionary event. It stores all the information about an event(node) ocurred in a phylogenetic tree.
etype : D (Duplication), S (Speciation), L (gene loss),
in_seqs : the list of sequences in one side of the event.
out_seqs : the list of sequences in the other side of the event
node : link to the event node in the tree