Hi Brian,

I'll fix that. For this particular small example ladderize() works.

mixedFontLabel() produces non-standard labels, so not all functions will handle 
them correctly. If possible, it is better to use it just before plotting.

Best,

Emmanuel
-----Original Message-----
From: Brian Bourke <brianbou...@hotmail.com>
Sender: r-sig-phylo-boun...@r-project.org
Date: Thu, 26 May 2011 21:20:01 
To: <r-sig-phylo@r-project.org>
Subject: [R-sig-phylo] mixedFontLabel and rotation


Dear All


I am using the "mixedFontLabel" function and when i rotate clades the labels 
reappear unformatted:





library(ape)


tr <- read.tree(text = "((a,(b,c)),d);")


genus <- c("Gorilla", "Pan", "Homo", "Pongo")


species <- c("gorilla", "spp.", "sapiens", "pygmaeus")


geo <- c("Africa", "Africa", "World", "Asia")


tr$tip.label <- mixedFontLabel(genus, species, geo, italic = 1:2, parenthesis = 
3)


plot(tr)


nodelabels()





x11()


tre.new <- rotate(tr, 6)


plot(tre.new)


nodelabels()





Any ideas how can I keep the original format?





Cheers, 
Brian.






> Date: Thu, 26 May 2011 16:03:06 +0700
> From: emmanuel.para...@ird.fr
> To: brianbou...@hotmail.com
> CC: r-sig-phylo@r-project.org
> Subject: Re: [R-sig-phylo] Displaying branch support after rooting
> 
> Hi Brian,
> 
> I don't see an automatic and easy way to do this. If you want edit your 
> tree manually, you can try:
> 
> plot(rooted)
> nodelabels(rooted$node.label)
> nodelabels(adj=c(.5, -1), bg="yellow")
> 
> This shows the edges that have been "reversed" during rooting (those 
> between the new root and the old one which has an empty string as 
> label). The number on the yellow background may help you reorder 
> manually the vector rooted$node.label.
> 
> With respect to the ape's FAQ you mention below, this solves this 
> problem because, in this case, the rooting operation is done before 
> calculating the support values (which cannot be done in your case).
> 
> Cheers,
> 
> Emmanuel
> 
> Brian Bourke wrote on 26/05/2011 01:26:
> > 
> > Hi Emmanuel
> > Yes, the branch support values are indeed associated with the same nodes 
> > in both trees. However, although the node "branch support value" refers 
> > to the basal branch leading to the node in the original tree, this is 
> > likely not the case for all nodes/branches after rooting. Consequently, 
> > as in my rooted example, some node "branch support values" may refer to 
> > branches leading from the node, whereas others refer to branches leading 
> > to the node. Any way I can position these node "branch support values" 
> > to the correct branches in the rooted tree?
> > 
> > Cheers,
> > Brian.
> > 
> >  > Date: Wed, 25 May 2011 11:52:28 +0700
> >  > From: emmanuel.para...@ird.fr
> >  > To: brianbou...@hotmail.com
> >  > CC: r-sig-phylo@r-project.org
> >  > Subject: Re: [R-sig-phylo] Displaying branch support after rooting
> >  >
> >  > Hi Brian,
> >  >
> >  > They look the same for me. Maybe it's easier to see this using the
> >  > default values of nodelabels():
> >  >
> >  > > plot(tree)
> >  > > nodelabels(tree$node.label)
> >  > > x11()
> >  > > plot(rooted)
> >  > > nodelabels(rooted$node.label)
> >  >
> >  > Best,
> >  >
> >  > Emmanuel
> >  >
> >  > Brian Bourke wrote on 23/05/2011 23:44:
> >  > > Hi Emmanuel
> >  > > I've done as you said but the positions of the branch support 
> > values in the rooted tree remain a problem eg
> >  > >
> >  > > library(ape)
> >  > > ## original tree
> >  > > tree <- read.tree(text = 
> > "(1:0.013072,2:0.005026,3:0.005003,(4:0.007930,5:0.002958)0.84:0.006529,((((6:0.013338,7:0.004297)1.00:0.055567,8:0.015843)1.00:0.085079,((9:0.002101,10:0.002712)1.00:0.021767,11:0.058400)1.00:0.035042)0.96:0.025134,12:0.004262)0.81:0.008434);")
> >  > > plot(tree)
> >  > > nodelabels(tree$node.label, bg = "white", adj = c(1.1,1.5), frame = 
> > "none", cex = 0.8)
> >  > > ## rooted tree
> >  > > rooted<- root(tree, 6:8)
> >  > > plot(rooted)
> >  > > nodelabels(rooted$node.label, bg = "white", adj = c(1.1,1.5), frame 
> > = "none", cex = 0.8)
> >  > >
> >  > >
> >  > > In the rooted tree you can see that some support values are in the 
> > wrong places. You mention a solution to this problem in your FAQ page 
> > using the boot.phylo function. However, as I am using consensus tree 
> > outputs from MrBayes, is there an alternative solution to this problem?
> >  > >
> >  > > Regards,
> >  > > Brian.
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > > [[alternative HTML version deleted]]
> >  > >
> >  > > _______________________________________________
> >  > > R-sig-phylo mailing list
> >  > > R-sig-phylo@r-project.org
> >  > > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> >  > >
> >  >
> >  > --
> >  > Emmanuel Paradis
> >  > IRD, Jakarta, Indonesia
> >  > http://ape.mpl.ird.fr/
> 
> -- 
> Emmanuel Paradis
> IRD, Jakarta, Indonesia
> http://ape.mpl.ird.fr/
                                          
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to