What problem does it solve?
AnnData provides a Python-based data structure for annotated matrices, unifying the primary data matrix X with observation metadata (obs), variable metadata (var), and multi-dimensional annotations (obsm, varm, obsp, varp, uns) to enable scalable single-cell workflows.
Core Features & Use Cases
- Unified data model: stores X, obs, var, layers, and embeddings (obsm/varm) with a rich unstructured space (uns).
- Ecosystem integration: native data handling for Scanpy, Muon, and the Scverse ecosystem; supports read/write of h5ad, backed mode, and concatenation.
- Use Case: build end-to-end single-cell analysis pipelines from raw counts to processed embeddings using AnnData as the central data container.
Quick Start
Install and import, then create a minimal AnnData object:
- Install: pip install anndata
- Minimal example (Python): import anndata as ad; adata = ad.AnnData(X=[[1,2],[3,4]])