Reading `SpatialData`
Usage
readImage(x, ...)
readLabel(x, ...)
readPoint(x, ...)
readShape(x, ...)
readTable(x, anndataR = FALSE)
readSpatialData(
x,
images = TRUE,
labels = TRUE,
points = TRUE,
shapes = TRUE,
tables = TRUE,
anndataR = TRUE
)Arguments
- x
For
readImage/Label/Point/Shape/Table, path to aSpatialDataelement. ForreadSpatialData, path to aSpatialData-.zarr store.- ...
option arguments passed to and from other methods.
- anndataR
logical specifying whether to use
anndataRto read tables; by default (FALSE),basilisk,anndataandzellkonverterare used.- images, labels, points, shapes, tables
Control which elements should be read for each layer. The default, NULL, reads all elements; alternatively, may be FALSE to skip a layer, or a integer vector specifying which elements to read.
Value
For
readSpatialData, aSpatialData.,For element readers, a
ImageArray,LabelArray,PointFrame,ShapeFrame, orSingleCellExperiment.
Examples
tf <- tempfile()
dir.create(tf)
base <- unzip_merfish_demo(tf)
#> returning path to cached zip
(x <- readSpatialData(base))
#> class: SpatialData
#> - images(1):
#> - rasterized (1,522,575)
#> - labels(0):
#> - points(1):
#> - single_molecule (3714642)
#> - shapes(2):
#> - anatomical (6,polygon)
#> - cells (2389,circle)
#> - tables(1):
#> - table (268,2389)
#> coordinate systems:
#> - global(4): rasterized anatomical cells single_molecule