visOverview {CellMixS} | R Documentation

## visOverview

### Description

Plot an overview of metric results, group label and any colData variable in a reduced dimensional representation.

### Usage

    visOverview(
      sce_cms,
      group,
      metric = "cms",
      prefix = TRUE,
      dim_red = "TSNE",
      log10_val = FALSE,
      other_var = NULL,
      metric_prefix = NULL
    )

### Arguments

`sce_cms` | A `SingleCellExperiment` object with the result scores (e.g. cms) to plot in `colData(sce_cms)`.
`group` | Character. Name of group/batch variable. Needs to be one of `names(colData(sce))`.
`metric` | Character vector. Specify names of `colData(sce)` to be plotted. Applys only if 'res_object' is a `SingleCellExperiment` object. Default is 'cms'. If prefix is TRUE all columns starting with 'metric' will be plotted.
`prefix` | Boolean. Is ‘metric' used to specify column’s prefix(true) or complete column names (False).
`dim_red` | Character. Name of embeddings to use as subspace for plotting. Default is "TSNE".
`log10_val` | Logical. Indicating if -log10(metric) should be plotted.
`other_var` | Character string. Name(s) of other variables to be plotted asided. Need correspond to one of `colData(sce)`.
`metric_prefix` | Former parameter to define prefix of the metric to be plotted. Will stop and ask for the new syntax.

### Details

Plots reduced dimensions of cells colored by group variable and metric score. If 'red_dim' is not defined in `reducedDimNames(sce)` a tsne is calculated using `runTSNE`. Other color label as celltype label or smoothened scores can be plotted aside. Embeddings from data integration methods (e.g. mnn.correct) can be used if they are specified in `reducedDimNames(sce)`.

### Value

a `ggplot` object.

### See Also

`visMetric`, `visGroup`

Other visualize metric functions: `visHist()`, `visMetric()`

### Examples

    library(SingleCellExperiment)
    sim_list <- readRDS(system.file("extdata/sim50.rds", package = "CellMixS"))
    sce <- sim_list[[1]][, c(1:30, 300:330)]
    sce_cms <- cms(sce, "batch", k = 20, n_dim = 2)

    visOverview(sce_cms, "batch", other_var = "batch")

[Package CellMixS version 1.2.6 Index]