plotSpots: plotSpots

Description Usage Arguments Details Value Examples

View source: R/plotSpots.R

Description

Plots for spatial transcriptomics datasets.

Usage

1
2
3
4
5
6
7
plotSpots(
  spe,
  x_coord = "pxl_row_in_fullres",
  y_coord = "pxl_col_in_fullres",
  cluster_id = NULL,
  palette = "libd_layer_colors"
)

Arguments

spe

Input object (SpatialExperiment).

x_coord

Name of column in spatialCoords slot containing x-coordinates. Default = "pxl_row_in_fullres".

y_coord

Name of column in spatialCoords slot containing x-coordinates. Default = "pxl_col_in_fullres".

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 the physical x-y coordinates of the tissue slide. 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.