tag:blogger.com,1999:blog-8499895524521663926.post2147118806772800791..comments2024-03-27T07:13:39.236-04:00Comments on Phylogenetic Tools for Comparative Biology: Updates to evol.rate.mcmc() & new analysis of the posterior sampleLiam Revellhttp://www.blogger.com/profile/04314686830842384151noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-8499895524521663926.post-79578452162688921432013-06-02T19:58:50.289-04:002013-06-02T19:58:50.289-04:00Hi. Not sure I understand the source of this error...Hi. Not sure I understand the source of this error. Please feel free to email me your input data and run code (liam.revell@umb.edu) & I will try and replicate the bug. Thanks! LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-6155134526277306322013-06-02T18:37:47.745-04:002013-06-02T18:37:47.745-04:00I cannot make it work... I still get the this erro...I cannot make it work... I still get the this error message, even if I paste the function. But I'm puzzled as I can't see where "posterior.evolrate" calls this "splitTree" internally. Please, any help would be very appreciated!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-50833113425485047712013-05-30T21:13:28.692-04:002013-05-30T21:13:28.692-04:00Thanks, Jessica. I had the same problem and this s...Thanks, Jessica. I had the same problem and this solved it right away!phyloloyohehttps://www.blogger.com/profile/12241112596191250959noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-91166900678173534922013-05-01T11:36:56.811-04:002013-05-01T11:36:56.811-04:00I am not sure if anyone else has encountered this ...I am not sure if anyone else has encountered this error, but as I was trying to run posterior.evolrate I kept getting this message: "Error in if (where == 0 || where == "root") where <- ROOTx : missing value where TRUE/FALSE needed". <br /><br />I tracked the problem down to splitTree not always creating a branch labelled "NA" out of an internal branch (seems to be a issue with drop.tip in the drop.clade function). I think I have found a way around it, see below, posterior.evolrate now running properly for me.<br /><br /><br />splitTree<-function(tree,split){<br /> if(split$node>length(tree$tip)){<br /> # first extract the clade given by shift$node<br /> tr2<-extract.clade(tree,node=split$node)<br /> tr2$root.edge<-tree$edge.length[which(tree$edge[,2]==split$node)]-split$bp<br /> #now remove tips in tr2 from tree<br />###edit starts here<br /> tr1<-drop.clade(tree,tr2$tip.label[1:(length(tr2$tip.label)-1)])<br /> drops<-tr2$tip.label[length(tr2$tip.label)]<br /> tr1$tip.label[(which(tr1$tip.label %in% drops))]<-"NA"<br /> tr1$edge.length[match(which(tr1$tip.label=="NA"),tr1$edge[,2])]<-split$bp<br />###edit ends here<br /> } else {<br /> # first extract the clade given by shift$node<br /> tr2<-list(edge=matrix(c(2L,1L),1,2),tip.label=tree$tip.label[split$node],edge.length=tree$edge.length[which(tree$edge[,2]==split$node)]-split$bp,Nnode=1L)<br /> class(tr2)<-"phylo"<br /> # now remove tip in tr2 from tree<br /> tr1<-tree<br /> tr1$edge.length[match(which(tr1$tip.label==tr2$tip.label[1]),tr1$edge[,2])]<-split$bp<br /> tr1$tip.label[which(tr1$tip.label==tr2$tip.label[1])]<-"NA"<br /> }<br /> trees<-list(tr1,tr2); class(trees)<-"multiPhylo"<br /> return(trees)<br />}Jessicahttps://www.blogger.com/profile/01075818121178010784noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-12004395464072455952012-11-27T17:18:21.979-05:002012-11-27T17:18:21.979-05:00Actually, revise that - it is not an error that av...Actually, revise that - it is not an error that ave.rates is not in the NAMESPACE; it is designed to be called internally by posterior.evolrate only. Here, I have just used it as a convenience to visualize the posterior mean rates as a tree stretching; however this is not its primary function.Liam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-22169825346390429462012-11-27T16:32:41.083-05:002012-11-27T16:32:41.083-05:00This is an error in that ave.rates is (for some re...This is an error in that ave.rates is (for some reason) not in the NAMESPACE of phytools. You can download the source code <a href="http://faculty.umb.edu/liam.revell/phytools/evol.rate.mcmc/v0.6/evol.rate.mcmc.R" rel="nofollow">here</a>, but I will also build a new version of phytools with this fixed & post shortly.Liam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-81225162005006777042012-10-02T17:37:59.099-04:002012-10-02T17:37:59.099-04:00i've been going through this exercise and thin...i've been going through this exercise and things are going great until i try to plot the ave.rates - which doesn't appear as a function i guess - have you updated this? Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-58075972519350854592011-07-14T18:28:12.048-04:002011-07-14T18:28:12.048-04:00min.split() has now been renamed minSplit() for ge...min.split() has now been renamed minSplit() for generic method consistency (v0.0-5 of "phytools"). - LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-4703271528814947152011-04-26T16:36:26.901-04:002011-04-26T16:36:26.901-04:00Dan Scantlebury found a fatal error in v0.4 (actua...Dan Scantlebury found a fatal error in v0.4 (actually, which prevented the function from loading into memory). I have fixed this, so hopefully it works now.Liam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.com