plot_umap: Superimpose cell type prioritizations onto a dimensionality...

View source: R/plot_umap.R

plot_umapR Documentation

Superimpose cell type prioritizations onto a dimensionality reduction plot

Description

Visualize the global landscape of the perturbation response across a single-cell dataset by superimposing cell type prioritizations (Augur AUCs, or their relative rank within the dataset) for each cell type onto a dimensionality reduction

Usage

plot_umap(
  augur,
  sc,
  mode = c("default", "rank"),
  reduction = "umap",
  palette = "cividis",
  top_n = 0,
  cell_type_col = "cell_type"
)

Arguments

augur

a set of Augur results obtained from calculate_auc

sc

a Seurat, monocle3, or SingleCellExperiment object containing dimensionality reduction coordinates

mode

whether to plot the raw AUCs or their relative ranks; one of 'default' (raw AUCs) or 'ranks'

reduction

the type of dimensionality reduction to extract from the sc object; defaults to 'umap'

palette

the color palette used to visualize the AUC for each cell type. Can be provided either a string specifying a ColorBrewer (see scale_color_distiller) or viridis (see scale_color_viridis) color palette, or a vector of colors that will be provided to scale_fill_gradientn

top_n

optionally, the number of top prioritized cell types to label in the plot

cell_type_col

the column of the meta data frame, or the metadata container in the Seurat/monocle object, that contains cell type labels for each cell in the gene-by-cell expression matrix; defaults to "cell_type"

Details

The following color maps can be specified using the palette argument:

  1. viridis color scales: magma, inferno, plasma, viridis, or cividis (the default)

  2. sequential ColorBrewer scales: BuGn, BuPu, GnBu, Greens, Greys, Oranges, OrRd, PuBu, PuBuGn, PuRd, Purples, RdPu, Reds, YlGn, YlGnBu, YlOrBr, or YlOrRd

  3. diverging ColorBrewer scales: BrBG, PiYG, PRGn, PuOr, RdBu, RdGy, RdYlBu, RdYlGn, or Spectral

  4. a vector of colors that will be passed into scale_color_gradientn

Value

a ggplot object.


neurorestore/Augur documentation built on Feb. 28, 2024, 3:03 a.m.