diff --git a/R/TreeDist-package.R b/R/TreeDist-package.R index 376b1814a..95bf169d3 100644 --- a/R/TreeDist-package.R +++ b/R/TreeDist-package.R @@ -6,7 +6,7 @@ #' distance-based tree spaces. #' #' 'TreeDist' primarily employs metrics in the category of -#' 'generalized Robinson–Foulds distances': they are based on comparing splits +#' 'generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds distances': they are based on comparing splits #' (bipartitions) between trees, and thus reflect the relationship data within #' trees, with no reference to branch lengths. #' Detailed documentation and usage instructions are @@ -15,7 +15,7 @@ #' #' ## Generalized RF distances #' -#' The [Robinson–Foulds distance](https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html) +#' The [Robinson\ifelse{html}{&#ndash;}{--}Foulds distance](https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html) #' simply tallies the number of non-trivial splits (sometimes inaccurately #' termed clades, nodes or edges) that occur in both trees -- any splits that are #' not perfectly identical contributes one point to the distance score of zero, @@ -48,7 +48,7 @@ #' + Nye _et al._ (2006) score matchings according to the size of the largest #' split that is consistent with both of them, normalized against #' the Jaccard index. This approach is extended by Böcker _et al_. (2013) -#' with the Jaccard–Robinson–Foulds metric (function +#' with the Jaccard\ifelse{html}{&#ndash;}{--}Robinson\ifelse{html}{&#ndash;}{--}Foulds metric (function #' [`JaccardRobinsonFoulds()`](https://ms609.github.io/TreeDist/reference/JaccardRobinsonFoulds.html)). #' #' * [`MatchingSplitDistance()`](https://ms609.github.io/TreeDist/reference/MatchingSplitDistance.html) @@ -99,9 +99,9 @@ #' #' * [ape](http://ape-package.ird.fr/): #' - `cophenetic.phylo()`: Cophenetic distance -#' - `dist.topo()`: Path (topological) distance, Robinson–Foulds distance. +#' - `dist.topo()`: Path (topological) distance, Robinson\ifelse{html}{&#ndash;}{--}Foulds distance. #' * [phangorn](https://cran.r-project.org/package=phangorn) -#' - `treedist()`: Path, Robinson–Foulds and approximate SPR distances. +#' - `treedist()`: Path, Robinson\ifelse{html}{&#ndash;}{--}Foulds and approximate SPR distances. #' * [Quartet](https://ms609.github.io/Quartet/): Triplet and Quartet distances, #' using the tqDist algorithm. #' * [TBRDist](https://ms609.github.io/TBRDist/): TBR and SPR distances on diff --git a/R/plot.R b/R/plot.R index cb1464795..7d28395e2 100644 --- a/R/plot.R +++ b/R/plot.R @@ -61,13 +61,13 @@ TreeDistPlot <- function (tr, title = NULL, bold = NULL, leaveRoom = FALSE, #' Visualise a matching #' #' Depict the splits that are matched between two trees using a specified -#' [Generalized Robinson–Foulds](https://ms609.github.io/TreeDist/articles/Generalized-RF.html) +#' [Generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds](https://ms609.github.io/TreeDist/articles/Generalized-RF.html) #' similarity measure. #' -#' Note that when visualizing a Robinson–Foulds distance (using +#' Note that when visualizing a Robinson\ifelse{html}{&#ndash;}{--}Foulds distance (using #' `Func = RobinsonFouldsMatching`), matched splits are assigned a _similarity_ #' score of 1, which is deducted from the total number of splits to calculate -#' the Robinson–Foulds _distance_. Unmatched splits thus contribute one to +#' the Robinson\ifelse{html}{&#ndash;}{--}Foulds _distance_. Unmatched splits thus contribute one to #' total tree distance. #' #' @param Func Function used to construct tree similarity. diff --git a/R/tree_distance.R b/R/tree_distance.R index 10d4add5f..d9088a4f6 100644 --- a/R/tree_distance.R +++ b/R/tree_distance.R @@ -1,6 +1,7 @@ -#' Generalized Robinson–Foulds distance +#' Generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds distance #' -#' An internal function to calculate Generalized Robinson–Foulds distances from +#' An internal function to calculate Generalized +#' Robinson\ifelse{html}{&#ndash;}{--}Foulds distances from #' splits. #' #' Note that no checks will be made to confirm that `splits1` and `splits2` diff --git a/R/tree_distance_info.R b/R/tree_distance_info.R index 1104902e7..1f88948e2 100644 --- a/R/tree_distance_info.R +++ b/R/tree_distance_info.R @@ -1,11 +1,11 @@ -#' Information-based generalized Robinson–Foulds distances +#' Information-based generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds distances #' #' Calculate tree similarity and distance measures based on the amount of #' phylogenetic or clustering information that two trees hold in common, as #' proposed in Smith (2020). #' #' -#' [Generalized Robinson–Foulds distances](https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances) +#' [Generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds distances](https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances) #' calculate tree similarity by finding an #' optimal matching that the similarity between a split on one tree #' and its pair on a second, considering all possible ways to pair splits diff --git a/R/tree_distance_nye.R b/R/tree_distance_nye.R index c353e1d5b..7fc1430ba 100644 --- a/R/tree_distance_nye.R +++ b/R/tree_distance_nye.R @@ -1,7 +1,7 @@ #' Nye _et al_. (2006) tree comparison #' #' `NyeSimilarity()` and `NyeSplitSimilarity()` implement the -#' [Generalized Robinson–Foulds](https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances) +#' [Generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds](https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances) #' tree comparison metric of Nye _et al_. (2006). #' In short, this finds the optimal matching that pairs each branch from #' one tree with a branch in the second, where matchings are scored according to @@ -103,14 +103,14 @@ NyeSplitSimilarity <- function (splits1, splits2, reportMatching = reportMatching) } -#' Jaccard–Robinson–Foulds metric +#' Jaccard\ifelse{html}{&#ndash;}{--}Robinson\ifelse{html}{&#ndash;}{--}Foulds metric #' #' Calculate the -#' [Jaccard–Robinson–Foulds metric](https://ms609.github.io/TreeDist/articles/Generalized-RF.html#jaccard-robinson-foulds-metric) +#' [Jaccard\ifelse{html}{&#ndash;}{--}Robinson\ifelse{html}{&#ndash;}{--}Foulds metric](https://ms609.github.io/TreeDist/articles/Generalized-RF.html#jaccard-robinson-foulds-metric) #' (Böcker _et al_. 2013), a -#' [Generalized Robinson–Foulds metric](https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances). +#' [Generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds metric](https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances). #' -#' In short, the Jaccard–Robinson–Foulds metric is a generalized Robinson-Foulds +#' In short, the Jaccard\ifelse{html}{&#ndash;}{--}Robinson\ifelse{html}{&#ndash;}{--}Foulds metric is a generalized Robinson-Foulds #' metric: it finds the optimal matching that pairs each split in one tree with #' a similar split in the second. #' Matchings are scored according to the size of the largest split that is @@ -132,7 +132,7 @@ NyeSplitSimilarity <- function (splits1, splits2, #' @param k An arbitrary exponent to which to raise the Jaccard index. #' Integer values greater than one are anticipated by Böcker _et al_. #' The Nye _et al_. metric uses `k = 1`. -#' As k increases towards infinity, the metric converges to the Robinson–Foulds +#' As k increases towards infinity, the metric converges to the Robinson\ifelse{html}{&#ndash;}{--}Foulds #' metric. #' @param allowConflict Logical specifying whether to allow conflicting splits #' to be paired. If `FALSE`, such pairings will be allocated a similarity diff --git a/R/tree_distance_rf.R b/R/tree_distance_rf.R index cc5a652fc..d11e40139 100644 --- a/R/tree_distance_rf.R +++ b/R/tree_distance_rf.R @@ -1,9 +1,11 @@ -#' Robinson–Foulds distances, with adjustments for phylogenetic information +#' Robinson\ifelse{html}{&#ndash;}{--}Foulds distances, with adjustments for phylogenetic information #' content #' -#' Calculate the Robinson–Foulds distance, or the equivalent similarity -#' measure, with options to (i) annotate matched splits; (ii) weight splits -#' according to their phylogenetic information content (Smith 2020). +#' Calculate the Robinson\ifelse{html}{&#ndash;}{--}Foulds distance, or +#' the equivalent similarity measure, with options to +#' (i) annotate matched splits; +#' (ii) weight splits according to their phylogenetic information content +#' (Smith 2020). #' #' Note that if `reportMatching = TRUE`, the `pairScores` attribute returns #' a logical matrix specifying whether each pair of splits is identical. diff --git a/inst/treespace/app.R b/inst/treespace/app.R index 630db1713..05506e8a7 100644 --- a/inst/treespace/app.R +++ b/inst/treespace/app.R @@ -160,7 +160,7 @@ Sand2014 <- Reference( year = 2014 ) Smith2020 <- Reference('Smith, M.R.', 2020, - 'Information theoretic Generalized Robinson–Foulds metrics for comparing phylogenetic trees', + 'Information theoretic Generalized Robinson-Foulds metrics for comparing phylogenetic trees', 'Bioinformatics', pages = 'In production', doi = "10.1093/bioinformatics/btaa614") Smith2021 <- Reference('*Smith, M.R.', 2021, 'The importance of methodology when analyzing landscapes of phylogenetic trees', diff --git a/man/GeneralizedRF.Rd b/man/GeneralizedRF.Rd index d581436a2..ec1517ae1 100644 --- a/man/GeneralizedRF.Rd +++ b/man/GeneralizedRF.Rd @@ -3,7 +3,7 @@ \encoding{UTF-8} \name{GeneralizedRF} \alias{GeneralizedRF} -\title{Generalized Robinson–Foulds distance} +\title{Generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds distance} \usage{ GeneralizedRF( splits1, @@ -51,7 +51,8 @@ specified pair scorer. If \code{reportMatching = TRUE}, attribute also list: } } \description{ -An internal function to calculate Generalized Robinson–Foulds distances from +An internal function to calculate Generalized +Robinson\ifelse{html}{&#ndash;}{--}Foulds distances from splits. } \details{ diff --git a/man/JaccardRobinsonFoulds.Rd b/man/JaccardRobinsonFoulds.Rd index 9984bb7dc..41bcc3976 100644 --- a/man/JaccardRobinsonFoulds.Rd +++ b/man/JaccardRobinsonFoulds.Rd @@ -4,7 +4,7 @@ \name{JaccardRobinsonFoulds} \alias{JaccardRobinsonFoulds} \alias{JaccardSplitSimilarity} -\title{Jaccard–Robinson–Foulds metric} +\title{Jaccard\ifelse{html}{&#ndash;}{--}Robinson\ifelse{html}{&#ndash;}{--}Foulds metric} \usage{ JaccardRobinsonFoulds( tree1, @@ -39,7 +39,7 @@ or lists of such trees to undergo pairwise comparison. Where implemented, \item{k}{An arbitrary exponent to which to raise the Jaccard index. Integer values greater than one are anticipated by Böcker \emph{et al}. The Nye \emph{et al}. metric uses \code{k = 1}. -As k increases towards infinity, the metric converges to the Robinson–Foulds +As k increases towards infinity, the metric converges to the Robinson\ifelse{html}{&#ndash;}{--}Foulds metric.} \item{allowConflict}{Logical specifying whether to allow conflicting splits @@ -80,12 +80,12 @@ or \code{splits1} and \code{splits2}. } \description{ Calculate the -\href{https://ms609.github.io/TreeDist/articles/Generalized-RF.html#jaccard-robinson-foulds-metric}{Jaccard–Robinson–Foulds metric} +\href{https://ms609.github.io/TreeDist/articles/Generalized-RF.html#jaccard-robinson-foulds-metric}{Jaccard\ifelse{html}{&#ndash;}{--}Robinson\ifelse{html}{&#ndash;}{--}Foulds metric} (Böcker \emph{et al}. 2013), a -\href{https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances}{Generalized Robinson–Foulds metric}. +\href{https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances}{Generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds metric}. } \details{ -In short, the Jaccard–Robinson–Foulds metric is a generalized Robinson-Foulds +In short, the Jaccard\ifelse{html}{&#ndash;}{--}Robinson\ifelse{html}{&#ndash;}{--}Foulds metric is a generalized Robinson-Foulds metric: it finds the optimal matching that pairs each split in one tree with a similar split in the second. Matchings are scored according to the size of the largest split that is diff --git a/man/NyeSimilarity.Rd b/man/NyeSimilarity.Rd index 73808bca9..d8efc7647 100644 --- a/man/NyeSimilarity.Rd +++ b/man/NyeSimilarity.Rd @@ -79,7 +79,7 @@ or \code{splits1} and \code{splits2}. } \description{ \code{NyeSimilarity()} and \code{NyeSplitSimilarity()} implement the -\href{https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances}{Generalized Robinson–Foulds} +\href{https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances}{Generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds} tree comparison metric of Nye \emph{et al}. (2006). In short, this finds the optimal matching that pairs each branch from one tree with a branch in the second, where matchings are scored according to diff --git a/man/Robinson-Foulds.Rd b/man/Robinson-Foulds.Rd index 528521306..79bc5ee02 100644 --- a/man/Robinson-Foulds.Rd +++ b/man/Robinson-Foulds.Rd @@ -9,7 +9,7 @@ \alias{RobinsonFoulds} \alias{RobinsonFouldsMatching} \alias{RobinsonFouldsSplits} -\title{Robinson–Foulds distances, with adjustments for phylogenetic information +\title{Robinson\ifelse{html}{&#ndash;}{--}Foulds distances, with adjustments for phylogenetic information content} \usage{ InfoRobinsonFoulds( @@ -96,9 +96,11 @@ distances between each pair of trees in \code{tree1} and \code{tree2}, or \code{splits1} and \code{splits2}. } \description{ -Calculate the Robinson–Foulds distance, or the equivalent similarity -measure, with options to (i) annotate matched splits; (ii) weight splits -according to their phylogenetic information content (Smith 2020). +Calculate the Robinson\ifelse{html}{&#ndash;}{--}Foulds distance, or +the equivalent similarity measure, with options to +(i) annotate matched splits; +(ii) weight splits according to their phylogenetic information content +(Smith 2020). } \details{ Note that if \code{reportMatching = TRUE}, the \code{pairScores} attribute returns diff --git a/man/TreeDist-package.Rd b/man/TreeDist-package.Rd index 0c7c07135..5c82bf725 100644 --- a/man/TreeDist-package.Rd +++ b/man/TreeDist-package.Rd @@ -14,14 +14,14 @@ distance-based tree spaces. } \details{ 'TreeDist' primarily employs metrics in the category of -'generalized Robinson–Foulds distances': they are based on comparing splits +'generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds distances': they are based on comparing splits (bipartitions) between trees, and thus reflect the relationship data within trees, with no reference to branch lengths. Detailed documentation and usage instructions are \href{https://ms609.github.io/TreeDist/}{available online} or in the vignettes. \subsection{Generalized RF distances}{ -The \href{https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html}{Robinson–Foulds distance} +The \href{https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html}{Robinson\ifelse{html}{&#ndash;}{--}Foulds distance} simply tallies the number of non-trivial splits (sometimes inaccurately termed clades, nodes or edges) that occur in both trees -- any splits that are not perfectly identical contributes one point to the distance score of zero, @@ -54,7 +54,7 @@ distance.) \item Nye \emph{et al.} (2006) score matchings according to the size of the largest split that is consistent with both of them, normalized against the Jaccard index. This approach is extended by Böcker \emph{et al}. (2013) -with the Jaccard–Robinson–Foulds metric (function +with the Jaccard\ifelse{html}{&#ndash;}{--}Robinson\ifelse{html}{&#ndash;}{--}Foulds metric (function \href{https://ms609.github.io/TreeDist/reference/JaccardRobinsonFoulds.html}{\code{JaccardRobinsonFoulds()}}). } \item \href{https://ms609.github.io/TreeDist/reference/MatchingSplitDistance.html}{\code{MatchingSplitDistance()}} @@ -114,11 +114,11 @@ Other R packages implementing tree distance functions include: \item \href{http://ape-package.ird.fr/}{ape}: \itemize{ \item \code{cophenetic.phylo()}: Cophenetic distance -\item \code{dist.topo()}: Path (topological) distance, Robinson–Foulds distance. +\item \code{dist.topo()}: Path (topological) distance, Robinson\ifelse{html}{&#ndash;}{--}Foulds distance. } \item \href{https://cran.r-project.org/package=phangorn}{phangorn} \itemize{ -\item \code{treedist()}: Path, Robinson–Foulds and approximate SPR distances. +\item \code{treedist()}: Path, Robinson\ifelse{html}{&#ndash;}{--}Foulds and approximate SPR distances. } \item \href{https://ms609.github.io/Quartet/}{Quartet}: Triplet and Quartet distances, using the tqDist algorithm. diff --git a/man/TreeDistance.Rd b/man/TreeDistance.Rd index 9a767326b..f375e513f 100644 --- a/man/TreeDistance.Rd +++ b/man/TreeDistance.Rd @@ -16,7 +16,7 @@ \alias{MatchingSplitInfo} \alias{MatchingSplitInfoDistance} \alias{MatchingSplitInfoSplits} -\title{Information-based generalized Robinson–Foulds distances} +\title{Information-based generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds distances} \usage{ TreeDistance(tree1, tree2 = tree1) @@ -140,7 +140,7 @@ phylogenetic or clustering information that two trees hold in common, as proposed in Smith (2020). } \details{ -\href{https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances}{Generalized Robinson–Foulds distances} +\href{https://ms609.github.io/TreeDist/articles/Robinson-Foulds.html#generalized-robinson-foulds-distances}{Generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds distances} calculate tree similarity by finding an optimal matching that the similarity between a split on one tree and its pair on a second, considering all possible ways to pair splits diff --git a/man/VisualizeMatching.Rd b/man/VisualizeMatching.Rd index f1edd25fa..0dfad14ab 100644 --- a/man/VisualizeMatching.Rd +++ b/man/VisualizeMatching.Rd @@ -43,14 +43,14 @@ similarity of the associated splits (\code{FALSE}).} } \description{ Depict the splits that are matched between two trees using a specified -\href{https://ms609.github.io/TreeDist/articles/Generalized-RF.html}{Generalized Robinson–Foulds} +\href{https://ms609.github.io/TreeDist/articles/Generalized-RF.html}{Generalized Robinson\ifelse{html}{&#ndash;}{--}Foulds} similarity measure. } \details{ -Note that when visualizing a Robinson–Foulds distance (using +Note that when visualizing a Robinson\ifelse{html}{&#ndash;}{--}Foulds distance (using \code{Func = RobinsonFouldsMatching}), matched splits are assigned a \emph{similarity} score of 1, which is deducted from the total number of splits to calculate -the Robinson–Foulds \emph{distance}. Unmatched splits thus contribute one to +the Robinson\ifelse{html}{&#ndash;}{--}Foulds \emph{distance}. Unmatched splits thus contribute one to total tree distance. } \examples{