Darwin Help

Back to Index

ReconcileTree

Function ReconcileTree - Reconciles a gene tree with a species tree

Calling Sequence  ReconcileTree(g,s,g2s)
ReconcileTree(g,s,g2s,reroot)
Parameters
NameTypeDescription

g TreeGene Tree
s TreeSpecies Tree
g2s proceduremapping function from gene to species
reroot boolean(optional) reroot gene tree
Return Type  list
Synopsis The function ReconcileTree infers gene duplication and speciation events on a gene tree by comparing it to a TRUSTED species tree. The function g2s is a mapping function from the gene name to its species.

If reroot is set to 'true' (by default it's false), the function reroots the gene tree on every possible branch and reconciles all those trees. It returns the rooted gene tree, that minimizes the number of dupliction events.


The function returns the reconciled gene tree and the number of duplication events on it. The events are stored in the 'XTRA' field of the tree: 'D=Y' and 'D=N' indicate whether the node represents a duplication or speciation event respectively.

References Zmasek CM and Eddy SR. A simple algorithm to infer gene duplication and speciation events on a gene tree. Bioinformatics, 2001, 17(9):821-828
Examples
> GeneTree := Tree(Tree(Tree(Leaf(a_HUMAN, 3), 2, Leaf(a_YEAST,3)),
              1, Leaf(b_BOVIN,3)), 0, Leaf(c_HUMAN,3));
GeneTree := Tree(Tree(Tree(Leaf(a_HUMAN,3),2,Leaf(a_YEAST,3)),1,Leaf(b_BOVIN,3))
,0,Leaf(c_HUMAN,3))
> SpeciesTree := Tree(Tree(Leaf(HUMAN,2),1,Leaf(BOVIN,2)),0,Leaf(YEAST,2));
SpeciesTree := Tree(Tree(Leaf(HUMAN,2),1,Leaf(BOVIN,2)),0,Leaf(YEAST,2))
> SwissProtID := x -> x[SearchString('_',x)+2..-1];
SwissProtID := x -> x[SearchString(_,x)+2..-1]
> tree := ReconcileTree(GeneTree, SpeciesTree, SwissProtID);
tree := [Tree(Tree(Tree(Leaf(a_HUMAN,3),2,Leaf(a_YEAST,3),D=N),1,Leaf(b_BOVIN,3)
,D=Y),0,Leaf(c_HUMAN,3),D=Y), 2]


See also LeastSquaresTree,   PhylogeneticTree,   RobinsonFoulds,   RotateTree,   Tree