Skip to contents

Convert another AnnData object to an ZarrAnnData object

Usage

as_ZarrAnnData(
  adata,
  file,
  compression = c("none", "gzip", "blosc", "zstd", "lzma", "bz2", "zlib", "lz4"),
  mode = c("w-", "r", "r+", "a", "w", "x")
)

Arguments

adata

An AnnData object to be converted to ZarrAnnData

file

The file name (character) of the .zarr file

compression

The compression algorithm to use when writing the Zarr file. Can be one of "none", "gzip", "blosc", "zstd", "lzma", "bz2", "zlib" or "lz4". Defaults to "none".

mode

The mode to open the Zarr file:

  • a creates a new file or opens an existing one for read/write

  • r opens an existing file for reading

  • r+ opens an existing file for read/write

  • w creates a file, truncating any existing ones

  • w-/x are synonyms, creating a file and failing if it already exists

Value

A ZarrAnnData object with the same data as the input AnnData object.