API

The central class:

AnnData([X, obs, var, uns, obsm, varm, …])

An annotated data matrix.

Combining

Combining AnnData objects. See also the section on concatenation.

concat(adatas, *[, axis, join, merge, …])

Concatenates AnnData objects along an axis.

Reading

Reading anndata’s native file format .h5ad.

read_h5ad(filename[, backed, as_sparse, …])

Read .h5ad-formatted hdf5 file.

Reading other file formats.

read_csv(filename[, delimiter, …])

Read .csv file.

read_excel(filename, sheet[, dtype])

Read .xlsx (Excel) file.

read_hdf(filename, key)

Read .h5 (hdf5) file.

read_loom(filename, *[, sparse, cleanup, …])

Read .loom-formatted hdf5 file.

read_mtx(filename[, dtype])

Read .mtx file.

read_text(filename[, delimiter, …])

Read .txt, .tab, .data (text) file.

read_umi_tools(filename[, dtype])

Read a gzipped condensed count matrix from umi_tools.

read_zarr(*_, **__)

Writing

Writing to anndata’s native file format .h5ad.

AnnData.write([filename, compression, …])

Write .h5ad-formatted hdf5 file.

Writing to other formats.

AnnData.write_csvs(dirname[, skip_data, sep])

Write annotation to .csv files.

AnnData.write_loom(filename[, write_obsm_varm])

Write .loom-formatted hdf5 file.

AnnData.write_zarr(store[, chunks])

Write a hierarchical Zarr array store.

Experimental API

Warning

API’s in the experimenal module are currently in development and subject to change at any time.

Two classes for working with batched access to collections of many AnnData objects or h5ad files. In paritcular, for pytorch-based models.

experimental.AnnCollection(adatas[, …])

An object to lazily concatenate and jointly subset AnnData objects along the obs axis.

experimental.AnnLoader(adatas[, batch_size, …])

PyTorch DataLoader for AnndData objects.

Errors and warnings

ImplicitModificationWarning

Raised whenever initializing an object or assigning a property changes the type of a part of a parameter or the value being assigned.