Get spatial coordinates from either SpatialExperiment or Seurat object
Source:R/seurat_compatibility.R
getSpatialCoords.Rd
Get spatial coordinates from either SpatialExperiment or Seurat object
Examples
library(STexampleData)
spe <- Visium_humanDLPFC()
#> see ?STexampleData and browseVignettes('STexampleData') for documentation
#> loading from cache
coords <- getSpatialCoords(spe)
head(coords)
#> pxl_col_in_fullres pxl_row_in_fullres
#> AAACAACGAATAGTTC-1 3913 2435
#> AAACAAGTATCTCCCA-1 9791 8468
#> AAACAATCTACTAGCA-1 5769 2807
#> AAACACCAATAACTGC-1 4068 9505
#> AAACAGAGCGACTCCT-1 9271 4151
#> AAACAGCTTTCAGAAG-1 3393 7583