View source: R/visualizationR.R
spatialPlotClusters | R Documentation |
Intuitive way of visualizing how cell types changes across the spatial locations.
spatialPlotClusters(seu)
seu |
an object of class "Seurat" obtained by DR.SC. |
Nothing
return a ggplot2 object.
nothing
Wei Liu
None
None
## we generate the spatial transcriptomics data with lattice neighborhood, i.e. ST platform.
seu <- gendata_RNAExp(height=10, width=10,p=50, K=4)
library(Seurat)
seu <- NormalizeData(seu)
# choose spatially variable features using Seurat
seu <- FindSVGs(seu)
# use SVGs to fit DR.SC model
# maxIter = 2 is only used for illustration, and user can use default.
seu1 <- DR.SC(seu, K=4,platform = 'ST', maxIter=2,verbose=FALSE)
spatialPlotClusters(seu1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.