View source: R/dimGeometries.R
addVisiumSpotPoly | R Documentation |
For adding the spot polygons to SFE objects converted from SPE.
addVisiumSpotPoly(x, spotDiameter)
x |
A |
spotDiameter |
Spot diameter for technologies with arrays of spots of fixed diameter per slide, such as Visium, ST, DBiT-seq, and slide-seq. The diameter must be in the same unit as the coordinates in the *Geometry arguments. Ignored for geometries that are not POINT or MULTIPOINT. |
A SFE object with a new colGeometry called spotPoly, which has polygons of the spots.
library(SpatialExperiment)
example(read10xVisium)
# There can't be suplicate barcodes
colnames(spe) <- make.unique(colnames(spe), sep = "-")
rownames(spatialCoords(spe)) <- colnames(spe)
sfe <- toSpatialFeatureExperiment(spe)
# A hypothetical spot diameter; check the scalefactors_json.json file for
# actual diameter in pixels in full resolution image.
sfe <- addVisiumSpotPoly(sfe, spotDiameter = 80)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.