Phyltree object (Comparative Genomics Toolbox for MatlabŪ)

written by: Liran Carmel

Last modified: 12:57, Mon 13-Sep-2010

General Description
A bifurcating rooted phylogenetic tree. This objects inherits from the parent object bintree.

Navigate to:     General Description     Class Structure     Class Construction     Class Functions

Class Structure
Each field can be accessed by the dot (.) operation, or by the GET function. The GET function can work on multiple instances simultaneously. Most fields, except for those that are Dependent, can be modified using the dot (.) operation, or by the SET function.
    Field Description Type Default Dedicated Get/Set Function  
    node_age age of the node in year ago from present double vector []    
    l_node Inherited from bintree. left-descendant of each node double vector []    
    r_node Inherited from bintree. right-descendant of each node double vector []    
    parent Inherited from tree. parent of each node double vector []    
    thd Inherited from digraph. target-height-differences matrix double matrix []    
    name Inherited from graph. name of object, should be short and used as identifier. This field will never be empty. string 'unnamed'    
    description Inherited from graph. verbal description of the class content. string ''    
    source Inherited from graph. verbal description of the source of information. string ''    
    type Inherited from graph. type of graph. string 'general graph'    
    node_name Inherited from graph. names of all nodes. cell array of strings {} nodenames  
    node_mass Inherited from graph. mass of each node. double vector []    
    node_cfield Inherited from graph. user-specific node customized fields. cell array of values {}    
    node_cfield_name Inherited from graph. names of node customized fields. cell array of strings {}    
    weights Inherited from graph. symmetric sparse weight matrix. double matrix []    
  Dependent no_nodes Inherited from graph. number of nodes in the graph. integer scalar 0 nonodes  
  Dependent no_node_cfields Inherited from graph. number of customized fields. integer scalar 0    
  Dependent no_edges Inherited from graph. number of edges in the graph. integer vector 0 noedges  

Class Construction
Empty instance (scalar)
an empty phyltree instance, with all fields initialized to their default values.
syntax: pt = phyltree;
Empty instance (matrix)
an array of empty phyltree instances.
syntax: pt = phyltree(size,'size');
Copy constructor
one phyltree instance is copied into another.
syntax: pt_destination = phyltree(pt_origin);
Construction by field names
an instance is formed by directly providing field values. Any field which is not dependent is permitted.
syntax: pt = phyltree(field_name, field_value, ...);
Reading-in a file
an instance is formed by reading a file in PHYL or NEWICK formats.
syntax: pt = phyltree(filename);
Initialize a random phyltree
A random phyltree is built.
syntax: pt = phyltree('rand',no_leaves,time_span);

List of Functions

Computations:

balance
computes the balance vector. Source: digraph.
dag2code
finds the DAG-code of a DAG. Source: digraph.
gtd
computes the graph theoretic distance between two nodes. Source: bintree.
laplacian
computes the Laplacian of a graph. Source: graph.
vstruct
finds nodes that are center of a V-structure. Source: digraph.

Customized fields manipulations:

alloccfield
allocates a new customized field to a graph. Source: graph.
cfieldexist
finds whether a customized field exists in a graph. Source: graph.
cfieldnames
lists the customized fields in a GRAPH object. Source: graph.
getcfield
retrieves a customized field from a graph. Source: graph.
setcfield
sets values for a customized field of GRAPHs. Source: graph.

Display:

show
displays class content. Source: graph.

Evolutionary inference:

ardollo
makes Dollo ancestral reconstruction of binary characters.
computeevents
compute gain/loss/survive events of binary character.
dolloroot
finds the origin of a binary character.

I/O functions:

dump
writes a phylogenetic tree to disk.

Information extraction:

ancestors
finds the sequence of ancestors of a specifed node. Source: tree.
descendants
finds all descandants of a specifed node. Source: tree.
generation
computes the generation of each node.
iodegree
computes the in and out degrees of a digraph. Source: digraph.
iscomplete
tests whether the binary tree is fully connected. Source: bintree.
iscyclic
finds whether a DIGRAPH is cyclic or not. Source: digraph.
lca
finds the last common ancestor of a list of nodes. Source: tree.
leaves
finds these nodes that are leaves. Source: tree.
leavesunder
lists the leaves that are descendants of a particular node. Source: tree.
nodeid
finds the IDs of a list of nodes. Source: graph.
parents
finds the parents of specific nodes. Source: digraph.
root
finds the root of the tree. Source: tree.

Maintenance:

age2branchlength
computes branch lengths on a phylogenetic tree.
verify
computes missing. Source: bintree.

SET/GET functions:

get
get method
nodenames
retrieves the name of the nodes in the graph. Source: graph.
noedges
retrieves the number of edges in GRAPH objects. Source: graph.
nonodes
retrieves the number of nodes in GRAPH objects. Source: graph.
set
set method

Transformations:

addedge
adds an edge to a phylogenetic tree.
order
orders the nodes in a tree. Source: tree.
prunesubtree
prunes a subtree. Source: tree.
sampletree
samples the tree such as to keep a smaller number of leaves.
subtree
isolates the subtree branching from a certain node.
swap
replaces the indices of two nodes.
updatesubtree
substitutes the fields of a subtree in the father tree. Source: tree.

Visualization:

eigenproj
computes the eigenprojection of a graph. Source: graph.
view
plots a PHYLTREE