Hi Josh,

The problem with prop.part() is that is actually counts clades from each node assuming the tree is rooted, and not splits. So for a tree with the tip labels A, B ... E, the clades {A,B,C} and {D,E} will be counted seperately, even though if the tree is unrooted they represent the same split. We are working on this to make it more consistent and more efficient. In the meantime, rooting all trees with the same outgroup beforehand is probably the best thing to do (it's mentioned in ape's FAQ).

Cheers,

Emmanuel

Joshua Der wrote on 27/10/2011 01:27:
Hi Everyone,

I seem to have found a problem with prop.clades when the tree for which
I want to calculate bipartition frequencies has tip labels in a
different order from bootstrap trees from which I want to extract
information. The bipartition frequency for backbone nodes is 0, when it
should be close to 100. Subtrees with similar tip.labels shared between
the main tree and the bootstrap trees seem to report the frequencies
just fine.

I am using R version 2.13.2 (2011-09-30) with R.app GUI 1.42 (5910)
x86_64-apple-darwin9.8.0. I experienced this problem in ape v 2.7-3 and
it persists after I updated to v 2.8.

I have attached the trees and have included a code snippet below that
shows the problem:

    library(ape)
    # load the trees
    ml.tree <- read.tree("ml_tree.tre") # a maximum likelihood tree, rooted
    bs.trees <- read.tree("bs_trees.tre") # parsimony starting for
    bootstrap reps, unrooted
    # Compute the bipartition frequencies in ml.tree from trees in bs.trees
    # This returns 0 for supported backbone clades where the tip.labels
    are in conflict
    prop.clades(ml.tree, bs.trees)
    # I tried to force check.labels, but this returns the same value
    prop.clades(ml.tree, part = prop.part(mp.trees, check.labels = TRUE) )
    # I used root to change the order of the tip.labels to come close to
    the ml tree:
    for(i in 1:length(bs.trees)){
    bs.trees[[i]] <- root(bs.trees[[i]], "Selmo")
    }
    # Fixed (I think), but it would be good to add support for
    check.labels in prop.clades
    prop.clades(ml.tree, bs.trees)


If anyone knows of a better way to re-arrange tip labels, constrained by
topology, then I would love to hear it.

Thanks,
Josh

--
Emmanuel Paradis
IRD, Jakarta, Indonesia
http://ape.mpl.ird.fr/

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

Reply via email to