diff --git a/404.html b/404.html index 4cc7e460..f41df810 100644 --- a/404.html +++ b/404.html @@ -40,7 +40,7 @@
diff --git a/CODE_OF_CONDUCT.html b/CODE_OF_CONDUCT.html index a7d51fb8..7d904681 100644 --- a/CODE_OF_CONDUCT.html +++ b/CODE_OF_CONDUCT.html @@ -23,7 +23,7 @@ diff --git a/CONTRIBUTING.html b/CONTRIBUTING.html index 51fa75b7..2b0cd5b7 100644 --- a/CONTRIBUTING.html +++ b/CONTRIBUTING.html @@ -23,7 +23,7 @@ diff --git a/articles/Generalized-RF.html b/articles/Generalized-RF.html index 66ac45db..a3f612e5 100644 --- a/articles/Generalized-RF.html +++ b/articles/Generalized-RF.html @@ -41,7 +41,7 @@ diff --git a/articles/Robinson-Foulds.html b/articles/Robinson-Foulds.html index ffbf1385..14d116d6 100644 --- a/articles/Robinson-Foulds.html +++ b/articles/Robinson-Foulds.html @@ -41,7 +41,7 @@ diff --git a/articles/Using-TreeDist.html b/articles/Using-TreeDist.html index 9825de27..823d8379 100644 --- a/articles/Using-TreeDist.html +++ b/articles/Using-TreeDist.html @@ -41,7 +41,7 @@ @@ -203,12 +203,12 @@## one two
-## 0.8571109 0.7126734
+## 0.7261428 0.8335814
TreeDistance(twoTrees, threeTrees)
## a b c
-## one 0.7199105 0.7903015 0.7821457
-## two 0.8088749 0.7904455 0.5195800
+## one 0.5736359 0.7738602 0.7707093
+## two 0.7931109 0.7225107 0.7164344
(Use the mouse to reorient)
+ +(Use the mouse to reorient)
-cluster <- hClusters[[2 - 1]]
nClusters <- 2
+whichResult <- match(nClusters, possibleClusters)
+cluster <- hClusters[[whichResult]]
We can visualize the clustering solution as a tree:
class(hTree) <- "hclust"
@@ -466,17 +468,8 @@ Self-organizing maps
-umatrixInstalled <- requireNamespace("Umatrix", quietly = TRUE)
## 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)
-
-if (umatrixInstalled) {
+umatrixInstalled <- requireNamespace("Umatrix", quietly = TRUE)
+if (umatrixInstalled) {
map <- Umatrix::esomTrain(as.matrix(distances), Key = seq_along(trees),
Epochs = 5, # Increase for better results
Lines = 42,
diff --git a/articles/treespace_files/figure-html/plot-mapping-5d-1.png b/articles/treespace_files/figure-html/plot-mapping-5d-1.png
index 9f234a13..188d4da0 100644
Binary files a/articles/treespace_files/figure-html/plot-mapping-5d-1.png and b/articles/treespace_files/figure-html/plot-mapping-5d-1.png differ
diff --git a/articles/using-distances.html b/articles/using-distances.html
index a47dd6e2..e6e68dcc 100644
--- a/articles/using-distances.html
+++ b/articles/using-distances.html
@@ -41,7 +41,7 @@
## 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)
-
-expectedQD <- 2 / 3
+library("Quartet", exclude = "RobinsonFoulds")
+expectedQD <- 2 / 3
normalizedQD <- QuartetDivergence(QuartetStatus(tree1, tree2),
similarity = FALSE) / expectedQD
The expected distance is more difficult to calculate for other @@ -274,7 +265,7 @@
+if (requireNamespace("TreeDistData", quietly = TRUE)) { library("TreeDistData", exclude = "PairwiseDistances") data("randomTreeDistances", package = "TreeDistData") @@ -308,7 +299,7 @@
Normalizing to random similarity}
or use these calculated values to normalize our tree distance:
-@@ -331,7 +322,7 @@+expectedCID <- randomTreeDistances["cid", "mean", "9"] ClusteringInfoDistance(tree1, tree2, normalize = TRUE) / expectedCID
Testing similarity to a known tree
Ternary diagrams allow us to visualise the quality of a reconstructed tree with reference to a known “true” tree:
-diff --git a/reference/NormalizeInfo.html b/reference/NormalizeInfo.html index c6099a6c..5c60e5dc 100644 --- a/reference/NormalizeInfo.html +++ b/reference/NormalizeInfo.html @@ -23,7 +23,7 @@+-testTrees <- list( trueTree = ape::read.tree(text = '(a, (b, (c, (d, (e, (f, (g, h)))))));'), lackRes = ape::read.tree(text = '(a, (b, c, (d, e, (f, g, h))));'), @@ -341,11 +332,11 @@
Testing similarity to a known treeVisualizeMatching(MutualClusteringInfo, testTrees$trueTree, testTrees$lackRes) points(4, 7.5, pch = 2, cex = 3, col = "#E69F00")
diff --git a/reference/NNIDist.html b/reference/NNIDist.html index 19be5919..cc7573f6 100644 --- a/reference/NNIDist.html +++ b/reference/NNIDist.html @@ -27,7 +27,7 @@+-VisualizeMatching(MutualClusteringInfo, testTrees$trueTree, testTrees$smallErr) points(4, 7.5, pch = 3, cex = 3, col = "#56B4E9")
diff --git a/reference/MeilaVariationOfInformation.html b/reference/MeilaVariationOfInformation.html index bb6f8354..6536f594 100644 --- a/reference/MeilaVariationOfInformation.html +++ b/reference/MeilaVariationOfInformation.html @@ -25,7 +25,7 @@+@@ -353,7 +344,7 @@VisualizeMatching(MutualClusteringInfo, testTrees$trueTree, testTrees$bigErr) points(4, 7.5, pch = 4, cex = 3, col = "#009E73")
Testing similarity to a known tree -
diff --git a/reference/MatchingSplitDistance.html b/reference/MatchingSplitDistance.html index bf9ff66a..b2c56c1d 100644 --- a/reference/MatchingSplitDistance.html +++ b/reference/MatchingSplitDistance.html @@ -26,7 +26,7 @@+@@ -109,7 +109,7 @@if (requireNamespace("Ternary", quietly = TRUE)) { library("Ternary") oldPar <- par(mar = rep(0.1, 4)) @@ -381,14 +372,14 @@
Example study.
First, let’s generate a starting tree, which will represent our reference topology:
-diff --git a/reference/MSTSegments-1.png b/reference/MSTSegments-1.png index 51d2519a..ba2f9aed 100644 Binary files a/reference/MSTSegments-1.png and b/reference/MSTSegments-1.png differ diff --git a/reference/MSTSegments.html b/reference/MSTSegments.html index c1943063..caa81d8c 100644 --- a/reference/MSTSegments.html +++ b/reference/MSTSegments.html @@ -28,7 +28,7 @@+set.seed(0) trueTree <- TreeTools::RandomTree(20, root = TRUE)
Then, let’s generate 200 degraded trees. We’ll move away from the true tree by making a TBR move, then reduce resolution by taking the consensus of this tree and three trees from its immediate neighbourhood (one NNI move away).
-diff --git a/reference/MASTSize.html b/reference/MASTSize.html index 0fcbf448..4fbc3dc3 100644 --- a/reference/MASTSize.html +++ b/reference/MASTSize.html @@ -30,7 +30,7 @@+diff --git a/reference/LAPJV.html b/reference/LAPJV.html index 014965a7..9ed5456e 100644 --- a/reference/LAPJV.html +++ b/reference/LAPJV.html @@ -25,7 +25,7 @@treeSearchInstalled <- requireNamespace("TreeSearch", quietly = TRUE) if (treeSearchInstalled) { library("TreeSearch", quietly = TRUE) # for TBR, NNI @@ -406,7 +397,7 @@
Example time we’ll move further (three TBR moves) from the true tree, and reduce resolution by taking a consensus with three trees from its wider neighbourhood (each two NNI moves away). -
diff --git a/reference/KendallColijn.html b/reference/KendallColijn.html index ab03d158..e443f10f 100644 --- a/reference/KendallColijn.html +++ b/reference/KendallColijn.html @@ -24,7 +24,7 @@+diff --git a/reference/JaccardRobinsonFoulds.html b/reference/JaccardRobinsonFoulds.html index 0cc1ba05..09be2091 100644 --- a/reference/JaccardRobinsonFoulds.html +++ b/reference/JaccardRobinsonFoulds.html @@ -27,7 +27,7 @@if (treeSearchInstalled) { threeAway <- structure(lapply(seq_len(200), function(x) { tbrTree <- TBR(TBR(TBR(trueTree))) @@ -419,33 +410,33 @@
Example
Now let’s calculate their tree similarity scores. We need to calculate the amount of information each tree has in common with the true tree:
-diff --git a/reference/GeneralizedRF.html b/reference/GeneralizedRF.html index 67a6395d..29d5ae56 100644 --- a/reference/GeneralizedRF.html +++ b/reference/GeneralizedRF.html @@ -24,7 +24,7 @@+if (treeSearchInstalled) { correct1 <- MutualClusteringInfo(trueTree, oneAway) correct3 <- MutualClusteringInfo(trueTree, threeAway) }
The amount of information in each degraded tree:
-diff --git a/reference/Entropy.html b/reference/Entropy.html index bf8e08c1..d96affd4 100644 --- a/reference/Entropy.html +++ b/reference/Entropy.html @@ -25,7 +25,7 @@+if (treeSearchInstalled) { infoInTree1 <- ClusteringEntropy(oneAway) infoInTree3 <- ClusteringEntropy(threeAway) }
The amount of information that could have been resolved, but was not:
-diff --git a/reference/CompareAll.html b/reference/CompareAll.html index 8555eb8d..039422e3 100644 --- a/reference/CompareAll.html +++ b/reference/CompareAll.html @@ -24,7 +24,7 @@+if (treeSearchInstalled) { unresolved1 <- ClusteringEntropy(trueTree) - infoInTree1 unresolved3 <- ClusteringEntropy(trueTree) - infoInTree3 }
And the amount of information incorrectly resolved:
-++if (treeSearchInstalled) { incorrect1 <- infoInTree1 - correct1 incorrect3 <- infoInTree3 - correct3 }
In preparation for our plot, let’s colour our one-away trees orange , and our three-away trees blue :
-@@ -107,6 +107,13 @@+col1 <- hcl(200, alpha = 0.9) col3 <- hcl(40, alpha = 0.9) spec1 <- matrix(col2rgb(col1, alpha = TRUE), nrow = 4, ncol = 181) @@ -455,7 +446,7 @@
Example spec1 <- apply(spec1, 2, ColToHex) spec3 <- apply(spec3, 2, ColToHex)
Now we can plot this information on a ternary diagram.
-diff --git a/news/index.html b/news/index.html index e62bd1c7..5233dfb9 100644 --- a/news/index.html +++ b/news/index.html @@ -23,7 +23,7 @@+-@@ -155,9 +155,9 @@if (treeSearchInstalled && requireNamespace("Ternary", quietly = TRUE)) { layout(matrix(c(1, 2), ncol = 2), widths = c(5, 2)) oldPar <- par(mar = rep(0, 4)) diff --git a/authors.html b/authors.html index b46f8c95..1c09046b 100644 --- a/authors.html +++ b/authors.html @@ -23,7 +23,7 @@
Citation
pages = {1255-1270}, year = {2022}, }Smith, M.R. (2020b). TreeDist: Distances between Phylogenetic Trees. R package version 2.6.3. Comprehensive R Archive Network. doi:10.5281/zenodo.3528124
+Smith, M.R. (2020b). TreeDist: Distances between Phylogenetic Trees. R package version 2.7.0. Comprehensive R Archive Network. doi:10.5281/zenodo.3528124
@Manual{TreeDist, - title = {TreeDist: Distances between Phylogenetic Trees. R package version 2.6.3}, + title = {TreeDist: Distances between Phylogenetic Trees. R package version 2.7.0}, author = {Martin R. Smith}, doi = {10.5281/zenodo.3528124}, journal = {Comprehensive R Archive Network}, diff --git a/index.html b/index.html index 63a64d62..f061caf8 100644 --- a/index.html +++ b/index.html @@ -58,7 +58,7 @@
Changelog
Source:NEWS.md
+TreeDist 2.7.0 (2023-10-25)
+
- +
Fix calculation error in
StrainCol()
.- +
App: Display strain in 3D tree space viewer.
- +
Support for distances between larger trees.
- +
Support unrooted trees in
VisualizeMatching()
(#103).diff --git a/reference/CalculateTreeDistance.html b/reference/CalculateTreeDistance.html index 99e79153..7fa2e8fb 100644 --- a/reference/CalculateTreeDistance.html +++ b/reference/CalculateTreeDistance.html @@ -23,7 +23,7 @@TreeDist 2.6.3 (2023-08-25)2023-08-25
- diff --git a/pkgdown.yml b/pkgdown.yml index 8a7aa38f..274db843 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -11,7 +11,7 @@ articles: landscapes: landscapes.html treespace: treespace.html using-distances: using-distances.html -last_built: 2023-08-27T00:45Z +last_built: 2023-10-25T16:24Z urls: reference: https://ms609.github.io/TreeDist/reference article: https://ms609.github.io/TreeDist/articles diff --git a/reference/AllSplitPairings.html b/reference/AllSplitPairings.html index 18d70600..e71c8367 100644 --- a/reference/AllSplitPairings.html +++ b/reference/AllSplitPairings.html @@ -28,7 +28,7 @@
Fix bug when comparing a “multiPhylo” object containing a single tree.
diff --git a/reference/MappingQuality.html b/reference/MappingQuality.html index dbf7a66f..4315d13c 100644 --- a/reference/MappingQuality.html +++ b/reference/MappingQuality.html @@ -29,7 +29,7 @@diff --git a/reference/MapTrees.html b/reference/MapTrees.html index eff612ca..f9b72c99 100644 --- a/reference/MapTrees.html +++ b/reference/MapTrees.html @@ -26,7 +26,7 @@Add minimum spanning tree to plot, colouring by stress
- Source:R/plot.R
+ Source:R/MSTSegments.R
MSTSegments.Rd
normalize = SplitwiseInfo(trueTree)
(SPI, MSI) or
ClusteringEntropy(trueTree)
(MCI).
+
+ To balance memory demands and runtime with flexibility, these functions are
+implemented for trees with up to 2048 leaves.
+To analyse trees with up to 8192 leaves, you will need to a modified version
+of TreeTools.
+First uninstall TreeDist and TreeTools using remove.packages()
.
+Then use devtools::install_github("ms609/TreeTools", ref = "more-leaves")
+to install the modified TreeTools package.
+Finally, install TreeDist using
+devtools::install_github("ms609/TreeDist")
.
+(TreeDist will need building from source after the modified
+TreeTools package has been installed, as its code links to values
+set in the TreeTools source code.)
Trees with over 8192 leaves require further modification of the source code, +which the maintainer will attempt on demand; please comment on GitHub if you would find this useful.