Hi Martin.

Without more information or your input file, it's hard for me to evaluate why read.simmap is hanging. Did you run:

tree<-read.simmap("filename",format="nexus",version=1.5)

If you have your discrete character data in R, you can also use the phytools function make.simmap to generate stochastic maps. Make sure that you are using a recent version of phytools (>=0.2-26; >=0.2-33 for uncertain/unknown tip states; >=0.2-37 for non-symmetric transition matrices) as earlier versions are buggy.

My advice would be to use make.simmap to generate stochastic maps (or read them from file), and then use OUwie (in the package OUwie) to fit a multiple optima OU model to each mapped tree.

For discrete character x and continuous trait y (each vectors in the same order with names(x)=names(y)=species names); and a phylogeny, tree, do:

library(phytools)
library(OUwie)

mtrees<-make.simmap(tree,x,nsim=100)
XX<-data.frame(names(x),x,y)
result<-lapply(mtrees,OUwie,data=XX,model="OUM",simmap.tree=TRUE)

This just gives you a giant list of the results returned by OUwie for each tree. It would probably be a good idea to organize your results of interest more sensibly than this so that they can be easily aggregated across mappings.

Good luck. All the best, Liam

Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 4/5/2013 6:13 PM, Martin Turcotte wrote:
Dear forum,
        I am trying to conduct an ouch analysis and for it I must determine the 
ancestral selective regime at each node in my tree. To do so I need to conduct 
ancestral reconstruction on discrete unordered data. To my knowledge no package 
can do this in R (I hope I am wrong) and thus I used Mesquite's function to 
'Trace Character History'. The problem is exporting this information to R.
        In Mesquite the only export option I see is  'Export Ancestral State 
Trace' but the only option is SIMMAP 1.5 format. I tried opening this file 
using  phytools'    read.simmap  but it just hangs. I can open the file with 
FigTree and I can see the Nodel labels but when I export the tree as a nexus 
file it does not save the model labels.
Any advice would be appreciated.

thanks,
Mart

Martin Turcotte, Ph. D.
Dept. of Biology
University of Toronto at Mississauga
3359 Mississauga Road North, Mississauga,
Ontario, Canada, L5L 1C6
http://individual.utoronto.ca/martinturcotte



        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to