# How are the values of prop.part() and prop.clades() calculated?

Consider the following dataset:

fictional.df <- data.frame(L1 = c(0,0,0,0,0,0,0,0),
L2 = c(0,1,0,0,0,1,1,0),
L3 = c(1,1,0,1,1,1,1,1),
L4=c(0,0,1,1,0,0,0,0))


I converted this to a phyDat object and then created a pairwise distance matrix as follows:

fictional.phydat <- as.phyDat(fictional.df,
type="USER",levels=c("1","0"),
names=names(fictional.df))
fictional.hamming <- dist.hamming(fictional.phydat)


From this distance matrix, I then estimated a UPGMA tree:

fictional.upgma <- upgma(fictional.hamming)


I then created bootstrap datasets:

set.seed(187)
fictional.upgma.bs <- bootstrap.phyDat(fictional.phydat, FUN =
function(xx) upgma(dist.hamming(xx)), bs=100)


I then calculated the proportion of partitions in the bootstrap set:

upgma.bs.part <- prop.part(fictional.upgma.bs)


So far so good. Here is where I would appreciate some help. When I call the function prop.clades, I do not understand the result:

prop.clades(fictional.upgma,fictional.upgma.bs)
[1] 100  NA  71


Why does this function return NA when there is evidence for that clade in the set of bootstrap trees?

A second question:

prop.clades(fictional.upgma,part=upgma.bs.part)
[1] 100  49 112


If there are only 100 bootstrap samples, why is the value for the final clade 112?

• Remember that you can access the code of each function by just typing the name of the function without parenthesis (prop.clades). I couldn't figure out what it is doing, but I don't know much about trees and you could probably understand better the code – llrs Nov 17 '18 at 12:23
• prop.clades counts the number of times the bipartitions present in phy are present in a series of trees given as ... or in the list previously computed and given with part. – Michael G. Dec 28 '18 at 21:29