name of text file with one or multiple SIMMAP v1.0 style trees.
text
character string containing the tree.
format
format of the trees: either "phylip" or "nexus" - the latter is the default output from SIMMAP v1.0.
rev.order
a logical value indicating whether the states and times along each branch is given (from root to tip) in right-to-left order (if TRUE) or in left-to-right order.
Value
a modified phylogenetic tree of class "phylo" with the following additional elements:
mapsa list of named vectors containing the times spent in each state on each branch, in the order in which they occur.
mapped.edgea matrix containing the total time spent in each state along each edge of the tree.
Details
This function does not yet accept trees in SIMMAP v1.5 format; however it does read a more flexible format than is produced by SIMMAP v1.0 (for instance, multi-character mapped states and more than 7 mapped states). Uses some modified code from read.nexus from the "ape" package to read the NEXUS block created by SIMMAP. Also creates the attribute "map.order" which indicates whether the stochastic map was read in from left to right or right to left. This attribute is used by default by write.simmap to write the tree in the same order.
References
Paradis, E., J. Claude, and K. Strimmer. 2004. APE: Analyses of phylogenetics and evolution in R language. Bioinformatics, 20, 289--290.
Bollback, J. P. 2006. Stochastic character mapping of discrete traits on phylogenies. BMC Bioinformatics, 7, 88.