Thank you again for all the help in my previous issue. I am interested in examining if the TripL distance between two trees is significantly different from a set of random trees. I was using the rmtree() function in ape() R package to generate random trees, and was wondering if the current way of using TripL() is correct? Any suggestions would be helpful!
code used-
Ptree1 <- read.tree("hosttree-treponemacog0016.nwk")
d<-data.frame(label=Ptree1$tip.label)
nRep=10
randomtrees<-rmtree(nRep, nrow(d), rooted = TRUE, tip.label = Ptree1$tip.label, br = runif) ##generate a random rooted tree with branch lengths
randomDists<-sapply(randomtrees,TripL,x=Ptree1)
##expectedCID <- mean(randomDists)
dist12 <- TripL(Ptree1, Ptree2) ##TripL on two original trees
##comparing the random and original tree distances
nThisSimilar <- sum(randomDists < dist12)
pValue <- nThisSimilar / nRep
Hey @ArtPoon lab
Thank you again for all the help in my previous issue. I am interested in examining if the TripL distance between two trees is significantly different from a set of random trees. I was using the
rmtree()
function inape()
R package to generate random trees, and was wondering if the current way of usingTripL()
is correct? Any suggestions would be helpful!code used-
What do you think?