Skip to contents

SpatialFeatureExperiment class

SpatialFeatureExperiment-class
The SpatialFeatureExperiment class
toSpatialFeatureExperiment(<SpatialExperiment>) toSpatialFeatureExperiment(<SingleCellExperiment>) toSpatialFeatureExperiment(<Seurat>)
SpatialFeatureExperiment coercion methods
SpatialFeatureExperiment()
Constructor of SpatialFeatureExperiment object
show(<SpatialFeatureExperiment>)
Print method for SpatialFeatureExperiment
unit(<SpatialFeatureExperiment>)
Get unit of a SpatialFeatureExperiment
updateObject(<SpatialFeatureExperiment>) SFEVersion()
Update a SpatialFeatureExperiment object

Read data into SFE

read10xVisiumSFE()
Read 10X Visium data as SpatialFeatureExperiment
readCosMX()
Read CosMX data into SFE
readVizgen()
Read Vizgen MERFISH output as SpatialFeatureExperiment
readXenium()
Read 10X Xenium output as SpatialFeatureExperiment

Getters and setters

annotGeometries(<SpatialFeatureExperiment>) `annotGeometries<-`(<SpatialFeatureExperiment>) annotGeometryNames(<SpatialFeatureExperiment>) `annotGeometryNames<-`(<SpatialFeatureExperiment>,<character>) annotGeometry(<SpatialFeatureExperiment>) `annotGeometry<-`(<SpatialFeatureExperiment>) tissueBoundary() `tissueBoundary<-`()
Annotation geometry methods
colFeatureData() rowFeatureData() geometryFeatureData() reducedDimFeatureData()
Get global spatial analysis results and metadata of colData, rowData, and geometries
colGeometry() `colGeometry<-`() colGeometries() `colGeometries<-`() colGeometryNames() `colGeometryNames<-`() spotPoly() `spotPoly<-`() centroids() `centroids<-`() ROIPoly() `ROIPoly<-`() cellSeg() `cellSeg<-`() nucSeg() `nucSeg<-`()
Column geometry getters and setters
dimGeometries(<SpatialFeatureExperiment>) `dimGeometries<-`(<SpatialFeatureExperiment>) dimGeometryNames(<SpatialFeatureExperiment>) `dimGeometryNames<-`(<SpatialFeatureExperiment>,<numeric>,<character>) dimGeometry(<SpatialFeatureExperiment>) `dimGeometry<-`(<SpatialFeatureExperiment>)
Dimension geometry methods
getParams()
Get parameters used in spatial methods
localResults(<SpatialFeatureExperiment>) `localResults<-`(<SpatialFeatureExperiment>) localResultNames(<SpatialFeatureExperiment>) `localResultNames<-`(<SpatialFeatureExperiment>,<character>) localResultFeatures(<SpatialFeatureExperiment>) localResultAttrs(<SpatialFeatureExperiment>) localResult(<SpatialFeatureExperiment>) `localResult<-`(<SpatialFeatureExperiment>)
Get and set results from local spatial statistics
rowGeometry() `rowGeometry<-`() rowGeometries() `rowGeometries<-`() rowGeometryNames() `rowGeometryNames<-`() txSpots() `txSpots<-`()
Row geometry getters and setters
spatialGraphs(<SpatialFeatureExperiment>) colGraphs() rowGraphs() annotGraphs() `spatialGraphs<-`(<SpatialFeatureExperiment>) `colGraphs<-`() `rowGraphs<-`() `annotGraphs<-`() spatialGraphNames(<SpatialFeatureExperiment>,<numeric>) `spatialGraphNames<-`(<SpatialFeatureExperiment>,<numeric>,<ANY>,<character>) colGraphNames() rowGraphNames() annotGraphNames() `colGraphNames<-`() `rowGraphNames<-`() `annotGraphNames<-`() spatialGraph(<SpatialFeatureExperiment>) colGraph() rowGraph() annotGraph() `spatialGraph<-`(<SpatialFeatureExperiment>) `colGraph<-`() `rowGraph<-`() `annotGraph<-`()
Spatial graph methods

Find spatial neighborhood graph

findSpatialNeighbors(<SpatialFeatureExperiment>)
Find spatial neighborhood graph
findVisiumGraph()
Find spatial neighborhood graphs for Visium spots

Transcript spots

formatTxSpots() addTxSpots()
Read and process transcript spots geometry for SFE
formatTxTech() addTxTech()
Read and process transcript spots for specific commercial technologies
readSelectTx() addSelectTx()
Read transcript spots of select genes

Geometric/spatial operations

transpose() mirror() rotate() translate() scale() affine()
Affine transfortaion of SFE object in histological space
addVisiumSpotPoly()
Add Visium spot polygons to colGeometry
annotOp()
Binary operations for geometry of each cell/spot and annotation
annotPred() annotNPred()
Binary predicates for geometry of each cell/spot and annotation
annotSummary()
Summarize attributes of an annotGeometry for each cell/spot
bbox(<SpatialFeatureExperiment>)
Find bounding box of SFE objects
crop()
Crop an SFE object with a geometry
removeEmptySpace()
Remove empty space
st_any_pred() st_any_intersects() st_n_pred() st_n_intersects()
Simple geometry predicates

Non-spatial operations

`[`(<SpatialFeatureExperiment>,<ANY>,<ANY>,<ANY>)
Subsetting SpatialFeatureExperiment objects
cbind(<SpatialFeatureExperiment>)
Concatenate SpatialFeatureExperiment objects

Image classes

isFull(<BioFormatsImage>) origin(<BioFormatsImage>) transformation(<BioFormatsImage>)
Other BioFormatsImage getters
BioFormatsImage()
On disk representation of BioFormats images in SFE object
ExtImage()
Use the EBImage Image class in SFE objects
SpatRasterImage() show(<SpatRasterImage>)
SpatRaster representation of images in SFE objects
toExtImage(<BioFormatsImage>) toExtImage(<SpatRasterImage>)
Convert images to ExtImage
toSpatRasterImage(<ExtImage>) toSpatRasterImage(<BioFormatsImage>)
Convert images to SpatRasterImage

Image methods

Image affine transformations

Utilities

aggBboxes()
Aggregate bounding boxes
bbox_center()
Find center of bounding box
changeSampleIDs()
Change sample IDs
df2sf()
From ordinary data frame to sf to construct SFE object
gdalParquetAvailable()
Check if Parquet GDAL driver is available
getPixelSize()
Get physical size of pixels
imageIDs()
Show all image_ids in the SFE object
sampleIDs()
Get all unique sample IDs
saveRDS(<SpatialFeatureExperiment>)
Save SpatialFeatureExperiment as RDS file
visium_row_col
Row and columns of Visium barcodes on the slide

Re-exports