Bootstrapping in ape: How to properly use prop.part() and prop.clades() functions to get clade count

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bootstrapping in ape: How to properly use prop.part() and prop.clades() functions to get clade count

ikram
I have a set of 1000 rooted bootstrap trees (lets call it bsTrees) which consists of 8 unique trees (determined using unique.multiPhylo(bsTrees) in R.

I compute the bootstrap values using following code (copied from boot.phylo).

pp <- prop.part(bsTrees)
ans <- prop.clades(phy, part = pp, rooted = T)   # phy is the tree containing bootstrap values  
plot(phy)
nodelabels(ans)

This produces the following



But when I show the clade counts, which is given below, something seems fishy.

> pp
1: A
2: B
3: C
4: D
5: E
6: G
==> 1000 time(s):[1] 1 2 3 4 5 6
==> 1000 time(s):[1] 1 2 3 4 5
==> 972 time(s):[1] 2 3 4 5
==> 573 time(s):[1] 2 3
==> 997 time(s):[1] 4 5
==> 144 time(s):[1] 2 4 5
==> 260 time(s):[1] 3 4 5
==> 28 time(s):[1] 1 3 4 5
==> 20 time(s):[1] 1 4 5
==> 3 time(s):[1] 1 3
==> 2 time(s):[1] 2 3 5
==> 1 time(s):[1] 3 5

I think (please correct me if I am wrong) that we can't have 1000 for the clade (1 2 3 4 5) since the (1 3 4 5) clade also occurs 28 times. Similary 1, i.e., A, also occurs in two other clades. This means that we can have at most (1000-(28+20+3) = 949) count for the clade (1 2 3 4 5). Is this right? Am I using the wrong function (or with wrong parameters)? Thanks in advance for guidance.

For reference, here is one of the tree (out of 8 unique trees) which occurs 20 times out of 1000, and has A as sibling to only D and E.


Reply | Threaded
Open this post in threaded view
|

Re: Bootstrapping in ape: How to properly use prop.part() and prop.clades() functions to get clade count

ikram
My bad! I missed a very basic premise that clade count doesn't (and shouldn't) take the order into account, i.e. (1,2,3,4,5) is same as (1,3,5,4,2) and so one. This means that (1,4,5) and (1,3) are subsets of (1,2,3,4,5), and "obviously" (1,3) isn't a subset of (1,4,5).