clusterPlot: Plot spatial cluster assignments.

Description Usage Arguments Value See Also Examples

View source: R/spatialPlot.R

Description

Plot spatial cluster assignments.

Usage

1
2
3
4
5
6
7
8
9
clusterPlot(
  sce,
  label = "spatial.cluster",
  palette = NULL,
  color = NULL,
  platform = NULL,
  is.enhanced = NULL,
  ...
)

Arguments

sce

SingleCellExperiment. If fill is specified and is a string, it must exist as a column in colData(sce).

label

Labels used to color each spot. May be the name of a column in colData(sce), or a vector of discrete values.

palette

Optional vector of hex codes to use for discrete spot values.

color

Optional hex code to set color of borders around spots. Set to NA to remove borders.

platform

Spatial sequencing platform. If "Visium", the hex spot layout will be used, otherwise square spots will be plotted.
NOTE: specifying this argument is only necessary if sce was not created by spatialCluster() or spatialEnhance().

is.enhanced

True if sce contains subspot-level data instead of spots. Spatial sequencing platform. If true, the respective subspot lattice for each platform will be plotted.
NOTE: specifying this argument is only necessary if sce was not created by spatialCluster() or spatialEnhance().

...

Additional arguments for geom_polygon(). size, to specify the linewidth of these borders, is likely the most useful.

Value

Returns a ggplot object.

See Also

Other spatial plotting functions: featurePlot()

Examples

1
2
sce <- exampleSCE()
clusterPlot(sce)

BayesSpace documentation built on Nov. 8, 2020, 8:03 p.m.