Skip to contents

Implementation of a Zarr-backed AnnData object. This class provides an interface to a Zarr file and minimal data is stored in memory until it is requested by the user. It is primarily designed as an intermediate object when reading/writing Zarr files but can be useful for accessing parts of large files.

See AnnData-usage for details on creating and using AnnData objects.

Value

A ZarrAnnData object

See also

AnnData-usage for details on creating and using AnnData objects

Other AnnData classes: AbstractAnnData, AnnDataView, HDF5AnnData, InMemoryAnnData, ReticulateAnnData

Super class

anndataR::AbstractAnnData -> ZarrAnnData

Active bindings

X

See AnnData-usage

layers

See AnnData-usage

obsm

See AnnData-usage

varm

See AnnData-usage

obsp

See AnnData-usage

varp

See AnnData-usage

obs

See AnnData-usage

var

See AnnData-usage

obs_names

See AnnData-usage

var_names

See AnnData-usage

uns

See AnnData-usage

Methods

Inherited methods


Method new()

ZarrAnnData constructor

Usage

ZarrAnnData$new(
  file,
  X = NULL,
  obs = NULL,
  var = NULL,
  layers = NULL,
  obsm = NULL,
  varm = NULL,
  obsp = NULL,
  varp = NULL,
  uns = NULL,
  shape = NULL,
  mode = c("a", "r", "r+", "w", "w-", "x"),
  compression = c("none", "gzip", "blosc", "zstd", "lzma", "bz2", "zlib", "lz4")
)

Arguments

file

The file name (character) of the .zarr file. If this file already exits, other arguments must be NULL.

X

See the X slot in AnnData-usage

obs

See the obs slot in AnnData-usage

var

See the var slot in AnnData-usage

layers

See the layers slot in AnnData-usage

obsm

See the obsm slot in AnnData-usage

varm

See the varm slot in AnnData-usage

obsp

See the obsp slot in AnnData-usage

varp

See the varp slot in AnnData-usage

uns

See the uns slot in AnnData-usage

shape

Shape tuple (e.g. c(n_obs, n_vars)). Can be provided if both X or obs and var are not provided.

mode

The mode to open the Zarr file. See as_ZarrAnnData() for details

compression

The compression algorithm to use. See as_ZarrAnnData() for details

Details

The constructor creates a new Zarr AnnData interface object. This can either be used to either connect to an existing .zarr file or to create a new one. If any additional slot arguments are set an existing file will be overwritten.


Method n_obs()

See the n_obs field in AnnData-usage

Usage

ZarrAnnData$n_obs()


Method n_vars()

See the n_vars field in AnnData-usage

Usage

ZarrAnnData$n_vars()


Method obs_keys()

See AnnData-usage

Usage

ZarrAnnData$obs_keys()


Method var_keys()

See AnnData-usage

Usage

ZarrAnnData$var_keys()


Method layers_keys()

See AnnData-usage

Usage

ZarrAnnData$layers_keys()


Method obsm_keys()

See AnnData-usage

Usage

ZarrAnnData$obsm_keys()


Method varm_keys()

See AnnData-usage

Usage

ZarrAnnData$varm_keys()


Method obsp_keys()

See AnnData-usage

Usage

ZarrAnnData$obsp_keys()


Method varp_keys()

See AnnData-usage

Usage

ZarrAnnData$varp_keys()


Method uns_keys()

See AnnData-usage

Usage

ZarrAnnData$uns_keys()