diff --git a/dev/CODE_OF_CONDUCT.html b/dev/CODE_OF_CONDUCT.html index fd5d9900..cf046cea 100644 --- a/dev/CODE_OF_CONDUCT.html +++ b/dev/CODE_OF_CONDUCT.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/CONTRIBUTING.html b/dev/CONTRIBUTING.html index 0398e683..b7f4cb2c 100644 --- a/dev/CONTRIBUTING.html +++ b/dev/CONTRIBUTING.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/articles/Generalized-RF.html b/dev/articles/Generalized-RF.html index ab024bb1..9b125463 100644 --- a/dev/articles/Generalized-RF.html +++ b/dev/articles/Generalized-RF.html @@ -28,7 +28,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/articles/Robinson-Foulds.html b/dev/articles/Robinson-Foulds.html index 65ade959..c3f812ee 100644 --- a/dev/articles/Robinson-Foulds.html +++ b/dev/articles/Robinson-Foulds.html @@ -28,7 +28,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 @@ -323,6 +323,16 @@ Constructing a matching## $matching ## [1] 1 2 NA 4 5 3 ## +## $matchedSplits +## [1] "A B | C D E F G H I => A B | C D E F G H I" +## [2] "C D E | A B F G H I => C D E I | A B F G H" +## [3] "F G H I | A B C D E => F G H | A B C D E I" +## [4] "G H I | A B C D E F => G H | A B C D E F I" +## [5] "H I | A B C D E F G .. E I | A B C D F G H" +## +## $matchedScores +## [1] 3.700440 3.252981 NA 3.252981 2.115477 0.000000 +## ## $pairScores ## [,1] [,2] [,3] [,4] [,5] ## [1,] 3.7004397 0.8930848 0.2410081 0.5305147 0.2410081 @@ -330,14 +340,7 @@ Constructing a matching## [3,] 0.2410081 1.3785116 0.0000000 0.5305147 0.2410081 ## [4,] 0.8930848 0.0000000 0.0000000 3.2529807 1.3785116 ## [5,] 0.5305147 0.0000000 0.0000000 0.0000000 2.1154772 -## [6,] 0.2410081 0.0000000 0.0000000 0.0000000 0.0000000 -## -## $matchedSplits -## [1] "A B | C D E F G H I => A B | C D E F G H I" -## [2] "C D E | A B F G H I => C D E I | A B F G H" -## [3] "F G H I | A B C D E => F G H | A B C D E I" -## [4] "G H I | A B C D E F => G H | A B C D E F I" -## [5] "H I | A B C D E F G .. E I | A B C D F G H" +## [6,] 0.2410081 0.0000000 0.0000000 0.0000000 0.0000000 .. denotes that the fifth matching contributes zero to similarity score; an alternative optimal matching would leave these splits unpaired. diff --git a/dev/articles/Using-TreeDist.html b/dev/articles/Using-TreeDist.html index 8c5a3385..b4167095 100644 --- a/dev/articles/Using-TreeDist.html +++ b/dev/articles/Using-TreeDist.html @@ -28,7 +28,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 @@ -178,6 +178,15 @@ Visualizing a matching## [1] 6.960578 ## attr(,"matching") ## [1] 1 2 3 5 6 4 +## attr(,"matchedSplits") +## [1] "B C D E | A F G H I => B C D H I | A E F G" +## [2] "C D E | A B F G H I => C D H I | A B E F G" +## [3] "D E | A B C F G H I => D H I | A B C E F G" +## [4] "F G H I | A B C D E => E F G | A B C D H I" +## [5] "F G | A B C D E H I => F G | A B C D E H I" +## [6] "H I | A B C D E F G => H I | A B C D E F G" +## attr(,"matchedScores") +## [1] 0.09109101 0.07278023 0.02475761 0.07278023 0.76420451 0.76420451 ## attr(,"pairScores") ## [,1] [,2] [,3] [,4] [,5] [,6] ## [1,] 0.091091008 0.007214618 0.01831078 0.22478751 0.01831078 0.22478751 @@ -185,14 +194,7 @@ Visualizing a matching## [3,] 0.002565287 0.002565287 0.02475761 0.09288851 0.02475761 0.09288851 ## [4,] 0.007214618 0.007214618 0.07278023 0.31976006 0.07278023 0.31976006 ## [5,] 0.319760062 0.224787510 0.15200728 0.09288851 0.45810590 0.76420451 -## [6,] 0.224787510 0.319760062 0.45810590 0.76420451 0.15200728 0.09288851 -## attr(,"matchedSplits") -## [1] "B C D E | A F G H I => B C D H I | A E F G" -## [2] "C D E | A B F G H I => C D H I | A B E F G" -## [3] "D E | A B C F G H I => D H I | A B C E F G" -## [4] "F G H I | A B C D E => E F G | A B C D H I" -## [5] "F G | A B C D E H I => F G | A B C D E H I" -## [6] "H I | A B C D E F G => H I | A B C D E F G" +## [6,] 0.224787510 0.319760062 0.45810590 0.76420451 0.15200728 0.09288851 Here, the pairScores attribute lists the score of each possible matching of splits. We can identify the splits with: diff --git a/dev/articles/compare-treesets.html b/dev/articles/compare-treesets.html index 381b45bf..ce244c1d 100644 --- a/dev/articles/compare-treesets.html +++ b/dev/articles/compare-treesets.html @@ -28,7 +28,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/articles/different-leaves.html b/dev/articles/different-leaves.html index 62d71f02..74d6306a 100644 --- a/dev/articles/different-leaves.html +++ b/dev/articles/different-leaves.html @@ -28,7 +28,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/articles/index.html b/dev/articles/index.html index 19f3ebe5..e3b248fd 100644 --- a/dev/articles/index.html +++ b/dev/articles/index.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/articles/information.html b/dev/articles/information.html index 5b7171ed..b08dc843 100644 --- a/dev/articles/information.html +++ b/dev/articles/information.html @@ -28,7 +28,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/articles/landscapes.html b/dev/articles/landscapes.html index b8b2ccee..45c5508a 100644 --- a/dev/articles/landscapes.html +++ b/dev/articles/landscapes.html @@ -28,7 +28,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 @@ -199,7 +199,7 @@ print("Run `install.packages('plotly')` to view this output") } -(Use the mouse to reorient) +(Use the mouse to reorient) References diff --git a/dev/articles/treespace.html b/dev/articles/treespace.html index 4ddf62d5..1327a3de 100644 --- a/dev/articles/treespace.html +++ b/dev/articles/treespace.html @@ -28,7 +28,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/articles/using-distances.html b/dev/articles/using-distances.html index 10683aa2..52248d79 100644 --- a/dev/articles/using-distances.html +++ b/dev/articles/using-distances.html @@ -28,7 +28,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/authors.html b/dev/authors.html index 7e8dec10..9d5147c7 100644 --- a/dev/authors.html +++ b/dev/authors.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 @@ -104,9 +104,9 @@ Citation pages = {1255-1270}, year = {2022}, } - Smith, M.R. (2020b). TreeDist: Distances between Phylogenetic Trees. R package version 2.8.0.9000. Comprehensive R Archive Network. doi:10.5281/zenodo.3528124 + Smith, M.R. (2020b). TreeDist: Distances between Phylogenetic Trees. R package version 2.8.0.9001. Comprehensive R Archive Network. doi:10.5281/zenodo.3528124 @Manual{TreeDist, - title = {TreeDist: Distances between Phylogenetic Trees. R package version 2.8.0.9000}, + title = {TreeDist: Distances between Phylogenetic Trees. R package version 2.8.0.9001}, author = {Martin R. Smith}, doi = {10.5281/zenodo.3528124}, journal = {Comprehensive R Archive Network}, diff --git a/dev/index.html b/dev/index.html index 3fcff9f1..a226174e 100644 --- a/dev/index.html +++ b/dev/index.html @@ -30,7 +30,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/news/index.html b/dev/news/index.html index db886007..93be366d 100644 --- a/dev/news/index.html +++ b/dev/news/index.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 @@ -59,8 +59,10 @@ Changelog -TreeDist 2.8.0.9000 (development) +TreeDist 2.8.0.9001 (development) +VisualizeMatching() allows more control over output format, and returns the matching (#124) + SpectralEigens() returns correct eigenvalues (smallest was overlooked) SpectralEigens() handles values of nEig larger than the input diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 1b58857c..b808703b 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -11,7 +11,7 @@ articles: treespace: treespace.html using-distances: using-distances.html Using-TreeDist: Using-TreeDist.html -last_built: 2024-08-22T18:25Z +last_built: 2024-08-28T07:30Z urls: reference: https://ms609.github.io/TreeDist/reference article: https://ms609.github.io/TreeDist/articles diff --git a/dev/reference/AllSplitPairings.html b/dev/reference/AllSplitPairings.html index 06a875ee..c5a8dd4b 100644 --- a/dev/reference/AllSplitPairings.html +++ b/dev/reference/AllSplitPairings.html @@ -23,7 +23,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/CalculateTreeDistance.html b/dev/reference/CalculateTreeDistance.html index 2e7a3e01..8886b014 100644 --- a/dev/reference/CalculateTreeDistance.html +++ b/dev/reference/CalculateTreeDistance.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/CompareAll.html b/dev/reference/CompareAll.html index e7610cdd..0b165be4 100644 --- a/dev/reference/CompareAll.html +++ b/dev/reference/CompareAll.html @@ -15,7 +15,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/Entropy.html b/dev/reference/Entropy.html index bb9ab4ec..d605d238 100644 --- a/dev/reference/Entropy.html +++ b/dev/reference/Entropy.html @@ -17,7 +17,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/GeneralizedRF.html b/dev/reference/GeneralizedRF.html index 6f996699..53a1c6b9 100644 --- a/dev/reference/GeneralizedRF.html +++ b/dev/reference/GeneralizedRF.html @@ -15,7 +15,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 @@ -116,8 +116,9 @@ ValueA numeric value specifying the score of the tree pairs under the specified pair scorer. If reportMatching = TRUE, attribute also list:matching: which split in splits2 is optimally matched to each split in split1 (NA if not matched); -pairScores: Calculated scores for each possible matching of each split. matchedSplits: Textual representation of each match +matchedScores: Scores for matched split. +pairScores: Calculated scores for each possible matching of each split. Details diff --git a/dev/reference/Islands.html b/dev/reference/Islands.html index fefa36ff..cd78301a 100644 --- a/dev/reference/Islands.html +++ b/dev/reference/Islands.html @@ -27,7 +27,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/JaccardRobinsonFoulds.html b/dev/reference/JaccardRobinsonFoulds.html index bbaa1a82..9db80c4c 100644 --- a/dev/reference/JaccardRobinsonFoulds.html +++ b/dev/reference/JaccardRobinsonFoulds.html @@ -21,7 +21,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/KMeansPP.html b/dev/reference/KMeansPP.html index c4ffaa86..0ad29e1c 100644 --- a/dev/reference/KMeansPP.html +++ b/dev/reference/KMeansPP.html @@ -29,7 +29,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/KendallColijn.html b/dev/reference/KendallColijn.html index e275e975..75978edb 100644 --- a/dev/reference/KendallColijn.html +++ b/dev/reference/KendallColijn.html @@ -15,7 +15,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/LAPJV.html b/dev/reference/LAPJV.html index bf0dd041..eeb75ae1 100644 --- a/dev/reference/LAPJV.html +++ b/dev/reference/LAPJV.html @@ -17,7 +17,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/MASTSize.html b/dev/reference/MASTSize.html index ff2df209..d1d13a81 100644 --- a/dev/reference/MASTSize.html +++ b/dev/reference/MASTSize.html @@ -27,7 +27,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/MSTSegments.html b/dev/reference/MSTSegments.html index f59976a7..56ca5f70 100644 --- a/dev/reference/MSTSegments.html +++ b/dev/reference/MSTSegments.html @@ -23,7 +23,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/MapTrees.html b/dev/reference/MapTrees.html index ced02a44..7e7df4bb 100644 --- a/dev/reference/MapTrees.html +++ b/dev/reference/MapTrees.html @@ -15,7 +15,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/MappingQuality.html b/dev/reference/MappingQuality.html index 918ac41e..daac9b80 100644 --- a/dev/reference/MappingQuality.html +++ b/dev/reference/MappingQuality.html @@ -25,7 +25,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/MatchingSplitDistance.html b/dev/reference/MatchingSplitDistance.html index 5f09ed8a..10214de7 100644 --- a/dev/reference/MatchingSplitDistance.html +++ b/dev/reference/MatchingSplitDistance.html @@ -19,7 +19,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 @@ -202,15 +202,17 @@ Examples#> [1] 2 #> attr(,"matching") #> [1] 2 1 3 +#> attr(,"matchedSplits") +#> [1] "t1 t2 t3 | t4 t5 t6 => t4 t5 t6 | t1 t2 t3" +#> [2] "t1 t2 | t3 t4 t5 t6 => t3 t4 t5 t6 | t1 t2" +#> [3] "t4 t5 | t1 t2 t3 t6 => t5 t6 | t1 t2 t3 t4" +#> attr(,"matchedScores") +#> [1] 0 0 2 #> attr(,"pairScores") #> [,1] [,2] [,3] #> [1,] 1 0 1 #> [2,] 0 1 2 #> [3,] 2 1 2 -#> attr(,"matchedSplits") -#> [1] "t1 t2 t3 | t4 t5 t6 => t4 t5 t6 | t1 t2 t3" -#> [2] "t1 t2 | t3 t4 t5 t6 => t3 t4 t5 t6 | t1 t2" -#> [3] "t4 t5 | t1 t2 t3 t6 => t5 t6 | t1 t2 t3 t4" VisualizeMatching(MatchingSplitDistance, TreeTools::BalancedTree(6), TreeTools::PectinateTree(6)) diff --git a/dev/reference/MeilaVariationOfInformation.html b/dev/reference/MeilaVariationOfInformation.html index a0f051a7..da553429 100644 --- a/dev/reference/MeilaVariationOfInformation.html +++ b/dev/reference/MeilaVariationOfInformation.html @@ -17,7 +17,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/NNIDist.html b/dev/reference/NNIDist.html index d9f4f562..24e69a23 100644 --- a/dev/reference/NNIDist.html +++ b/dev/reference/NNIDist.html @@ -21,7 +21,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/NormalizeInfo.html b/dev/reference/NormalizeInfo.html index 2887c28b..8bd7bcfc 100644 --- a/dev/reference/NormalizeInfo.html +++ b/dev/reference/NormalizeInfo.html @@ -17,7 +17,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/NyeSimilarity.html b/dev/reference/NyeSimilarity.html index 7c5cb4f0..dee87a00 100644 --- a/dev/reference/NyeSimilarity.html +++ b/dev/reference/NyeSimilarity.html @@ -31,7 +31,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/PathDist.html b/dev/reference/PathDist.html index cec25479..3608e4b0 100644 --- a/dev/reference/PathDist.html +++ b/dev/reference/PathDist.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/Plot3.html b/dev/reference/Plot3.html index 96edc4fe..a06457a3 100644 --- a/dev/reference/Plot3.html +++ b/dev/reference/Plot3.html @@ -19,7 +19,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/ReduceTrees.html b/dev/reference/ReduceTrees.html index b566aeaf..dee363da 100644 --- a/dev/reference/ReduceTrees.html +++ b/dev/reference/ReduceTrees.html @@ -25,7 +25,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/ReportMatching.html b/dev/reference/ReportMatching.html index e0169ec6..22f6d740 100644 --- a/dev/reference/ReportMatching.html +++ b/dev/reference/ReportMatching.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/Robinson-Foulds.html b/dev/reference/Robinson-Foulds.html index d23b6ee2..3d7010f3 100644 --- a/dev/reference/Robinson-Foulds.html +++ b/dev/reference/Robinson-Foulds.html @@ -33,7 +33,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/SPRDist.html b/dev/reference/SPRDist.html index 67ceceb3..97921870 100644 --- a/dev/reference/SPRDist.html +++ b/dev/reference/SPRDist.html @@ -23,7 +23,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/SpectralEigens.html b/dev/reference/SpectralEigens.html index 927257f4..4801c628 100644 --- a/dev/reference/SpectralEigens.html +++ b/dev/reference/SpectralEigens.html @@ -17,7 +17,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/SplitEntropy.html b/dev/reference/SplitEntropy.html index 58a6b932..f2b81218 100644 --- a/dev/reference/SplitEntropy.html +++ b/dev/reference/SplitEntropy.html @@ -29,7 +29,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/SplitSharedInformation.html b/dev/reference/SplitSharedInformation.html index c8346ffa..d8647ea5 100644 --- a/dev/reference/SplitSharedInformation.html +++ b/dev/reference/SplitSharedInformation.html @@ -19,7 +19,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/SplitsCompatible.html b/dev/reference/SplitsCompatible.html index 23456267..b5a191fe 100644 --- a/dev/reference/SplitsCompatible.html +++ b/dev/reference/SplitsCompatible.html @@ -15,7 +15,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/StartParallel.html b/dev/reference/StartParallel.html index 26731944..3c586781 100644 --- a/dev/reference/StartParallel.html +++ b/dev/reference/StartParallel.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/TreeDist-package.html b/dev/reference/TreeDist-package.html index 4aa51ef0..961aa094 100644 --- a/dev/reference/TreeDist-package.html +++ b/dev/reference/TreeDist-package.html @@ -21,7 +21,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/TreeDistPlot.html b/dev/reference/TreeDistPlot.html index 7eecf413..595443d8 100644 --- a/dev/reference/TreeDistPlot.html +++ b/dev/reference/TreeDistPlot.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/TreeDistance.html b/dev/reference/TreeDistance.html index d588dd59..98ae4897 100644 --- a/dev/reference/TreeDistance.html +++ b/dev/reference/TreeDistance.html @@ -17,7 +17,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/TreeInfo.html b/dev/reference/TreeInfo.html index f15076f4..161e2766 100644 --- a/dev/reference/TreeInfo.html +++ b/dev/reference/TreeInfo.html @@ -27,7 +27,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/reference/VisualizeMatching.html b/dev/reference/VisualizeMatching.html index 819f2f97..91ec6560 100644 --- a/dev/reference/VisualizeMatching.html +++ b/dev/reference/VisualizeMatching.html @@ -1,5 +1,5 @@ -Visualise a matching — VisualizeMatching • TreeDistVisualize a matching — VisualizeMatching • TreeDistTreeDist - 2.8.0.9000 + 2.8.0.9001 @@ -58,7 +58,7 @@ - Visualise a matching + Visualize a matching Source: R/VisualizeMatching.R VisualizeMatching.Rd @@ -80,6 +80,9 @@ Usage Plot = plot.phylo, matchZeros = TRUE, plainEdges = FALSE, + edge.cex = par("cex"), + value.cex = edge.cex * 0.8, + edge.frame = "rect", edge.width = 1, edge.color = "black", ... @@ -123,10 +126,32 @@ Argumentsedge.cex +Character expansion for edge labels. +If FALSE, suppress edge labels. + + +value.cex +Character expansion for values on edge labels. +If FALSE, values are not displayed. + + +edge.frame +Character specifying the kind of frame to be printed around +the text of the edge labels. Choose an abbreviation of "rect", "circle", +or "none". + + edge.width, edge.color, ... Additional parameters to send to Plot(). + + Value + VisualizeMatching() invisibly returns the matching of splits +between tree1 and tree2 (i.e. +Func(tree1, tree2, reportMatching = TRUE)) + Details Note that when visualizing a Robinson–Foulds distance (using @@ -148,8 +173,27 @@ Examples VisualizeMatching(RobinsonFouldsMatching, tree1, tree2) -VisualizeMatching(SharedPhylogeneticInfo, tree1, tree2, matchZeros = FALSE) +matching <- VisualizeMatching(SharedPhylogeneticInfo, tree1, tree2, + matchZeros = FALSE) +attributes(matching) +#> $matching +#> [1] 2 1 3 +#> +#> $matchedSplits +#> [1] "t1 t2 t3 | t4 t5 t6 => t4 t5 t6 | t1 t2 t3" +#> [2] "t1 t2 | t3 t4 t5 t6 => t3 t4 t5 t6 | t1 t2" +#> [3] "t4 t5 | t1 t2 t3 t6 .. t5 t6 | t1 t2 t3 t4" +#> +#> $matchedScores +#> [1] 3.544321 2.807355 0.000000 +#> +#> $pairScores +#> [,1] [,2] [,3] +#> [1,] 1.2223924 3.544321 1.2223924 +#> [2,] 2.8073549 1.222392 0.4854268 +#> [3,] 0.4854268 1.222392 0.0000000 +#>
## $matching ## [1] 1 2 NA 4 5 3 ## +## $matchedSplits +## [1] "A B | C D E F G H I => A B | C D E F G H I" +## [2] "C D E | A B F G H I => C D E I | A B F G H" +## [3] "F G H I | A B C D E => F G H | A B C D E I" +## [4] "G H I | A B C D E F => G H | A B C D E F I" +## [5] "H I | A B C D E F G .. E I | A B C D F G H" +## +## $matchedScores +## [1] 3.700440 3.252981 NA 3.252981 2.115477 0.000000 +## ## $pairScores ## [,1] [,2] [,3] [,4] [,5] ## [1,] 3.7004397 0.8930848 0.2410081 0.5305147 0.2410081 @@ -330,14 +340,7 @@ Constructing a matching## [3,] 0.2410081 1.3785116 0.0000000 0.5305147 0.2410081 ## [4,] 0.8930848 0.0000000 0.0000000 3.2529807 1.3785116 ## [5,] 0.5305147 0.0000000 0.0000000 0.0000000 2.1154772 -## [6,] 0.2410081 0.0000000 0.0000000 0.0000000 0.0000000 -## -## $matchedSplits -## [1] "A B | C D E F G H I => A B | C D E F G H I" -## [2] "C D E | A B F G H I => C D E I | A B F G H" -## [3] "F G H I | A B C D E => F G H | A B C D E I" -## [4] "G H I | A B C D E F => G H | A B C D E F I" -## [5] "H I | A B C D E F G .. E I | A B C D F G H"
.. denotes that the fifth matching contributes zero to similarity score; an alternative optimal matching would leave these splits unpaired.
..
## [1] 6.960578 ## attr(,"matching") ## [1] 1 2 3 5 6 4 +## attr(,"matchedSplits") +## [1] "B C D E | A F G H I => B C D H I | A E F G" +## [2] "C D E | A B F G H I => C D H I | A B E F G" +## [3] "D E | A B C F G H I => D H I | A B C E F G" +## [4] "F G H I | A B C D E => E F G | A B C D H I" +## [5] "F G | A B C D E H I => F G | A B C D E H I" +## [6] "H I | A B C D E F G => H I | A B C D E F G" +## attr(,"matchedScores") +## [1] 0.09109101 0.07278023 0.02475761 0.07278023 0.76420451 0.76420451 ## attr(,"pairScores") ## [,1] [,2] [,3] [,4] [,5] [,6] ## [1,] 0.091091008 0.007214618 0.01831078 0.22478751 0.01831078 0.22478751 @@ -185,14 +194,7 @@ Visualizing a matching## [3,] 0.002565287 0.002565287 0.02475761 0.09288851 0.02475761 0.09288851 ## [4,] 0.007214618 0.007214618 0.07278023 0.31976006 0.07278023 0.31976006 ## [5,] 0.319760062 0.224787510 0.15200728 0.09288851 0.45810590 0.76420451 -## [6,] 0.224787510 0.319760062 0.45810590 0.76420451 0.15200728 0.09288851 -## attr(,"matchedSplits") -## [1] "B C D E | A F G H I => B C D H I | A E F G" -## [2] "C D E | A B F G H I => C D H I | A B E F G" -## [3] "D E | A B C F G H I => D H I | A B C E F G" -## [4] "F G H I | A B C D E => E F G | A B C D H I" -## [5] "F G | A B C D E H I => F G | A B C D E H I" -## [6] "H I | A B C D E F G => H I | A B C D E F G"
Here, the pairScores attribute lists the score of each possible matching of splits.
pairScores
We can identify the splits with:
(Use the mouse to reorient)
Smith, M.R. (2020b). TreeDist: Distances between Phylogenetic Trees. R package version 2.8.0.9000. Comprehensive R Archive Network. doi:10.5281/zenodo.3528124
Smith, M.R. (2020b). TreeDist: Distances between Phylogenetic Trees. R package version 2.8.0.9001. Comprehensive R Archive Network. doi:10.5281/zenodo.3528124
@Manual{TreeDist, - title = {TreeDist: Distances between Phylogenetic Trees. R package version 2.8.0.9000}, + title = {TreeDist: Distances between Phylogenetic Trees. R package version 2.8.0.9001}, author = {Martin R. Smith}, doi = {10.5281/zenodo.3528124}, journal = {Comprehensive R Archive Network}, diff --git a/dev/index.html b/dev/index.html index 3fcff9f1..a226174e 100644 --- a/dev/index.html +++ b/dev/index.html @@ -30,7 +30,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 diff --git a/dev/news/index.html b/dev/news/index.html index db886007..93be366d 100644 --- a/dev/news/index.html +++ b/dev/news/index.html @@ -13,7 +13,7 @@ TreeDist - 2.8.0.9000 + 2.8.0.9001 @@ -59,8 +59,10 @@ Changelog
VisualizeMatching()
SpectralEigens()
nEig
reportMatching = TRUE
matching: which split in splits2 is optimally matched to each split in split1 (NA if not matched);
matching
splits2
split1
NA
pairScores: Calculated scores for each possible matching of each split.
matchedSplits: Textual representation of each match
matchedSplits
matchedScores: Scores for matched split.
matchedScores
R/VisualizeMatching.R
VisualizeMatching.Rd
Character expansion for edge labels. +If FALSE, suppress edge labels.
FALSE
Character expansion for values on edge labels. +If FALSE, values are not displayed.
Character specifying the kind of frame to be printed around +the text of the edge labels. Choose an abbreviation of "rect", "circle", +or "none".
"rect"
"circle"
"none"
Additional parameters to send to Plot().
Plot()
VisualizeMatching() invisibly returns the matching of splits +between tree1 and tree2 (i.e. +Func(tree1, tree2, reportMatching = TRUE))
tree1
tree2
Func(tree1, tree2, reportMatching = TRUE)
Note that when visualizing a Robinson–Foulds distance (using @@ -148,8 +173,27 @@