Hi Guangchuang, I'm not certain this solves Roger's issue of needing to plot a sampled-ancestor tree; or at least, if you have implemented that feature, I cannot find it in the documentation.
So, assuming there is nothing in BEAST output that labels ancestors as ancestors other than their zero-length terminal edge length, here's a short example of plotting a tree with such 'ancestors'. library(ape) library(ggtree) set.seed(4) x<-rtree(10) #make some artificial ancestors x$edge.length[c(2,6,10,18)]<-0 plot.phylo(x) ggtree(x) As far as I can tell, ggtree only plots the zero-length branches as bifurcations ending in zero-length edges, rather than placing them on the edges leading to their sisters, just as ape's plot.phylo does. Am I missing a functionality in ggtree? I apologize for my confusion. Cheers, -Dave Bapst On Thu, Dec 10, 2015 at 4:42 AM, Yu, Guangchuang <g...@connect.hku.hk> wrote: > Dear Roger, > > ggtree can parse BEAST output and visualize BEAST statistics, see the > document: > http://www.bioconductor.org/packages/3.2/bioc/vignettes/ggtree/inst/doc/ggtree.html#annotating-tree-with-beast-output > > Bests, > Guangchuang > > > On Thu, Dec 10, 2015 at 7:00 PM, <r-sig-phylo-requ...@r-project.org> wrote: > >> Send R-sig-phylo mailing list submissions to >> r-sig-phylo@r-project.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo >> or, via email, send a message with subject or body 'help' to >> r-sig-phylo-requ...@r-project.org >> >> You can reach the person managing the list at >> r-sig-phylo-ow...@r-project.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of R-sig-phylo digest..." >> >> >> Today's Topics: >> >> 1. Re: Plotting sampled-ancestor trees in R (Roger Close) >> 2. Implementation of Mir et al.'s (2013) tree balance index? >> (Gabriel Yedid) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Wed, 9 Dec 2015 15:50:11 +0000 >> From: Roger Close <roger.cl...@gmail.com> >> To: David Bapst <dwba...@gmail.com> >> Cc: R Sig Phylo Listserv <r-sig-phylo@r-project.org> >> Subject: Re: [R-sig-phylo] Plotting sampled-ancestor trees in R >> Message-ID: >> <CAFauv= >> ubz3yncju8j+jgpxpfop0na4yy_3o7bayd7csxbvf...@mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi Dave, Emmanuel and Joseph, >> >> Thanks very much for your suggestions. The output of BEAST, at least, is an >> ordinary Newick/NEXUS file with ancestors represented as tips on the ends >> of zero-length branches (see attached). >> >> One way to proceed would be to drop the tips that correspond to ancestors >> and then add them back on using edge labels. However, I see that paleotree >> designates ancestors using $anag.tips; is there a tool for plotting this >> type of tree? >> >> Cheers, >> Roger >> >> >> >> --- >> Roger Close, Postdoctoral Research Associate >> Department of Earth Sciences, Oxford University >> South Parks Road >> Oxford OX1 3AN >> United Kingdom >> >> On 8 December 2015 at 18:56, David Bapst <dwba...@gmail.com> wrote: >> >> > Hi Roger, >> > >> > I'm not aware of any existing solution. Could you send around a small >> > example of the data format of an output sampled ancestor tree from >> > BEAST or MrBayes? Are they just typical Newick/NEXUS format with >> > ancestors indicated tipis with zero-length branches or something more >> > complicated? >> > >> > Remarkably I've not looked at the formatting of one, but obviously >> > plotting SA trees is something the community will need in the near >> > future. >> > >> > Cheers, >> > -Dave >> > >> > On Tue, Dec 8, 2015 at 5:46 AM, Roger Close <roger.cl...@gmail.com> >> wrote: >> > > Hi all, >> > > >> > > Does anyone know of a way to plot sampled-ancestor trees in R such that >> > > ancestors lie on branches, rather than being zero-length terminals that >> > > follow a bifurcation? >> > > >> > > Many thanks, >> > > Roger >> > > >> > > --- >> > > Roger Close, Postdoctoral Research Associate >> > > Department of Earth Sciences, Oxford University >> > > South Parks Road >> > > Oxford OX1 3AN >> > > United Kingdom >> > > >> > > [[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/ >> > >> > >> > >> > -- >> > David W. Bapst, PhD >> > Adjunct Asst. Professor, Geology and Geol. Eng. >> > South Dakota School of Mines and Technology >> > 501 E. St. Joseph >> > Rapid City, SD 57701 >> > >> > http://webpages.sdsmt.edu/~dbapst/ >> > http://cran.r-project.org/web/packages/paleotree/index.html >> > >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> https://stat.ethz.ch/pipermail/r-sig-phylo/attachments/20151209/47c627ad/attachment-0001.html >> > >> -------------- next part -------------- >> A non-text attachment was scrubbed... >> Name: sa.tree.tre >> Type: application/octet-stream >> Size: 1919 bytes >> Desc: not available >> URL: < >> https://stat.ethz.ch/pipermail/r-sig-phylo/attachments/20151209/47c627ad/attachment-0001.obj >> > >> >> ------------------------------ >> >> Message: 2 >> Date: Thu, 10 Dec 2015 15:50:52 +0800 >> From: Gabriel Yedid <gyedi...@gmail.com> >> To: r-sig-phylo <r-sig-phylo@r-project.org> >> Subject: [R-sig-phylo] Implementation of Mir et al.'s (2013) tree >> balance index? >> Message-ID: >> <CAD= >> v+xfxrpyofojk6q_77v22dg1lwc-s248xoj-xzw0sgur...@mail.gmail.com> >> Content-Type: text/plain; charset=UTF-8 >> >> Hello all, >> >> Is there any R implementation yet of the tree balance metric described in: >> >> >> Mir, Arnau, Francesc Rossell?, and Lidia Rotger. "A new balance index >> for phylogenetic trees." Mathematical biosciences 241.1 (2013): >> 125-136. >> >> >> cheers, >> >> Gabe >> >> >> >> ------------------------------ >> >> Subject: Digest Footer >> >> _______________________________________________ >> R-sig-phylo mailing list >> R-sig-phylo@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo >> >> ------------------------------ >> >> End of R-sig-phylo Digest, Vol 95, Issue 6 >> ****************************************** >> > > > > -- > --~--~---------~--~----~------------~-------~--~----~ > Guangchuang Yu, PhD Candidate > State Key Laboratory of Emerging Infectious Diseases > School of Public Health > The University of Hong Kong > Hong Kong SAR, China > www: http://guangchuangyu.github.io > -~----------~----~----~----~------~----~------~--~--- > > [[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/ -- David W. Bapst, PhD Adjunct Asst. Professor, Geology and Geol. Eng. South Dakota School of Mines and Technology 501 E. St. Joseph Rapid City, SD 57701 http://webpages.sdsmt.edu/~dbapst/ http://cran.r-project.org/web/packages/paleotree/index.html _______________________________________________ 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/