
Write a SingleCells object to an AnnData Zarr store
save_zarr.RdWrites what save_h5ad() writes, as an AnnData Zarr (v3)
directory that anndata.read_zarr() opens. A failed write leaves no store
behind.
Not available on Windows, where it errors: the Zarr writer pulls in Blosc,
whose bundled pthread shim clashes with the one Rust links there. Use
save_h5ad() instead. Reading Zarr stores works on Windows.
Usage
save_zarr(
object,
zarr_path,
assay = c("raw", "norm"),
genes = NULL,
chunk_size = 10000L,
overwrite = TRUE,
.verbose = TRUE
)Arguments
- object
SingleCellsclass.- zarr_path
Directory to write the Zarr store to.
- assay
String. One of
c("raw", "norm"). Which count assay to place inX.- genes
Optional character vector of gene ids or integer vector of (1-based) gene indices to write, in the column order wanted.
NULLwrites every gene.- chunk_size
Integer. Number of cells per streaming batch. Defaults to
10000L.- overwrite
Boolean. Shall an existing file be overwritten. Defaults to
TRUE.- .verbose
Boolean. Controls the verbosity of the function.