Plot cell2location spatial results
Arguments
- srt
A
Seuratobject returned byRunCell2location().- plot_type
Result to draw: normalized proportion, q05 absolute abundance, dominant cell type, or a spot-level proportion pie.
- cell_types
Optional cell types to display for abundance, proportion, or pie plots.
- prefix
Metadata prefix used by
RunCell2location().- tool_name
Name of the
srt@toolsresult entry.- image
Name of the Seurat spatial image. Required when multiple images are present; a single image is selected automatically when
NULL.- overlay_image
Whether to draw the spatial image beneath spots.
- coord.cols
Metadata coordinate columns used when no image is available.
- ...
Additional arguments passed to
SpatialSpotPlot().
Examples
if (FALSE) { # \dontrun{
# Result from the official Human Lymph Node example in RunCell2location().
spatial <- readRDS("human_lymph_node_cell2location/official_human_lymph_node.rds")
selected <- names(sort(
colMeans(spatial@tools$Cell2location$proportions),
decreasing = TRUE
))[1:6]
Cell2locationPlot(
spatial,
plot_type = "proportion",
cell_types = selected,
overlay_image = FALSE,
coord.cols = c("x", "y"),
ncol = 3
)
Cell2locationPlot(
spatial,
plot_type = "dominant",
overlay_image = FALSE,
coord.cols = c("x", "y")
)
} # }