diff --git a/DESCRIPTION b/DESCRIPTION
index 900c160..1cfc929 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
Package: treespace
Title: Statistical Exploration of Landscapes of Phylogenetic Trees
-Date: 2023-04-03
-Version: 1.1.4.2
+Date: 2023-09-07
+Version: 1.1.4.3
Authors@R: c(TJ = person("Thibaut", "Jombart", email="thibautjombart@gmail.com", role = "aut", comment = c(ORCID = "0000-0003-2226-8692")),
MK = person("Michelle", "Kendall", email="michelle.kendall@warwick.ac.uk", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-7344-7071")),
JAG = person("Jacob", "Almagro-Garcia", role = "aut", comment = c(ORCID = "0000-0002-0595-7333")),
@@ -11,12 +11,12 @@ Description: Tools for the exploration of distributions of phylogenetic trees.
treespaceServer().
For further details see Jombart et al. (2017) The function The function We can also add tree labels to the plot. Where these overlap, the
+ We can also add tree labels to the plot. Where these overlap, the
user can use “drag and drop” to move them around for better
visibility. Alternatively, where labels are too cluttered, it may be preferable
+ Alternatively, where labels are too cluttered, it may be preferable
not to plot them but to make the tree names available as tooltip text
instead: The scree plot is available as part of the The scree plot is available as part of the There appear to be clusters of tree topologies within the BEAST
+ There appear to be clusters of tree topologies within the BEAST
trees. We can use the function To understand the differences between the representative trees we can
+ To understand the differences between the representative trees we can
use treespace worked example: Dengue trees
Michelle
Kendall, Thibaut Jombart
- 2023-04-03
+ 2023-09-07
Source: vignettes/DengueVignette.Rmd
DengueVignette.Rmd
Using treespace to compare tr
# simple plot:
plotGrovesD3(Dscape$pco, groups=Dtype)
-plotGrovesD3
produces interactive d3 plots
+plotGrovesD3
produces interactive d3 plots
which enable zooming, moving, tooltip text and legend hovering. We now
refine the plot with colour-blind friendly colours (selected using ColorBrewer2), bigger points,
varying symbols and point opacity to demonstrate the NJ and ML trees,
@@ -232,7 +232,7 @@ Using treespace to compare tr
point_opacity=c(rep(0.4,400),1,1),
legend_width=80)
-
@@ -249,7 +249,7 @@
Using treespace to compare tr
point_opacity=c(rep(0.4,400),1,1),
legend_width=80)
@@ -266,7 +266,7 @@
Using treespace to compare tr
point_opacity=c(rep(0.4,400),1,1),
legend_width=80)
treespace
+treespace
output:
barplot(Dscape$pco$eig, col="navy")
Using tre
# simple plot:
plotGrovesD3(BEASTscape$pco)
-
findGroves
to identify
clusters:
@@ -426,7 +426,7 @@
Using tre
size_var = highlightTrees,
legend_width=0)
plotTreeDiff
again, for example:
# differences between the MCC tree and the median from the largest cluster:
diff --git a/docs/articles/TransmissionTreesVignette.html b/docs/articles/TransmissionTreesVignette.html
index b0b1bb1..dcad92e 100644
--- a/docs/articles/TransmissionTreesVignette.html
+++ b/docs/articles/TransmissionTreesVignette.html
@@ -33,7 +33,7 @@
treespace worked example: Transmission
Michelle
Kendall
- 2023-04-03
+ 2023-09-07
Source: vignettes/TransmissionTreesVignette.Rmd
TransmissionTreesVignette.Rmd
ExamplesThis can be easily visualised as a transmission chain using graph
plotting packages such as igraph or visNetwork:
-library(igraph)
+library(igraph)
# set plotting options:
-igraph_options(vertex.size=15,
+igraph_options(vertex.size=15,
vertex.color="cyan",
vertex.label.cex=2,
edge.color="lightgrey",
edge.arrow.size=1)
-tree1graph <- graph_from_edgelist(tree1)
+tree1graph <- graph_from_edgelist(tree1)
plot(tree1graph)
Applying the function findMRCIs
gives the following:
-tree2graph <- graph_from_edgelist(tree2)
+tree2graph <- graph_from_edgelist(tree2)
plot(tree2graph)
@@ -222,7 +222,7 @@Comparing three simple trees## [4,] 2 6 ## [5,] 6 5
-tree3graph <- graph_from_edgelist(tree3)
+tree3graph <- graph_from_edgelist(tree3)
plot(tree3graph)
Then we can use treespace functions to make the following @@ -387,7 +387,7 @@
The first one looks like this:
-medgraph <- graph_from_edgelist(combinedLists[[med$median[[1]]]])
+medgraph <- graph_from_edgelist(combinedLists[[med$median[[1]]]])
plot(medgraph)
vignettes/introduction.Rmd
introduction.Rmd
## Loading required package: ape
## Loading required package: ade4
+## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
+## which was just loaded, will retire in October 2023.
+## Please refer to R-spatial evolution reports for details, especially
+## https://r-spatial.org/r/2023/05/15/evolution4.html.
+## It may be desirable to make the sf package available;
+## package maintainers should consider adding sf to Suggests:.
+## The sp package is now running under evolution status 2
+## (status 2 uses the sf package in place of rgdal)
## Registered S3 methods overwritten by 'adegraphics':
## method from
## biplot.dudi ade4
@@ -192,7 +200,7 @@ Exploring trees with treespace<
We first load treespace, and the packages required for
graphics:
-
+
library("treespace")
library("adegenet")
library("adegraphics")
@@ -217,7 +225,7 @@ Exploring trees with treespace<
both the matrix of pairwise tree comparisons ($D
), and the
PCoA ($pco
). This can be illustrated using randomly
generated trees:
-
+
# generate list of trees
suppressWarnings(RNGversion("3.5.0"))
set.seed(1)
@@ -228,7 +236,7 @@ Exploring trees with treespace<
res <- treespace(x, nf=3)
names(res)
## [1] "D" "pco"
-
+
res
## $D
## tree1 tree2 tree3 tree4 tree5 tree6 tree7 tree8 tree9
@@ -264,11 +272,11 @@ Exploring trees with treespace<
## other elements: NULL
Pairwise tree distances can be visualised using
adegraphics:
-
+
# table.image
table.image(res$D, nclass=30)
-
+
# table.value with some customization
table.value(res$D, nclass=5, method="color",
symbol="circle", col=redpal(5))
@@ -278,22 +286,22 @@ Exploring trees with treespace<
any scatter plotting tool; here we use the treespace function
plotGroves
, based on the adegraphics function
scatter
:
-
+
plotGroves(res$pco, lab.show=TRUE, lab.cex=1.5)
Alternatively, plotGrovesD3
creates interactive plots
based on d3.js:
-
+
plotGrovesD3(res$pco, treeNames=1:10)
-Tree labels can be dragged into new positions to avoid problems such
+
Tree labels can be dragged into new positions to avoid problems such
as overlapping.
The functionality of treespace
can be further
illustrated using ape’s dataset woodmouse, from which
we built the 201 trees supplied in woodmiceTrees
using the
neighbour-joining and bootstrapping example from the ape
documentation.
-
+
data(woodmiceTrees)
wm.res <- treespace(woodmiceTrees,nf=3)
@@ -306,11 +314,11 @@ Exploring trees with treespace<
## 4 -13.6081 1.854 1.0947
## 5 2.1980 4.176 -3.1960
## 6 3.6013 4.865 2.9853
-
+
# plot results
plotGrovesD3(wm.res$pco)
-Packages such as adegraphics and ggplot2 can be
+
Packages such as adegraphics and ggplot2 can be
used to make alternative plots, for example visualising the density of
points within the space.
The treespace function multiDist
simply
@@ -341,7 +349,7 @@
Identifying clusters of trees
+
wm.groves <- findGroves(wm.res, nclust=6)
names(wm.groves)
## [1] "groups" "treespace"
@@ -350,20 +358,20 @@ Identifying clusters of trees?plotGrovesD3 for options):
-
+
# basic plot
plotGrovesD3(wm.groves)
-
+
# alternative with improved legend and tooltip text, giving the tree numbers:
plotGrovesD3(wm.groves, tooltip_text=paste0("Tree ",1:201), legend_width=50, col_lab="Cluster")
-
+
# plot axes 2 and 3. This helps to show why, for example, clusters 2 and 4 have been identified as separate, despite them appearing to overlap when viewing axes 1 and 2.
plotGrovesD3(wm.groves, xax=2, yax=3, tooltip_text=paste0("Tree ",1:201), legend_width=50, col_lab="Cluster")
-We can also plot in 3D:
-
+We can also plot in 3D:
+
# prepare a colour palette:
colours <- fac2col(wm.groves$groups, col.pal=funky)
plot3d(wm.groves$treespace$pco$li[,1],
@@ -371,8 +379,8 @@ Identifying clusters of treeswm.groves$treespace$pco$li[,3],
col=colours, type="s", size=1.5,
xlab="", ylab="", zlab="")
-
-
+
+
@@ -404,7 +412,7 @@ Finding median trees
+
# get first median tree
tre <- medTree(woodmiceTrees)$trees[[1]]
@@ -414,14 +422,14 @@ Finding median trees
+
# find median trees for the 6 clusters identified earlier:
res <- medTree(woodmiceTrees, wm.groves$groups)
# there is one output per cluster
names(res)
## [1] "1" "2" "3" "4" "5" "6"
-
+
# get the first median of each
med.trees <- lapply(res, function(e) ladderize(e$trees[[1]]))
@@ -433,12 +441,12 @@ Finding median trees
+
# Compare median trees from clusters 1 and 2:
plotTreeDiff(med.trees[[1]],med.trees[[2]], use.edge.length=FALSE,
treesFacing = TRUE, colourMethod = "palette", palette = funky)
-
+
# Compare median trees from clusters 1 and 4, and change aesthetics:
plotTreeDiff(med.trees[[1]],med.trees[[4]], type="cladogram", use.edge.length=FALSE,
treesFacing = TRUE, edge.width=2, colourMethod="palette", palette=spectral)
@@ -469,20 +477,20 @@ Emphasising the pla
and disagree on the placement of the
(1007S,1208S,0909S) clade, we can simply emphasise that
clade as follows:
-
+
wm3.res <- treespace(woodmiceTrees,nf=2,emphasise.tips=c("No1007S","No1208S","No0909S"),emphasise.weight=3)
# plot results
plotGrovesD3(wm3.res$pco)
-It can be seen from the scale of the plot and the density of
+
It can be seen from the scale of the plot and the density of
clustering that the trees are now separated into more distinct
clusters.
-
+
wm3.groves <- findGroves(woodmiceTrees,nf=3,nclust=6,emphasise.tips=c("No1007S","No1208S","No0909S"),emphasise.weight=3)
plotGrovesD3(wm3.groves)
-Conversely, where the structure of a particular clade is not of
+
Conversely, where the structure of a particular clade is not of
interest (for example, lineages within an outgroup which was only
included for rooting purposes), those tips can be given a weight less
than 1 so as to give them less emphasis in the comparison. We note that
@@ -527,19 +535,19 @@
Method: characterising a tree
\]
This is implemented as the function
treeVec
. For example,
-
+
# generate a random tree:
tree <- rtree(6)
# topological vector of mrca distances from root:
treeVec(tree)
## [1] 2 2 0 1 3 3 0 1 2 0 1 2 0 0 1 1 1 1 1 1 1
-
+
# vector of mrca distances from root when lambda=0.5:
treeVec(tree,0.5)
## [1] 1.2173 1.2173 0.0000 0.6927 2.2131 1.8866 0.0000 0.6927 1.2173 0.0000
## [11] 0.6927 1.2173 0.0000 0.0000 0.6927 0.5232 0.7638 0.6800 0.8382 0.6090
## [21] 0.5360
-
+
# vector of mrca distances as a function of lambda:
vecAsFunction <- treeVec(tree,return.lambda.function=TRUE)
# evaluate the vector at lambda=0.5:
@@ -553,7 +561,7 @@ Method: characterising a tree
d_\lambda(T_a, T_b) = || v_\lambda(T_a) - v_\lambda(T_b) ||.
\]
This can be found using treeDist
:
-
+
# generate random trees
tree_a <- rtree(6)
tree_b <- rtree(6)
@@ -561,7 +569,7 @@ Method: characterising a tree
# topological (lambda=0) distance:
treeDist(tree_a,tree_b)
## [1] 4.123
-
+
# branch-length focused (lambda=1) distance:
treeDist(tree_a,tree_b,1)
## [1] 2.873
diff --git a/docs/articles/tipCategories.html b/docs/articles/tipCategories.html
index 219e7f7..a2b02bf 100644
--- a/docs/articles/tipCategories.html
+++ b/docs/articles/tipCategories.html
@@ -33,7 +33,7 @@
@@ -91,7 +91,7 @@ Comparing trees by tip label categories
Michelle
Kendall
- 2023-04-03
+ 2023-09-07
Source: vignettes/tipCategories.Rmd
tipCategories.Rmd
diff --git a/docs/authors.html b/docs/authors.html
index 40c4a78..1ae935b 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -17,7 +17,7 @@
diff --git a/docs/index.html b/docs/index.html
index b4b5de3..ec6893a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -36,7 +36,7 @@
@@ -101,34 +101,34 @@ Installing treespace
To install the development version from github:
-library(devtools)
-install_github("thibautjombart/treespace")
+
The stable version can be installed from CRAN using:
-install.packages("treespace")
+
Then, to load the package, use:
-library("treespace")
-
-## Loading required package: ape
-
-## Loading required package: ade4
-
-## Registered S3 methods overwritten by 'adegraphics':
-## method from
-## biplot.dudi ade4
-## kplot.foucart ade4
-## kplot.mcoa ade4
-## kplot.mfa ade4
-## kplot.pta ade4
-## kplot.sepan ade4
-## kplot.statis ade4
-## scatter.coa ade4
-## scatter.dudi ade4
-## scatter.nipals ade4
-## scatter.pco ade4
-## score.acm ade4
-## score.mix ade4
-## score.pca ade4
-## screeplot.dudi ade4
+library("treespace")
+
+## Loading required package: ape
+
+## Loading required package: ade4
+
+## Registered S3 methods overwritten by 'adegraphics':
+## method from
+## biplot.dudi ade4
+## kplot.foucart ade4
+## kplot.mcoa ade4
+## kplot.mfa ade4
+## kplot.pta ade4
+## kplot.sepan ade4
+## kplot.statis ade4
+## scatter.coa ade4
+## scatter.dudi ade4
+## scatter.nipals ade4
+## scatter.pco ade4
+## score.acm ade4
+## score.mix ade4
+## score.pca ade4
+## screeplot.dudi ade4
Content overview
diff --git a/docs/news/index.html b/docs/news/index.html
index 7349d0e..121a49f 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -17,7 +17,7 @@
@@ -67,7 +67,11 @@ Changelog
-treespace v1.1.4.2
+treespace v1.1.4.3
+Patch to remove dependency on the adephylo
package as required by CRAN - hopefully only temporarily.
+
+
+treespace v1.1.4.22023-04-06
Fixing a bug which was affecting the compilation of vignettes: the treespace
function can now handle NA row (tree) names. Also added explicit argument calls in unit test functions, updated the citation file to use bibentry
rather than the old-style citEntry
as suggested by CRAN, and updated links to authors’ websites.
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 5caf61a..e9f622e 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -1,4 +1,4 @@
-pandoc: 2.19.2
+pandoc: 3.1.1
pkgdown: 2.0.7
pkgdown_sha: ~
articles:
@@ -6,5 +6,5 @@ articles:
TransmissionTreesVignette: TransmissionTreesVignette.html
introduction: introduction.html
tipCategories: tipCategories.html
-last_built: 2023-04-03T07:38Z
+last_built: 2023-09-07T15:32Z
diff --git a/docs/reference/DengueBEASTMCC.html b/docs/reference/DengueBEASTMCC.html
index 5e4b39b..6b4ab81 100644
--- a/docs/reference/DengueBEASTMCC.html
+++ b/docs/reference/DengueBEASTMCC.html
@@ -17,7 +17,7 @@
diff --git a/docs/reference/DengueSeqs.html b/docs/reference/DengueSeqs.html
index 4334558..e441975 100644
--- a/docs/reference/DengueSeqs.html
+++ b/docs/reference/DengueSeqs.html
@@ -17,7 +17,7 @@
diff --git a/docs/reference/DengueTrees.html b/docs/reference/DengueTrees.html
index 3b77710..720bc50 100644
--- a/docs/reference/DengueTrees.html
+++ b/docs/reference/DengueTrees.html
@@ -19,7 +19,7 @@
diff --git a/docs/reference/Rplot004.png b/docs/reference/Rplot004.png
index a53733d..49a1df6 100644
Binary files a/docs/reference/Rplot004.png and b/docs/reference/Rplot004.png differ
diff --git a/docs/reference/dot-render.server.info.html b/docs/reference/dot-render.server.info.html
index 24bdafb..1ab77db 100644
--- a/docs/reference/dot-render.server.info.html
+++ b/docs/reference/dot-render.server.info.html
@@ -17,7 +17,7 @@
diff --git a/docs/reference/findGroves.html b/docs/reference/findGroves.html
index d81d617..15ddc2e 100644
--- a/docs/reference/findGroves.html
+++ b/docs/reference/findGroves.html
@@ -17,7 +17,7 @@
diff --git a/docs/reference/findMRCIs.html b/docs/reference/findMRCIs.html
index 0ad229e..4351a66 100644
--- a/docs/reference/findMRCIs.html
+++ b/docs/reference/findMRCIs.html
@@ -17,7 +17,7 @@
diff --git a/docs/reference/fluTrees.html b/docs/reference/fluTrees.html
index 5a8de31..1834ef8 100644
--- a/docs/reference/fluTrees.html
+++ b/docs/reference/fluTrees.html
@@ -19,7 +19,7 @@
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 5a1bbe9..036c1f3 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -17,7 +17,7 @@
diff --git a/docs/reference/linearMrca.html b/docs/reference/linearMrca.html
index 448f204..a7fde25 100644
--- a/docs/reference/linearMrca.html
+++ b/docs/reference/linearMrca.html
@@ -18,7 +18,7 @@
@@ -101,12 +101,12 @@ Examples
## create matrix of MRCAs: entry (i,j) is the node number of the MRCA of tips i and j
linearMrca(x,6)
#> [,1] [,2] [,3] [,4] [,5] [,6]
-#> [1,] 1 7 7 7 7 7
-#> [2,] 7 2 8 8 8 8
-#> [3,] 7 8 3 9 9 9
-#> [4,] 7 8 9 4 10 10
-#> [5,] 7 8 9 10 5 11
-#> [6,] 7 8 9 10 11 6
+#> [1,] 1 8 7 7 7 7
+#> [2,] 8 2 7 7 7 7
+#> [3,] 7 7 3 9 9 9
+#> [4,] 7 7 9 4 11 10
+#> [5,] 7 7 9 11 5 10
+#> [6,] 7 7 9 10 10 6
diff --git a/docs/reference/makeCollapsedTree-1.png b/docs/reference/makeCollapsedTree-1.png
index 4e950fe..26c444f 100644
Binary files a/docs/reference/makeCollapsedTree-1.png and b/docs/reference/makeCollapsedTree-1.png differ
diff --git a/docs/reference/makeCollapsedTree-2.png b/docs/reference/makeCollapsedTree-2.png
index 10fd653..890176c 100644
Binary files a/docs/reference/makeCollapsedTree-2.png and b/docs/reference/makeCollapsedTree-2.png differ
diff --git a/docs/reference/makeCollapsedTree-3.png b/docs/reference/makeCollapsedTree-3.png
index 6631bec..f88602b 100644
Binary files a/docs/reference/makeCollapsedTree-3.png and b/docs/reference/makeCollapsedTree-3.png differ
diff --git a/docs/reference/makeCollapsedTree-4.png b/docs/reference/makeCollapsedTree-4.png
index 3dfd522..726f1ef 100644
Binary files a/docs/reference/makeCollapsedTree-4.png and b/docs/reference/makeCollapsedTree-4.png differ
diff --git a/docs/reference/makeCollapsedTree.html b/docs/reference/makeCollapsedTree.html
index dfc822d..cf5d08f 100644
--- a/docs/reference/makeCollapsedTree.html
+++ b/docs/reference/makeCollapsedTree.html
@@ -19,7 +19,7 @@
diff --git a/docs/reference/medTree.html b/docs/reference/medTree.html
index 7e3302d..730636d 100644
--- a/docs/reference/medTree.html
+++ b/docs/reference/medTree.html
@@ -17,7 +17,7 @@
diff --git a/docs/reference/multiDist.html b/docs/reference/multiDist.html
index 78f592b..445e48e 100644
--- a/docs/reference/multiDist.html
+++ b/docs/reference/multiDist.html
@@ -17,7 +17,7 @@
@@ -130,15 +130,15 @@ Examples
## pairwise distance matrix when lambda=0
multiDist(trees)
#> 1 2 3 4 5 6 7 8
-#> 2 4.000000
-#> 3 4.242641 4.000000
-#> 4 4.472136 4.690416 5.656854
-#> 5 4.582576 3.605551 5.000000 5.000000
-#> 6 3.872983 5.385165 5.196152 6.557439 5.656854
-#> 7 4.358899 4.358899 5.000000 4.358899 4.242641 5.830952
-#> 8 4.690416 4.898979 5.291503 5.656854 4.358899 6.244998 5.000000
-#> 9 4.472136 4.000000 4.898979 4.690416 4.358899 6.082763 3.605551 4.690416
-#> 10 5.916080 5.916080 7.000000 6.244998 6.782330 5.477226 5.830952 7.141428
+#> 2 5.567764
+#> 3 3.605551 4.242641
+#> 4 6.557439 5.099020 5.477226
+#> 5 5.916080 4.690416 5.477226 5.477226
+#> 6 6.082763 4.898979 5.477226 3.162278 5.477226
+#> 7 6.708204 4.690416 5.477226 4.690416 5.656854 4.898979
+#> 8 6.928203 5.567764 6.244998 7.141428 6.244998 7.000000 4.582576
+#> 9 5.000000 5.291503 4.898979 5.656854 4.472136 5.656854 5.656854 7.141428
+#> 10 2.645751 5.099020 4.242641 5.830952 5.099020 5.291503 5.830952 6.403124
#> 9
#> 2
#> 3
@@ -148,7 +148,7 @@ Examples
#> 7
#> 8
#> 9
-#> 10 5.916080
+#> 10 5.291503
## pairwise distance matrix as a function of lambda:
m <- multiDist(trees, return.lambda.function=TRUE)
diff --git a/docs/reference/plotGroves.html b/docs/reference/plotGroves.html
index 35381ef..267d817 100644
--- a/docs/reference/plotGroves.html
+++ b/docs/reference/plotGroves.html
@@ -19,7 +19,7 @@
diff --git a/docs/reference/plotGrovesD3.html b/docs/reference/plotGrovesD3.html
index 624ee7d..c36cc70 100644
--- a/docs/reference/plotGrovesD3.html
+++ b/docs/reference/plotGrovesD3.html
@@ -20,7 +20,7 @@
diff --git a/docs/reference/plotTreeDiff.html b/docs/reference/plotTreeDiff.html
index 8bb6483..c4d203a 100644
--- a/docs/reference/plotTreeDiff.html
+++ b/docs/reference/plotTreeDiff.html
@@ -19,7 +19,7 @@
diff --git a/docs/reference/refTreeDist.html b/docs/reference/refTreeDist.html
index cba343b..dfb10a9 100644
--- a/docs/reference/refTreeDist.html
+++ b/docs/reference/refTreeDist.html
@@ -17,7 +17,7 @@
@@ -131,8 +131,8 @@ Examples
## find the distances from each of the 10 random trees to the single reference tree
refTreeDist(refTree,trees)
-#> [1] 5.196152 3.605551 4.358899 6.633250 5.477226 3.316625 4.123106 5.000000
-#> [9] 4.582576 3.741657
+#> [1] 6.403124 4.358899 3.872983 6.082763 6.855655 6.557439 6.244998 5.744563
+#> [9] 6.324555 6.082763
diff --git a/docs/reference/relatedTreeDist-1.png b/docs/reference/relatedTreeDist-1.png
index 178284e..80d7470 100644
Binary files a/docs/reference/relatedTreeDist-1.png and b/docs/reference/relatedTreeDist-1.png differ
diff --git a/docs/reference/relatedTreeDist.html b/docs/reference/relatedTreeDist.html
index e5c90d7..2e030fc 100644
--- a/docs/reference/relatedTreeDist.html
+++ b/docs/reference/relatedTreeDist.html
@@ -17,7 +17,7 @@
@@ -120,9 +120,9 @@ Examples
relatedTreeDist(trees,df)
#> 1 2 3 4
#> 2 0.000000
-#> 3 1.736555 1.736555
-#> 4 2.281036 2.281036 1.274755
-#> 5 3.641128 3.641128 2.292992 2.351861
+#> 3 1.119780 1.119780
+#> 4 1.756684 1.756684 1.737680
+#> 5 2.501562 2.501562 1.991192 1.530931
# Note that trees 1 and 2 have different numbers of tips but the relationships between those tips
# are identical at the category level, hence the related tree distance is 0.
diff --git a/docs/reference/simulateIndTree-1.png b/docs/reference/simulateIndTree-1.png
index 9f42c82..a66e05c 100644
Binary files a/docs/reference/simulateIndTree-1.png and b/docs/reference/simulateIndTree-1.png differ
diff --git a/docs/reference/simulateIndTree.html b/docs/reference/simulateIndTree.html
index 3aa6708..22eee29 100644
--- a/docs/reference/simulateIndTree.html
+++ b/docs/reference/simulateIndTree.html
@@ -17,7 +17,7 @@
diff --git a/docs/reference/tipDiff.html b/docs/reference/tipDiff.html
index 4fff339..a7b59e7 100644
--- a/docs/reference/tipDiff.html
+++ b/docs/reference/tipDiff.html
@@ -18,7 +18,7 @@
diff --git a/docs/reference/tipsMRCAdepths-1.png b/docs/reference/tipsMRCAdepths-1.png
index 2f29cee..4b38b02 100644
Binary files a/docs/reference/tipsMRCAdepths-1.png and b/docs/reference/tipsMRCAdepths-1.png differ
diff --git a/docs/reference/tipsMRCAdepths.html b/docs/reference/tipsMRCAdepths.html
index 93dd151..af21bfc 100644
--- a/docs/reference/tipsMRCAdepths.html
+++ b/docs/reference/tipsMRCAdepths.html
@@ -18,7 +18,7 @@
@@ -92,50 +92,50 @@ Examples
tipsMRCAdepths(tree)
#> tip1 tip2 rootdist
#> [1,] "t1" "t10" "0"
-#> [2,] "t1" "t2" "0"
-#> [3,] "t1" "t3" "1"
-#> [4,] "t1" "t4" "0"
-#> [5,] "t1" "t5" "1"
+#> [2,] "t1" "t2" "1"
+#> [3,] "t1" "t3" "4"
+#> [4,] "t1" "t4" "3"
+#> [5,] "t1" "t5" "3"
#> [6,] "t1" "t6" "2"
-#> [7,] "t1" "t7" "0"
-#> [8,] "t1" "t8" "0"
-#> [9,] "t1" "t9" "2"
-#> [10,] "t10" "t2" "1"
+#> [7,] "t1" "t7" "2"
+#> [8,] "t1" "t8" "3"
+#> [9,] "t1" "t9" "1"
+#> [10,] "t10" "t2" "0"
#> [11,] "t10" "t3" "0"
-#> [12,] "t10" "t4" "2"
+#> [12,] "t10" "t4" "0"
#> [13,] "t10" "t5" "0"
#> [14,] "t10" "t6" "0"
-#> [15,] "t10" "t7" "1"
-#> [16,] "t10" "t8" "1"
+#> [15,] "t10" "t7" "0"
+#> [16,] "t10" "t8" "0"
#> [17,] "t10" "t9" "0"
-#> [18,] "t2" "t3" "0"
+#> [18,] "t2" "t3" "1"
#> [19,] "t2" "t4" "1"
-#> [20,] "t2" "t5" "0"
-#> [21,] "t2" "t6" "0"
-#> [22,] "t2" "t7" "2"
-#> [23,] "t2" "t8" "3"
-#> [24,] "t2" "t9" "0"
-#> [25,] "t3" "t4" "0"
-#> [26,] "t3" "t5" "2"
-#> [27,] "t3" "t6" "1"
-#> [28,] "t3" "t7" "0"
-#> [29,] "t3" "t8" "0"
+#> [20,] "t2" "t5" "1"
+#> [21,] "t2" "t6" "1"
+#> [22,] "t2" "t7" "1"
+#> [23,] "t2" "t8" "1"
+#> [24,] "t2" "t9" "2"
+#> [25,] "t3" "t4" "3"
+#> [26,] "t3" "t5" "3"
+#> [27,] "t3" "t6" "2"
+#> [28,] "t3" "t7" "2"
+#> [29,] "t3" "t8" "3"
#> [30,] "t3" "t9" "1"
-#> [31,] "t4" "t5" "0"
-#> [32,] "t4" "t6" "0"
-#> [33,] "t4" "t7" "1"
-#> [34,] "t4" "t8" "1"
-#> [35,] "t4" "t9" "0"
-#> [36,] "t5" "t6" "1"
-#> [37,] "t5" "t7" "0"
-#> [38,] "t5" "t8" "0"
+#> [31,] "t4" "t5" "5"
+#> [32,] "t4" "t6" "2"
+#> [33,] "t4" "t7" "2"
+#> [34,] "t4" "t8" "4"
+#> [35,] "t4" "t9" "1"
+#> [36,] "t5" "t6" "2"
+#> [37,] "t5" "t7" "2"
+#> [38,] "t5" "t8" "4"
#> [39,] "t5" "t9" "1"
-#> [40,] "t6" "t7" "0"
-#> [41,] "t6" "t8" "0"
-#> [42,] "t6" "t9" "3"
+#> [40,] "t6" "t7" "3"
+#> [41,] "t6" "t8" "2"
+#> [42,] "t6" "t9" "1"
#> [43,] "t7" "t8" "2"
-#> [44,] "t7" "t9" "0"
-#> [45,] "t8" "t9" "0"
+#> [44,] "t7" "t9" "1"
+#> [45,] "t8" "t9" "1"
diff --git a/docs/reference/treeConcordance-4.png b/docs/reference/treeConcordance-4.png
index b693738..9c532f2 100644
Binary files a/docs/reference/treeConcordance-4.png and b/docs/reference/treeConcordance-4.png differ
diff --git a/docs/reference/treeConcordance.html b/docs/reference/treeConcordance.html
index 3c302d3..ab0bf55 100644
--- a/docs/reference/treeConcordance.html
+++ b/docs/reference/treeConcordance.html
@@ -17,7 +17,7 @@
@@ -126,7 +126,7 @@