tag:blogger.com,1999:blog-8499895524521663926.post1506721984572146765..comments2024-03-27T07:13:39.236-04:00Comments on Phylogenetic Tools for Comparative Biology: Code for contMap & new minor phytools versionLiam Revellhttp://www.blogger.com/profile/04314686830842384151noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-8499895524521663926.post-44966399725869745942014-07-07T13:25:43.153-04:002014-07-07T13:25:43.153-04:00Dear Liam,
Thank you for the post, it is very help...Dear Liam,<br />Thank you for the post, it is very helpful.<br />I am using contMap to map the traits into a phylogeny. However, I don't want to reconstruct the ancestral state. I tried to use the argument method = NULL, but it does not seems to work. Is there a way to use the contMap, without reconstructing the ancestor? and so, the branch lengths will be normally in black? I do not want to lose the continuous color gradient of contMap.<br />ThanksAnonymoushttps://www.blogger.com/profile/06536250062693575740noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-45286435659690858732013-11-17T17:25:17.419-05:002013-11-17T17:25:17.419-05:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/09178338599768749019noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-84242107131087212192013-09-25T22:16:19.162-04:002013-09-25T22:16:19.162-04:00No. The vector just has to have the tip labels of ...No. The vector just has to have the tip labels of the tree in names(x). For example:<br />tree<-pbtree(n=26,tip.label=LETTERS)<br />x<-fastBM(tree)<br />contMap(tree,x)<br />contMap(tree,sample(x))<br />should produce the same plots.<br /><br />- LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-19684015447746548462013-09-25T18:05:59.619-04:002013-09-25T18:05:59.619-04:00Hello Liam,
I am trying to map a continuous trait ...Hello Liam,<br />I am trying to map a continuous trait on a phylogeny and use contMap to visualize it. however I am not getting the correct trait values for the tips of the tree. Does the vector of values have to be in a particular order with regards to the tree tip labels?<br />thanks.Anonymoushttps://www.blogger.com/profile/03399132584011769355noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-58838225756794311902013-08-19T01:36:55.930-04:002013-08-19T01:36:55.930-04:00Hi Liam,
Many thanks, I am embarrassed to say the...Hi Liam, <br />Many thanks, I am embarrassed to say the problem was my trait values were in a matrix rather than a vector. After transforming using my.vector<-my.matrix[,1] the code works. I hope this helps anyone else. <br />-Christoferchristoferhttps://www.blogger.com/profile/02615009080339789957noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-52686074608649226982013-08-18T18:24:03.273-04:002013-08-18T18:24:03.273-04:00Christofer.
This error seems to be normally due t...Christofer.<br /><br />This error seems to be normally due to zero length branches (internal or terminal) in the tree. Try:<br /><br />tree<-di2multi(tree)<br /><br />before running your analysis.<br /><br />This can also be a problem if branches are very short & non-zero. This is a bug that I will try to get around to fixing soon.<br /><br />Let us know if that solves your problem.<br /><br />- LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-31462022893310749652013-08-18T07:39:12.897-04:002013-08-18T07:39:12.897-04:00Hi Liam,
I am getting the same error as Anon above...Hi Liam,<br />I am getting the same error as Anon above. Did you find a solution/explanation for it? <br />many thanks<br />Christoferchristoferhttps://www.blogger.com/profile/02615009080339789957noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-72417603033596550322013-04-05T18:01:34.142-04:002013-04-05T18:01:34.142-04:00contMap calls plotSimmap (my own plotting function...contMap calls plotSimmap (my own plotting function, which unfortunately can only do left & right facing phylograms) internally, so this is not yet possible.<br /><br />However, you might be interested in the phytools function plotBranchbyTrait (<a href="http://blog.phytools.org/2013/03/using-plotbranchbytrait-to-plot.html" rel="nofollow">http://blog.phytools.org/2013/03/using-plotbranchbytrait-to-plot.html</a>, and also search for the function). It plots each branch a single color - but this might be good enough if you have a large phylogeny. In addition, it calls plot.phylo from 'ape' internally, so it can plot all the styles of plot.phylo.<br /><br />- LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-59832784725197471932013-04-05T05:56:02.425-04:002013-04-05T05:56:02.425-04:00Hi Liam,
This is a wonderful script. I wonder if...Hi Liam, <br /><br />This is a wonderful script. I wonder if it is possible add alternative depictions (radial, fan, etc.). The reason I ask is that this worked really well for a large group (>600 spp) but it's hard to see all the gradations when the branches are so close to one another.<br /><br />Thanks for any advice, <br />Daniel<br />Daniel Hanleyhttps://www.blogger.com/profile/10537260413132788018noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-73066756233674151092013-02-02T11:10:24.159-05:002013-02-02T11:10:24.159-05:00Hmmm. Mysterious. I don't recognize the error....Hmmm. Mysterious. I don't recognize the error. Feel free to email me your data file & tree and I will try to replicate it. My email is liam.revell@umb.edu. Thanks!Liam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-26358255598256234992013-01-18T08:38:27.586-05:002013-01-18T08:38:27.586-05:00Dear Liam, I am trying 'contMap', it is gi...Dear Liam, I am trying 'contMap', it is giving me an error.:<br />Error in while (x> trans [i]) } : missing value where TRUE/FALSE neede<br />I tried the 'tiplabels' function and it is working fine but not 'contMap', could you help me.<br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-61159941587034755242012-11-30T18:17:01.064-05:002012-11-30T18:17:01.064-05:00Thank you for the explanation Liam! I'm really...Thank you for the explanation Liam! I'm really liking contMap!Conostegiahttps://www.blogger.com/profile/00182499478812939067noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-55054336677018136182012-11-29T20:06:41.884-05:002012-11-29T20:06:41.884-05:00Hi Ricardo.
Based on the example code, it looks l...Hi Ricardo.<br /><br />Based on the example code, it looks like plotPhylo.motmot (although a versatile function in some ways) plots each edge in a single color based on the states at the nodes. (Please correct me if I'm wrong!) contMap computes ancestral states along edges of the tree, as well as at the nodes, and maps ancestral states along edges and nodes.<br /><br /><i>However</i>, it was also <a href="http://www.anoleannals.org/2012/11/11/new-method-for-visualizing-trait-evolution-on-a-tree/#comments" rel="nofollow">pointed out to me</a> that contMap is similar to a stand-alone software called TreeGradients. This is correct - although TreeGradients does not compute ancestral states, they must be provided.<br /><br />Thanks for the feedback. LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-59122125996242556212012-11-29T19:19:53.338-05:002012-11-29T19:19:53.338-05:00Hi Liam!
I tried it out and it works and looks am...Hi Liam!<br /><br />I tried it out and it works and looks amazing! It seems to work very similar to plotPhylo.motmot in the Motmot package. Is their a difference? <br /><br />Thanks!<br /><br />RicardoConostegiahttps://www.blogger.com/profile/00182499478812939067noreply@blogger.com