ggspavis 1.0.0
The ggspavis
package contains a set of visualization functions for spatially resolved transcriptomics data, designed to work with the SpatialExperiment Bioconductor object class.
These plotting functions are used in our online book OSTA and other work.
Load some example datasets from the STexampleData package and create some example plots.
library(SpatialExperiment)
library(STexampleData)
library(ggspavis)
# load data in SpatialExperiment format
spe <- Visium_mouseCoronal()
# add some values in 'colData' to annotate spots
colData(spe)$sum <- colSums(counts(spe))
# example plots
plotSpots(spe, annotate = "sum")
plotVisium(spe, fill = "sum", trans = "log", highlight = "in_tissue")
# load data in SpatialExperiment format
spe <- Visium_humanDLPFC()
# example plots
plotSpots(spe, annotate = "ground_truth", palette = "libd_layer_colors")
plotVisium(spe, fill = "ground_truth", highlight = "in_tissue")
# load data in SpatialExperiment format
spe <- seqFISH_mouseEmbryo()
# example plots
plotMolecules(spe, molecule = "Sox2")