plotDimRed: plotDimRed

Description Usage Arguments Details Value Examples

View source: R/plotDimRed.R

Description

Plots for spatial transcriptomics datasets.

Usage

1
2
3
4
5
6
7
8
plotDimRed(
  spe,
  type = "UMAP",
  x_axis = "UMAP1",
  y_axis = "UMAP2",
  cluster_id = NULL,
  palette = "libd_layer_colors"
)

Arguments

spe

Input object (SpatialExperiment).

type

Type of dimension reduction to use. Options are "PCA" or "UMAP". Default = "UMAP".

x_axis

Name of column in reducedDim to use for x-axis. Default = "UMAP1".

y_axis

Name of column in reducedDim to use for y-axis. Default = "UMAP2".

cluster_id

Name of column in colData containing cluster IDs. To plot without cluster labels, set "cluster_id = NULL". Default = "cluster_id".

palette

Color palette for cluster labels. Options are "libd_layer_colors", "Okabe-Ito", or providing a vector of hex codes for a custom palette.

Details

Functions to generate plots of spatial coordinates for spatial transcriptomics datasets, optionally including cluster labels.

This function generates a plot showing spatial coordinates (spots) in reduced dimension space (either PCA or UMAP). Cluster labels or ground truth labels can be shown with colors.

Value

Returns a ggplot object. Additional plot elements can be added as ggplot elements (e.g. title, formatting).

Examples

1
# to do

lmweber/spatzli documentation built on Sept. 16, 2020, 5:55 a.m.