tag:blogger.com,1999:blog-8499895524521663926.post5650301426452524554..comments2024-03-08T04:19:23.697-05:00Comments on Phylogenetic Tools for Comparative Biology: Robust Newick tree readerLiam Revellhttp://www.blogger.com/profile/04314686830842384151noreply@blogger.comBlogger25125tag:blogger.com,1999:blog-8499895524521663926.post-70996099146680722772017-04-28T19:24:43.175-04:002017-04-28T19:24:43.175-04:00Glad to hear it. I'm here to serve!Glad to hear it. I'm here to serve!Liam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-37748766328940728122017-04-25T16:32:08.531-04:002017-04-25T16:32:08.531-04:00I was trying for hours to read a tree generated by...I was trying for hours to read a tree generated by "phyloT" website.<br />This function rocks! It even gave one of the most helpful error messages I have found from an R console: "try to use collapse.singles()" ...<br />which worked beautifully!<br />Thanks Liam from down the road in Amherst!Anonymoushttps://www.blogger.com/profile/15190792787209571607noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-83891415340316249752017-01-07T19:06:06.377-05:002017-01-07T19:06:06.377-05:00Thanks, Liam. Fortunately, I could solve the probl...Thanks, Liam. Fortunately, I could solve the problem by myself :)Ryoheihttps://www.blogger.com/profile/02032003893990505948noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-37584172244815565832016-12-25T11:50:48.374-05:002016-12-25T11:50:48.374-05:00You'd have to email it to me ;)You'd have to email it to me ;)Liam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-46470596176494183852016-12-19T06:26:17.366-05:002016-12-19T06:26:17.366-05:00Hello Liam. I also have the same problem as Rosana...Hello Liam. I also have the same problem as Rosana and Déb. Would you check my newick file? Sincerely, Ryohei Ryoheihttps://www.blogger.com/profile/02032003893990505948noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-12586048241142580632016-01-29T09:39:22.540-05:002016-01-29T09:39:22.540-05:00Dear Liam,
I tried the functions read.tree and re...Dear Liam,<br /><br />I tried the functions read.tree and read.newick to open a phylogenetic tree of birds. With read.tree I got the typical error (Error in if (sum(obj[[i]]$edge[, 1] == ROOT) == 1 && dim(obj[[i]]$edge)[1] > : missing value where TRUE/FALSE needed), but when I used read.newick it took really long I let it run 24h and I stil didn't get the tree. <br /><br />Do you know any other function that will work with a complex tree?<br /><br />Thanks a lot!<br />IreneAnonymoushttps://www.blogger.com/profile/04644551583619780753noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-19463681209916414922015-06-03T21:20:47.966-04:002015-06-03T21:20:47.966-04:00I am trying to add the following species phylogram...I am trying to add the following species phylogram that I can open using Dendrocope tree viewer software without any problem, as the column dendrogram, to a heatmap I am trying to build using heatmap.2.<br /><br />But using read.tree does not work on this input<br />And using read.newick, I can read it in, but when I collapse single nodes, the tree plot looks nothing like the original I see with Dendroscope.<br /><br />Is there a problem with my tree? Or in its format? Since it is a species phylogram, there are no branch lengths.<br /><br />Could you help please?<br /><br />((((((((((((((Mt3.5v5, Mt4.0v1), Car), (((Pvu186, Pvu218), (Gma109, Gma189)), Cca))), (((Ppe139, Mdo196), Fve226), Csa122)), ((((((((Ath167, Aly107), (Cru83)), (Bra197, Tha173)), Cpa113), (Gra221, Tca233)), (Csi154, (Ccl165, Ccl182))), ((Mes147, Rco119),(Lus200, (Ptr156, Ptr210)))), Egr201)), Vvi145), ((Stu206, Sly225), Mgu140)), Aco195), (((Sbi79, Zma181),(Sit164, Pvi202)), (Osa193, Bdi192))), Smo91), Ppa152), (((Cre169, Vca199), Csu227), ((Mpu228, Mpu229), Olu231))));Anandhttps://www.blogger.com/profile/02184697593279591471noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-28002374080529455162015-03-03T13:44:14.153-05:002015-03-03T13:44:14.153-05:00Déb. I don't remember. I think the original fi...Déb. I don't remember. I think the original file was in Nexus format, which is not the correct format for read.newick. I'm not sure if this was the problem or not. If your file is a simple Newick string & you cannot read it with read.newick in the latest version of phytools (>=0.4-45) then please email it to me & I will troubleshoot. - LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-5369320043213042662015-03-01T14:43:26.362-05:002015-03-01T14:43:26.362-05:00Hello Liam, I encountered the same problem as Rosa...Hello Liam, I encountered the same problem as Rosana did. Did you figure out the problem? It would be very helpful if you share the explanation/solution!Débhttps://www.blogger.com/profile/00662423676245359863noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-29556027909195869722014-12-29T11:28:43.358-05:002014-12-29T11:28:43.358-05:00Thanks Liam! I needed that!Thanks Liam! I needed that!natehttps://www.blogger.com/profile/12848897932527525157noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-18748902993597088852014-09-19T22:36:35.946-04:002014-09-19T22:36:35.946-04:00Yes. Send me your file & R code and I will try...Yes. Send me your file & R code and I will try to reproduce your error.<br /><br />All the best, LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-42418432141297739022014-09-19T16:37:43.108-04:002014-09-19T16:37:43.108-04:00I got this:
Error in if (sum(obj[[i]]$edge[, 1] ...I got this:<br /><br /> Error in if (sum(obj[[i]]$edge[, 1] == ROOT) == 1 && dim(obj[[i]]$edge)[1] > : <br /> missing value where TRUE/FALSE needed<br /><br />really I tried, but it did not work. May I send you my tree? <br /><br />Thank you!Sarahttps://www.blogger.com/profile/02695102347867191792noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-48490183441085579672014-06-06T00:57:10.650-04:002014-06-06T00:57:10.650-04:00Hi Roos.
I don't recognize that error message...Hi Roos.<br /><br />I don't recognize that error message. You are welcome to try emailing me your tree file. Alternatively, you might post your question to the R-sig-phylo email list.<br /><br />All the best, LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-92220160544653985442014-06-05T11:10:18.124-04:002014-06-05T11:10:18.124-04:00Dear liam,
Thank you for your reaction.
But with ...Dear liam,<br /><br />Thank you for your reaction.<br />But with read.tree function i still get an error.<br />Error in if (sum(obj[[i]]$edge[, 1] == ROOT) == 1 && dim(obj[[i]]$edge)[1]<br />: missing value where TRUE/FALSE needed <br />Even when i delete the parts you reccomended.<br />I dont know what to do.<br />-RoosAnonymoushttps://www.blogger.com/profile/08037785605669412494noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-26005854134644071112014-06-05T07:39:55.630-04:002014-06-05T07:39:55.630-04:00Hi Roos.
Did you first try to read it in with re...Hi Roos. <br /><br />Did you first try to read it in with read.tree from the ape package? read.newick is not intended to replace read.tree, it just may be able to read trees that are badly conformed in some way that cannot be read by read.tree. <br /><br />If, in fact, you need to use read.newick - you could check to see if the root edge has a branch length or node label. Search for ";" and remove everything between the laste ")" and the ";". Let us know if that works.<br /><br />- LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-61290316629893005262014-06-05T04:08:13.353-04:002014-06-05T04:08:13.353-04:00Hello Liam,
I am trying to reproduce this with my...Hello Liam,<br /><br />I am trying to reproduce this with my own newick file but it gets rejected everytime, and r does not visualize the problem. The file is pretty big so I dont know were to start.<br />Is there a way of easily checking your phylofile? Sorry I am very new to this.<br />I hope you can help me.<br /><br />Sincerely <br />Roos<br />Anonymoushttps://www.blogger.com/profile/08037785605669412494noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-35457368399623811492014-03-14T00:05:06.626-04:002014-03-14T00:05:06.626-04:00Hi Angelica.
If you send me your tree file I can t...Hi Angelica.<br />If you send me your tree file I can try & troubleshoot - otherwise it's hard to say as I do not recognize that error message.<br />-- LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-488119539192230962014-03-13T18:20:47.399-04:002014-03-13T18:20:47.399-04:00Hello Liam.
I am trying to read my tree in R, and ...Hello Liam.<br />I am trying to read my tree in R, and I got the message that you described above. I tried your code using "read.newick" and then I collapsed the singletons using your script. I thought that it would work, but I got another ERR message when I try to plot my tree "Error in .nodeDepthEdgelength(Ntip, Nnode, z$edge, Nedge, z$edge.length) : <br /> NA/NaN/Inf in foreign function call (arg 6)" <br />Not sure what I am doing wrong because I have run this script before on other trees and I had no problem at all. Any help would be very welcome!Anonymoushttps://www.blogger.com/profile/12542307138729646539noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-71119509386478423492014-02-04T09:38:55.891-05:002014-02-04T09:38:55.891-05:00Holy Cow... had a large tre that I was having fits...Holy Cow... had a large tre that I was having fits with. your script did the trick!!! Many thanks...<br /><br />StephenStephenhttps://www.blogger.com/profile/13581528795085224826noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-48517345686017122862014-02-03T18:00:58.230-05:002014-02-03T18:00:58.230-05:00Hi Liam--I just wanted to shake your virtual hand ...Hi Liam--I just wanted to shake your virtual hand for the incredible help your scripts have been. No reply necessary.<br /><br />AdamAdamhttp://www.earthskysea.orgnoreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-91347382169062311322013-11-29T15:53:56.892-05:002013-11-29T15:53:56.892-05:00Thanks for the script! I helped deal with all of t...Thanks for the script! I helped deal with all of the Picante R issues with my tree with lots of singleton nodes (common issue if working with tropical forest data). I can finally run the various phylodiversity metrics. Yay. Melissa Whitmanhttp://melissawhitman.weebly.comnoreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-20130447977072156602013-09-18T16:03:56.173-04:002013-09-18T16:03:56.173-04:00Send it to me by email & I'll see if I can...Send it to me by email & I'll see if I can figure out the problem getting it into R. LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-69224726859116623582013-09-18T15:51:34.294-04:002013-09-18T15:51:34.294-04:00I'm sure it has singletons, the tree descripti...I'm sure it has singletons, the tree description implies it is simple text<br />file size: 65 KB, MIME type: text/plain<br /><br />Looking through the file it seems very standard, so I cannot spot a problem with the tree. Mesquite didn't have issues with it so I'll guess a I'll save it in a different format?Rosanahttps://www.blogger.com/profile/05017413675490511626noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-77541702947108173822013-09-18T15:39:17.610-04:002013-09-18T15:39:17.610-04:00Hi Rosana.
This looks like a nexus format tree wi...Hi Rosana.<br /><br />This looks like a nexus format tree with singletons. read.newick handles singletons, but only in plain Newick (i.e., phylip) format. Is that correct?<br /><br />- LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-13021470315499862842013-09-18T15:28:09.606-04:002013-09-18T15:28:09.606-04:00Hi Dr. Revell,
I was having the same issue with re...Hi Dr. Revell,<br />I was having the same issue with read.nexus() from ape. However, I'm trying to use <br />read.newick() and it is getting stuck. <br />The tree I'm using can be found here<br />http://www.evoio.org/wiki/Phylotastic/Use_Cases<br /><br />It is the APG angiosperm Phylomatictree.nex. I can open it in Mesquite, but when I'm in R I'm getting stuck<br />angiosperm.tree<-read.newick(file = "Phylomatictree.nex")<br /><br />Read 1610 items<br />And you can see it running but never ending. Since I can't see any error, do you have any idea of what is happening? Thanks!Rosanahttps://www.blogger.com/profile/05017413675490511626noreply@blogger.com