is.clock | R Documentation |
This function checks the tree to see if the branch lengths satisfy the molecular clock assumption. For each node, the lengths of the left lineage and right lineage are compared. If they are not equal to each other and the difference is greater than threshold
, the function will return FALSE. This function does not perform statistical test for the molecular clock assumption.
is.clock(nodematrix, nspecies,threshold)
nodematrix |
the tree node matrix |
nspecies |
the number of species |
threshold |
the critical value for the difference between the length of the left decendant lineage and that of the right decendant lieage of an internode. The difference below the threshold is treated as no difference. |
The function returns TRUE for a clock tree and FALSE for a non-clock tree.
Liang Liu lliu@uga.edu
is.rootedtree
treestr<-"((((H:0.00402,C:0.00402):0.00304,G:0.00705):0.00929,O:0.01635):0.1,W:0.11635);"
nodematrix<-read.tree.nodes(treestr)$nodes
##if the threshold is set to be large, the tree is a clock tree
is.clock(nodematrix,5,0.0001)
##[1] TRUE
##if the threshold is a small number, the tree is not a clock tree.
is.clock(nodematrix,5,0.00001)
##[1] FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.