Re: [R-sig-phylo] simulating rate shifts
Hi Eric, See the function rTraitCont in ape: the parameters of the BM or OU model can be branch-specific, so it's easy to specify a change in parameter(s) at a given node. There's an example there: http://www.mpcm-evolution.org/practice/online-practical-material-chapter-13/chapter-13-2-traits Cheers, Emmanuel Le 30/07/2015 11:31, Eric Lewitus a écrit : Hello, There are several functions available for simulating rate shifts in trees (e.g., SimTree, TESS), but these implement tree-wide shifts, which are somewhat unrealistic, rather than shifts descending from a particular node. Is it possible to implement a more realistic rate shifted tree? Has such a thing already been implemented? Thanks. [[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/ Pour nous remonter une erreur de filtrage, veuillez vous rendre ici : http://f.security-mail.net/301iAWLdbwV ___ 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/
Re: [R-sig-phylo] Plotting error edgelabels in phylogeny type=fan
Hi Klaus. Thanks for the fix. In ape now. Cheers, Emmanuel Le 30/07/2015 22:45, Klaus Schliep a écrit : Dear Julia, this function should fix your problem and Emmanuel may can include it into edgelables function: edgeLabelsFan - function (text, edge, adj = c(0.5, 0.5), frame = rect, pch = NULL, thermo = NULL, pie = NULL, piecol = NULL, col = black, bg = lightgreen, horiz = FALSE, width = NULL, height = NULL, date = NULL, ...) { lastPP - get(last_plot.phylo, envir = .PlotPhyloEnv) if (missing(edge)) { sel - 1:dim(lastPP$edge)[1] subedge - lastPP$edge } else { sel - edge subedge - lastPP$edge[sel, , drop = FALSE] } r - sqrt(lastPP$xx^2 + lastPP$yy^2) XX - lastPP$xx[subedge[,2]] * (r[subedge[,2]] + r[subedge[,1]]) / (r[subedge[,2]] * 2) YY - lastPP$yy[subedge[,2]] * (r[subedge[,2]] + r[subedge[,1]]) / (r[subedge[,2]] * 2) if (!is.null(date)) XX[] - max(lastPP$xx) - date BOTHlabels(text, sel, XX, YY, adj, frame, pch, thermo, pie, piecol, col, bg, horiz, width, height, ...) } Kind regards, Klaus On Thu, Jul 30, 2015 at 1:10 PM, Julia Dupin julia.du...@gmail.com mailto:julia.du...@gmail.com wrote: Dear all, I'm trying to plot a tree with some branches marked using edgelabels() but the function is misplacing the labels (it misses the actual branches) when I use it in a fan type tree. Here is an example tree-pbtree(n=10,scale=10) plot(tree,type=fan) edgelabels() The phylogeny I am working on is pretty big so fan is the best option for me to visualize it. Has anyone had this issue before? Is there a way to fix it? Or maybe an alternative to edgelabels? Thanks in advance!! Julia -- Julia Dupin PhD candidate Smith lab Dept. Ecology and Evolutionary Biology, Ramaley Hall C127A University of Colorado - Boulder email: julia.du...@colorado.edu mailto:julia.du...@colorado.edu website: http://www.colorado.edu/smithlab/ [[alternative HTML version deleted]] ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org mailto: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/ -- Klaus Schliep Postdoctoral Fellow Revell Lab, University of Massachusetts Boston ___ 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/
Re: [R-sig-phylo] simulating rate shifts
Hi Emmanuel Eric. I think it's possible that Eric is interested in simulating shifts in the lineage diversification (speciation and/or extinction) rate, rather than the rate of phenotypic trait evolution. It is possible to simulate various scenarios of trait-based diversification in the package diversitree, I believe; however if you are merely interested in taking (or simulating some tree) and then imagining (and simulating) a different diversification process for part of that tree, then this is exactly the same as simulating first one tree under process 1 - then pruning a subtree, simulating a replacement subtree under process 2, and attaching the new subtree from whence the previous subtree was removed. Since this is easier said then done, I posted a more detailed worked example on my blog here: http://blog.phytools.org/2015/07/simulating-arbitrary-shift-in.html. 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 7/31/2015 10:57 AM, Emmanuel Paradis wrote: Hi Eric, See the function rTraitCont in ape: the parameters of the BM or OU model can be branch-specific, so it's easy to specify a change in parameter(s) at a given node. There's an example there: http://www.mpcm-evolution.org/practice/online-practical-material-chapter-13/chapter-13-2-traits Cheers, Emmanuel Le 30/07/2015 11:31, Eric Lewitus a écrit : Hello, There are several functions available for simulating rate shifts in trees (e.g., SimTree, TESS), but these implement tree-wide shifts, which are somewhat unrealistic, rather than shifts descending from a particular node. Is it possible to implement a more realistic rate shifted tree? Has such a thing already been implemented? Thanks. [[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/ Pour nous remonter une erreur de filtrage, veuillez vous rendre ici : http://f.security-mail.net/301iAWLdbwV ___ 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/