Skip to content

Commit

Permalink
–→\ifelse{html}{&#ndash;}{--}
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Smith committed Jan 20, 2021
1 parent 2962804 commit 6c448ea
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 45 deletions.
10 changes: 5 additions & 5 deletions R/TreeDist-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' distance-based tree spaces.
#'
#' 'TreeDist' primarily employs metrics in the category of
#' 'generalized RobinsonFoulds 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
Expand All @@ -15,7 +15,7 @@
#'
#' ## Generalized RF distances
#'
#' The [RobinsonFoulds 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,
Expand Down Expand Up @@ -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 JaccardRobinsonFoulds 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)
Expand Down Expand Up @@ -99,9 +99,9 @@
#'
#' * [ape](http://ape-package.ird.fr/):
#' - `cophenetic.phylo()`: Cophenetic distance
#' - `dist.topo()`: Path (topological) distance, RobinsonFoulds distance.
#' - `dist.topo()`: Path (topological) distance, Robinson\ifelse{html}{&#ndash;}{--}Foulds distance.
#' * [phangorn](https://cran.r-project.org/package=phangorn)
#' - `treedist()`: Path, RobinsonFoulds 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
Expand Down
6 changes: 3 additions & 3 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 RobinsonFoulds](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 RobinsonFoulds 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 RobinsonFoulds _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.
Expand Down
5 changes: 3 additions & 2 deletions R/tree_distance.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' Generalized RobinsonFoulds 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`
Expand Down
4 changes: 2 additions & 2 deletions R/tree_distance_info.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#' Information-based generalized RobinsonFoulds 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 RobinsonFoulds 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
Expand Down
12 changes: 6 additions & 6 deletions R/tree_distance_nye.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Nye _et al_. (2006) tree comparison
#'
#' `NyeSimilarity()` and `NyeSplitSimilarity()` implement the
#' [Generalized RobinsonFoulds](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
Expand Down Expand Up @@ -103,14 +103,14 @@ NyeSplitSimilarity <- function (splits1, splits2,
reportMatching = reportMatching)
}

#' JaccardRobinsonFoulds metric
#' Jaccard\ifelse{html}{&#ndash;}{--}Robinson\ifelse{html}{&#ndash;}{--}Foulds metric
#'
#' Calculate the
#' [JaccardRobinsonFoulds 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&ouml;cker _et al_. 2013), a
#' [Generalized RobinsonFoulds 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 JaccardRobinsonFoulds 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
Expand All @@ -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&ouml;cker _et al_.
#' The Nye _et al_. metric uses `k = 1`.
#' As k increases towards infinity, the metric converges to the RobinsonFoulds
#' 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
Expand Down
10 changes: 6 additions & 4 deletions R/tree_distance_rf.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#' RobinsonFoulds 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.
Expand Down
2 changes: 1 addition & 1 deletion inst/treespace/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Sand2014 <- Reference(
year = 2014
)
Smith2020 <- Reference('Smith, M.R.', 2020,
'Information theoretic Generalized RobinsonFoulds 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',
Expand Down
5 changes: 3 additions & 2 deletions man/GeneralizedRF.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions man/JaccardRobinsonFoulds.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/NyeSimilarity.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions man/Robinson-Foulds.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions man/TreeDist-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/TreeDistance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/VisualizeMatching.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6c448ea

Please sign in to comment.