Dear Klaus & Emmanuel,

Thank you for your fast answers. Both work!
There still is a deviation at the level of the consensus tree from Phylip, but my technical problem has been solved.
Best wishes,
Thomas
======================
# the script below uses the list of trees ("example_trees.tre") from
# http://evolution.genetics.washington.edu/phylip/doc/consense.html

tr=read.tree(file="example_trees.tre")
ct=consensus(tr,p=0.5)
sv=prop.clades(ct,tr)

# using phangorn
library(phangorn)
# adds support values as node.label
ct=plotBS(ct, tr)

plot(ct,show.node.label=TRUE, type="phylogram")
nodelabels(sv,frame="none", adj=c(-1,-1),col="red")
=========================

On 12/16/13 16:37, Emmanuel Paradis wrote:
Hi Thomas,

Have you tried prop.clades?

Best,

Emmanuel
-----Original Message-----
From: Thomas Manke <ma...@ie-freiburg.mpg.de>
Sender: r-sig-phylo-boun...@r-project.org
Date: Mon, 16 Dec 2013 11:52:33
To: <r-sig-phylo@r-project.org>
Subject: [R-sig-phylo] plotting support value

Dear Forum,
I have a list containing sampled trees for the same "taxa" and would
like to plot their consensus tree
with the support values (absolute numbers or frequencies) for the
various branches.
(as done by the Consense program of the Phylip suite)

I understand that boot.phylo() returns an object "bs" that contains such
information as bs$BP.
My scenario is similar, but the sampled trees are not based on sequence
information and boot.phylo()
is not applicable here.

I assume the support values can be obtained from prop.part(), but I
could not figure how.
Thank you for any help or suggestions,
Thomas

#tr is list of trees
ct<-consensus(tr, p=0.5)  # majority consensus
pt<-prop.part(tr)
pc<-prop.part(ct)

# calculate support values
sv <- f(pc, pt) = ???

plot(ct);  nodelabels(sv)

_______________________________________________
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