Skip to contents

Plot the scaled integration scores to compare the obtained integrations

Usage

PlotScores(
  object,
  plot.type = c("dot", "radar", "lollipop"),
  split.by.score.type = TRUE,
  order.by = c("score", "name", "asis"),
  hide.zeros = FALSE,
  include.integration = NULL,
  exclude.integration = NULL,
  include.score = NULL,
  exclude.score = NULL,
  recompute.overall.scores = TRUE,
  rescale = c("rank", "score", "none"),
  batch.coeff = 0.4,
  bio.coeff = 0.6,
  point.max.size = 20L,
  use.ggforce = is_installed("ggforce")
)

Arguments

object

a Seurat object

plot.type

one of 'table' (default), 'radar' or 'lollipop'. Type of desired plot

split.by.score.type

whether to split scores by type (bio-conservation, batch correction and overall scores). When set to FALSE, all scores are mixed in a single figure.

order.by

one of 'score' (default), 'name' or 'asis'. Determines the order of integrations in the legend (and on the y-axis for lolliplop and table plots). Scores are ordered by decreasing overall score by default, by name or by row-order when setting 'name' and 'asis' respectively.

hide.zeros

whether zero(ed) scores should be visible on the plot.

include.integration

name of the integration(s) to include. The default value (NULL) enable to include them all.

exclude.integration

name of the integration(s) to exclude. The default value (NULL) enable to include them all.

include.score

name of the score(s) to include. The default value (NULL) enable to include them all.

exclude.score

name of the score(s) to exclude. The default value (NULL) enable to include them all.

recompute.overall.scores

whether to recompute overall scores. Useful when some scores or integrations are excluded. When FALSE, coefficient parameters have no impact.

rescale

whether to rescale each score between 0 and 1 using min-max normalisation before computing overall scores. One of 'rank' (default), 'score' or 'none'. The first two enable rescaling on ranks and scores respectively, while 'none' disables rescaling. Rescaling ensures that each metric equally contributes to the overall scores. 'rank' is more stable to changes in integrations included. Has no effect when recompute.overall.scores = FALSE.

batch.coeff

the weight of batch correction performance evaluation scores in the overall score.

bio.coeff

the weight of bio-conservation performance evaluation scores in the overall score.

point.max.size

inoperative unless plot.type = 'table' and use.ggforce = FALSE. Determine the maximum size of the points (only achieved for a score of 1) to fit the plotting area (handled automaticaly when ggforce is used).

use.ggforce

for plot.type = 'table', enable or disable the use of ggforce to draw the circles. Used by default when the package is installed

Value

a ggplot object

Details

The rescale parameter controls how scores are rescaled prior to computing overall scores. Thus, when rescale != 'none', recompute.overall.scores should be TRUE (default). Otherwise, the overall scores will no longer match the scores displayed on the plot.

Albeit the min-max rescaling of scores in Luecken M.D. et al., 2022 is achievable with rescale = 'score', min-max rescaling on ranks (rescale = 'rank') is the default. Indeed, it results in more stable rankings of overall scores when the list of integrations to plot is modified.

To plot non-rescaled scores, make sure to use ScaleScores(..., rescale = "none") beforehand. To plot rescaled scores however, the rescale parameter of ScaleScores has no impact on the scores obtained for plotting.

References

Luecken, M. D., Büttner, M., Chaichoompu, K., Danese, A., Interlandi, M., Mueller, M. F., Strobl, D. C., Zappia, L., Dugas, M., Colomé-Tatché, M. & Theis, F. J. Benchmarking atlas-level data integration in single-cell genomics. Nat Methods 19, 41–50 (2021). DOI

See also