Skip to contents

Color spots on the spatial coordinates according to the predicted proportions of a particular cell type. Color scale is adapted depending on the range of predicted proportions.

Usage

plotSpatialProp(
  object,
  index.st,
  cell.type,
  colors = "blues",
  set = "raw",
  prediction = "Regularized",
  limits = NULL,
  size.point = 1,
  title = NULL,
  theme = NULL
)

Arguments

object

A SpatialDDLS object.

index.st

Index of the spatial transcriptomics data to be plotted. It can be either a position or a name if a named list of SpatialExperiment objects was provided.

cell.type

Cell type predicted proportions to color spots by.

colors

Color scale to be used. It can be "blues" or "spectral" (the former by default).

set

If results were simplified (see ?deconvSpatialDDLS for details), what results to plot (raw by default).

prediction

It can be "Regularized", "Intrinsic" or "Extrinsic" ("Regularized" by default).

limits

A vector of two elements indicating wanted limits for color scale. If NULL (by default), color scale is adjusted to max and min predicted proportions.

size.point

Size of points (0.1 by default).

title

Title of plot.

theme

ggplot2 theme.

Value

A ggplot object.