
Plot predicted proportions for a specific cell type using spatial coordinates of spots
Source:R/plotSpatialCoor.R
plotSpatialProp.RdColor 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
SpatialDDLSobject.- 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
SpatialExperimentobjects 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
?deconvSpatialDDLSfor details), what results to plot (rawby 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.