Navigation Banner
  next up previous
Next: Simulation Tools Up: Molecular Clocks Previous: Global clocks: molclock.bf

Local clocks: localclocks.bf

Particularly when studying data sets consisting of many species spanning a wide level of taxonomic diversity, it may be of interest to assign local molecular clocks to some clades. For instance, in a study of mammalian molecular evolution one might specify that each genus evolves in a clocklike manner, but that different genera evolve at different rates. To allow such analyses, the MolecularClock command can be applied to any node on a tree. Unlike the global clock of the previous case, it is not necessary for the MolecularClock command to be applied to a rooted tree; the placement of the MolecularClock command "roots" the tree, at least locally. To illustrate this feature, we use localclocks.bf. Instead of the data file demo.seq we use the larger file largedemo.seq. The relevant new sections of the code are the tree topology definition:
myTopology = "(((a,b)n1,(c,(d,e))n2),f)";
and the declaration of two local molecular clocks:
fprintf(stdout,"\n\n Local Molecular Clock Analysis: \n");
ClearConstraints(myTree);
MolecularClock(myTree.n1,m);
MolecularClock(myTree.n2,m);
LikelihoodFunction theLikFun = (myFilter, myTree);
Optimize(results,theLikFun);
.

The topology string used in localclocks.bf takes advantage of Hy-Phy's extended syntax. Notice how we have named two of the internal nodes n1 and n2. Those names override Hy-Phy's default (and rather cryptic) node naming convention and allow for us to call functions-in this case, MolecularClock- on the clades they tag. The syntax of the MolecularClock statements is rather C-like. MolecularClock(myTree.n1,m); imposes a local clock on the clade below node n1 in tree myTree. The parameter with clocklike behavior is m, the only option for the F81 model being used. By examining the output you notice that the two subtrees do, indeed, have clocklike branch lengths, yet, the tree as a whole is not clocklike. The likelihood ratio test suggests that the local clocks are not present.


next up previous
Next: Simulation Tools Up: Molecular Clocks Previous: Global clocks: molclock.bf
Spencer Muse
2000-05-31
 
Sergei L. Kosakovsky Pond and Spencer V. Muse, 1997-2002