# AnnData and h5ad files

Source: https://onco.cc/terms/anndata-h5ad/  
OnCo record `anndata-h5ad` (Term). Data CC BY-NC 4.0, attribute "Data from OnCo (onco.cc)"; commercial use needs a licence.

## TL;DR

AnnData is the Python object, saved as an .h5ad file, that holds an expression matrix together with its per-cell and per-gene annotations; it is the lingua franca of single-cell analysis.

## Summary

The anndata documentation describes an annotated data matrix: observations (cells or samples) by variables (genes), with data frames of metadata for each axis, unstructured metadata and layers, stored on disk in HDF5 as .h5ad. Scanpy, CELLxGENE and most single-cell foundation models read and write it, and bulk transcriptome models such as BulkFormer publish their TCGA matrices in the same format. OnCo lists anndata on the open-source map.

## Fields

- Kind: Term
- Last checked: 2026-09-24
- Also known as: AnnData; anndata; h5ad; .h5ad file; annotated data matrix; AnnData object
- Tags: cansim-terms

## Notes

- Listed in the CanSim terms map 1.0.0 (docs/onco/terms.json, generated 2026-09-24), CC BY 4.0, attribution: CanSim project, an open, public-data-first cancer foundation-model programme; CanSim page path /terms/anndata.

## Sources

- anndata documentation: https://anndata.readthedocs.io/en/stable/
- Wikipedia: Hierarchical Data Format: https://en.wikipedia.org/wiki/Hierarchical_Data_Format

## Connected records

- collections: [CZ CELLxGENE / Human Cell Atlas](https://onco.cc/collections/cellxgene-hca/)
- terms: [Array and table formats: HDF5, Zarr, OME-Zarr, Parquet](https://onco.cc/terms/hdf5-zarr-parquet/), [Cancer AI vocabulary (CanSim terms map)](https://onco.cc/terms/cancer-ai-vocabulary/), [Single-cell RNA sequencing (scRNA-seq, 10x Chromium)](https://onco.cc/terms/single-cell-rna-seq/)

---
JSON: https://onco.cc/api/v1/entities/anndata-h5ad.json