Wonderful!

Thank  you so much, Liam. That's perfect (also for plotSimmap).
I'll gist the code in a couple of days.

Best,

Giulio Valentino Dalla Riva

PhD @ Biomathematics Research Centre
Room 523 - Erskine Building
University of Canterbury
Christchurch - New Zealand

phone: +64 3 364 2987 ext 4869

________________________________________
From: Liam J. Revell <liam.rev...@umb.edu>
Sent: Wednesday, 6 January 2016 12:37 p.m.
To: Giulio V. Dalla Riva; r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] plot trees distribution

Hi Giulio.

You could try something like:

trees<-read.nexus("Wayqecha.tree")
trees<-read.tree(text=write.tree(trees))
plotTree(trees[[1]],color=rgb(0,0,1,0.05),ftype="i")
par(fg="transparent")
for(i in 2:length(trees)) plotTree(trees[[i]],
        tips=setNames(1:Ntip(trees[[1]]),trees[[1]]$tip.label),
        color=rgb(0,0,1,0.05),add=TRUE,ftype="i")
par(fg="black")

which has the effect of rescaling all the trees to have the same total
depth. It may be possible to circumvent this using xlim - I'd have to
check. This is similar to densiTree (I believe) in phangorn.

If you want to use plotSimmap, you can just substitute plotSimmap and
use a named vector of colors - however you should still generate the
colors with transparency using rgb.

Let us know if this is what you had in mind.

All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 1/5/2016 7:01 PM, Giulio V. Dalla Riva wrote:
> Dear Everybody,
>
>
> I have a list of phylogenies downloaded from the wonderful birdtree.org
> (in fact, it's a multiPhylo object) that I want to plot.
>
>
> The idea is obtain a representation of the empirical distribution of the
> phylogenies, in a graphical style similar to the
> phytools::fancyTree(type = "phenogram95") representation of the
> ancestral state reconstruction of a continuous character (see the fourth
> plot in http://www.phytools.org/eqg/Exercise_5.2/):
>
> plot of chunk unnamed-chunk-6
>
>
> In my case I would like to overlap each tree in the list, in some nice
> way. I can ladderize the first tree and use the produced tip order for
> all the other trees. This should (at least in my mind) produce an
> immediate representation of the metric and topological variance present
> in the list (which, in my case, is reasonably little).
>
>
> I could just compute a bootstrap, and plot support values on the splits.
> But it's not the same.
>
>
> I thought to remember there was a builtin function in some package, but
> I may be wrong.
>
> I have attached the nexus file for reference (this is a 100 trees,
> usually we would have 1000 or more).
>
>
> Best wishes,
>
>
> Giulio Valentino Dalla Riva
>
> P.S. A bonus point if anybody proposes a solution that works
> with|plotSimmap| for painted trees.
>
> PhD @ Biomathematics Research Centre
> Room 523 - Erskine Building
> University of Canterbury
> Christchurch - New Zealand
>
> phone: +64 3 364 2987 ext 4869
>
>
> _______________________________________________
> 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/
>

_______________________________________________
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/

Reply via email to