Dave,

I�ve had the same trouble with shuffling. However, all of this can be avoided 
if you specify the simple format for your .con file in the mrBayes block.

sumt conformat = simple;

The resulting tree will correctly display posterior probabilities in a 
phyloformat tree.

Graham



------------------------------------------------------------
Graham Slater
Peter Buck Post-Doctoral Fellow
Department of Paleobiology
National Museum of Natural History
The Smithsonian Institution [NHB, MRC 121]
P.O. Box 37012


(202) 633-1316
slat...@si.edu<mailto:slat...@si.edu>
www.fourdimensionalbiology.com<http://www.fourdimensionalbiology.com>





On Oct 3, 2014, at 10:42 AM, David Bapst 
<dwba...@gmail.com<mailto:dwba...@gmail.com>> wrote:

Hello all,

Recently, I wanted to display posterior probabilities on a 50%
compatibility tree from a MrBayes run, created with the 'sumt'
command. I looked around for ways to do this and found this email
thread from last year:

https://stat.ethz.ch/pipermail/r-sig-phylo/2013-June/002825.html

...which suggests using read.annotated.nexus() in package epibase,
which has been renamed OutbreakTools more recently.

Unfortunately, it appears read.annotated.nexus in OutbreakTools
(v0.1-11, in R 3.1.1) improperly creates the new edge matrix,
resulting in an apparent shuffling of tip labels. As this function was
discussed on R-Sig-Phylo, I am sending this bug report to both the
list and to the package maintainer (Thibaut J.).

I don't have any BEAST output files, so I cannot test if this occurs
with files that are not created by MrBayes.

To show this phenomen, I have created an example .con.tre file using
an example matrix of standard characters for several elephants that I
stole off of Joe F.'s website. You can find the .con.tre file here on
gdrive:

https://drive.google.com/file/d/0B_xvEcEvKno_LTFhSVJrdHMtNFU/view?usp=sharing

And now in R, a comparison with a tree:

library(OutbreakTools)
library(ape)

tree1<-read.nexus("mat.nex.con.tre")
tree2<-read.annotated.nexus("mat.nex.con.tre")

layout(1:2)
plot(tree1,no.margin=TRUE)
plot(tree2,no.margin=TRUE)

identical(tree1$tip.label,tree2$tip.label)
identical(tree1$edge.length,tree2$edge.length)
identical(tree1$edge,tree2$edge)

Inspection of the tree file with FigTree suggests that the ape
function is producing the correct tree and the OutbreakTools function
is not. We can see the why with last three lines in the console:

identical(tree1$tip.label,tree2$tip.label)
[1] TRUE
identical(tree1$edge.length,tree2$edge.length)
[1] TRUE
identical(tree1$edge,tree2$edge)
[1] FALSE

Closer inspection suggests that the issue appears to be that some
terminal edges are inappropriately shuffled, thus shuffling the
terminal tip labels on those edges, while leaving the tip.label order
and the edge lengths the same. Also, larger trees seem to produce
larger inconsistencies in the tree produced.

So... now for the list, are there any other methods on CRAN for
obtaining the posterior probabilities from a .con.tre file? Otherwise,
next I guess I'll be trying phyloch.

Cheers,
-Dave

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


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

Reply via email to