# NOT RUN {
tree1 <- TreeTools::BalancedTree(6)
tree2 <- TreeTools::PectinateTree(6)
# SPR distance
USPRDist(tree1, tree2)
# Replug distance
ReplugDist(tree1, tree2)
ReplugDist(tree1, tree2, maf = TRUE)
# TBR distance between two trees
TBRDist(tree1, tree2, exact = TRUE)
# Compare a list against one tree, using approximate distances
TBRDist(list(tree1, tree2), tree2, exact = FALSE)
# Compare all pairs in two lists
TBRDist(list(tree1, tree2), list(tree1, tree2, tree2), allPairs = TRUE,
exact = FALSE)
# Compare each tree in a list against each other
TBRDist(list(one = tree1, two = tree2, twoAgain = tree2))
# Compare each pair in two lists
TBRDist(list(tree1, tree2, tree2),
list(tree2, tree1, tree2),
exact = TRUE, approximate = TRUE, countMafs = TRUE)
# Capture maximum agreement forests
mafs <- capture.output(TBRDist(tree1, tree2, approximate = FALSE,
printMafs = TRUE))
head(mafs)
MAFInfo(tree1, tree2)
MAFInfo(list(tree2, tree1), list(tree1, tree2))
# }
Run the code above in your browser using DataLab