Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-18 Thread Emmanuel Paradis
Hi all, To complete the previous suggestions from David and Santiago, the function makeNodeLabel with its option method = "md5sum" creates node labels depending only the composition of the tip labels descending from each node. Then using match(), it is possible to find nodes representing iden

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-14 Thread Yampolsky, Lev
uot; mailto:yampo...@mail.etsu.edu>> To: Emmanuel Paradis mailto:emmanuel.para...@ird.fr>>, "Liam J. Revell" mailto:liam.rev...@umb.edu>>, Dan Rabosky mailto:drabo...@umich.edu>> Cc: "r-sig-phylo@r-project.org<mailto:r-sig-phylo@r-project.org>"

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-14 Thread Santiago Sánchez
ps://sites.google.com/site/santiagosnchezrmirez/ > > Message: 1 > Date: Wed, 13 Jan 2016 23:39:21 + > From: "Yampolsky, Lev" > To: Emmanuel Paradis , "Liam J. Revell" > , Dan Rabosky > Cc: "r-sig-phylo@r-project.org" > Subject: Re: [R-sig-p

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-14 Thread David Bapst
Lev, This is easy, if the newick strings are structured the same so that the resulting edge matrix and tip labels are identical. Here's a worked example: ``` library(ape) # with edge lengths newick1<-"(Homo:30,(Echinus:18,(Cephalodiscus:12,(Rhabdopleura:8,(Dictyonema:1,(Rhabdinopora:1,Dicellogra

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-13 Thread Yampolsky, Lev
Dear Colleagues, Thank you very much for your help, it’s all clear now. (I got way more than I asked for, for example, my trees include only extant taxa). And yes, branching.times() and getBtimes() return exact same numbers of course, I just didn’t understand ow indexing works. Next question, a v

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-13 Thread Emmanuel Paradis
To pile a little bit more after David's message, ape has the function ltt.plot.coords which does the same thing than phytools::ltt but with different options, including 'tol' which specifies the tolerance for considering a tree as ultrametric or not. Best, Emmanuel Le 13/01/2016 03:29, Liam

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-12 Thread David Bapst
Dear Lev and all, First, to answer the actual question in your postscriptum, ape's branching.times() is not for non-ultrametric trees, but it does silently accept them as input, unfortunately. The branching.times it returns assume that some tip (the first tip?) is at time=0, which means that often

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-12 Thread Liam J. Revell
Hi Lev. You could also look at ltt in phytools. The object returned has the time of all the events on the tree - including the end of lineages that go extinct before the present. To access these, you can do: obj<-ltt(tree,plot=FALSE) obj$times obj$ltt & to see how these are associated with e

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-12 Thread Dan Rabosky
Dear Lev- I don't think branching.times can compute these for non-ultrametric trees. You can do this with package BAMMtools, but you need a "hidden" internal function. You can access it as "BAMMtools:::NU.branching.times" It returns branching times relative to the most recently-occurring ti

[R-sig-phylo] getBtimes vs. branching.times

2016-01-12 Thread Yampolsky, Lev
Dear Colleagues, Does anyone know what is the difference between ape’s branching.times() and laser’s getBtimes()? And why they may be giving rather different results, particularly for internal branches? (From an ultrametric tree created by chronotree <- chronos(tree, lambda = 1, model = "correl