What problem does it solve?
AnnData is a Python package for handling annotated data matrices, storing X alongside observation metadata (obs), variable metadata (var), and multi-dimensional annotations (obsm, varm, obsp, varp, uns). Originally designed for single-cell genomics, it now serves as a general framework for any annotated data requiring efficient storage, manipulation, and analysis. It underpins scalable workflows in the scverse ecosystem, including Scanpy, Muon, and probabilistic tools, enabling seamless interoperability across analyses.
Core Features & Use Cases
- Data structure components: X, obs, var, layers, obsm, varm, obsp, varp, uns, and raw to support flexible data organization.
- I/O and memory efficiency: backed storage, sparse representations, chunked I/O, and reproducible pipelines for large datasets.
- Ecosystem integration: native compatibility with Scanpy and Muon, PyTorch-friendly loading via AnnLoader, and seamless use with scverse tools.
Quick Start
Create an AnnData object from a dense matrix and basic obs/var metadata, then save to an h5ad file.