Skip to contents

Save ExtImage to disk for alabaster

Usage

# S4 method for class 'ExtImage'
saveObject(x, path, ...)

Arguments

x

A Bioconductor object of the specified class.

path

String containing the path to a directory in which to save x.

...

Extra arguments passed to writeImage.

Value

x is saved into path and NULL is invisibly returned.

See also

Examples

library(SFEData)
fp <- tempfile()
fsave <- file.path(fp, "exi")
x1 <- XeniumOutput(dataset = "v1", file_path = file.path(fp, "xenium1"))
#> see ?SFEData and browseVignettes('SFEData') for documentation
#> loading from cache
#> The downloaded files are in /tmp/RtmpfBErth/file2aa83aa6419a/xenium1/xenium_lr 
sfe <- readXenium(x1)
#> >>> Cell segmentations are found in `.csv` file(s)
#> >>> Reading cell and nucleus segmentations
#> >>> Making POLYGON geometries
#> >>> Checking polygon validity
#> >>> Saving geometries to parquet files
#> >>> Reading cell metadata -> `cells.csv`
#> >>> Reading h5 gene count matrix
#> >>> filtering cellSeg geometries to match 16324 cells with counts > 0
#> >>> filtering nucSeg geometries to match 16324 cells with counts > 0
bfi <- getImg(sfe)
exi <- toExtImage(bfi)
#> Resolution subscript out of bound, reading the lowest resolution
saveObject(exi, fsave)
exi2 <- readObject(fsave)
unlink(fsave, recursive = TRUE)