Read SFE object from alabaster on disk representation
readSpatialFeatureExperiment.Rd
Read SFE object from alabaster on disk representation
Arguments
- path
String containing a path to a directory, itself created with a
saveObject
method.- metadata
Named list containing metadata for the object - most importantly, the
type
field that controls dispatch to the correct loading function. IfNULL
, this is automatically read byreadObjectFile(path)
.- ...
Further arguments to pass to individual methods.
Examples
library(SFEData)
fp <- tempfile()
fn <- file.path(fp, "vizgen")
d <- VizgenOutput(dataset = "cellpose", file_path = fn)
#> see ?SFEData and browseVignettes('SFEData') for documentation
#> loading from cache
#> The downloaded files are in /tmp/RtmpfBErth/file2aa828e36f20/vizgen/vizgen_cellbound_Cellpose
suppressWarnings(sfe <- readVizgen(d))
#> >>> 1 `.parquet` files exist:
#> /tmp/RtmpfBErth/file2aa828e36f20/vizgen/vizgen_cellbound_Cellpose/Cellpose/cellpose_micron_space.parquet
#> >>> using -> /tmp/RtmpfBErth/file2aa828e36f20/vizgen/vizgen_cellbound_Cellpose/Cellpose/cellpose_micron_space.parquet
#> >>> Cell segmentations are found in `.parquet` file
#> Sanity checks on cell segmentation polygons:
#> >>> ..found 1 cells with (nested) polygon lists
#> >>> ..applying filtering
#> >>> Casting MULTIPOLYGON geometry to POLYGON
#> >>> Checking polygon validity
fsave <- file.path(fp, "sfe_save")
saveObject(sfe, fsave)
#> >>> Saving SpatialExperiment
#> >>> Saving colgeometries
sfe2 <- readObject(fsave)
#> >>> Reading SpatialExperiment
#> >>> Reading colgeometries