THE FILE FIELD GUIDE
.h5ad

AnnData Dataset

Data & Science

H5AD is AnnData’s HDF5 storage format for a matrix X, observation/variable annotations and auxiliary data, often in single-cell analysis. It is not merely a flat table or trained model; inspect sparse and annotated structures first.

Main use
Store a matrix with observation and variable annotations
Data type
Binary data
All sections, questions and sources

Content reviewed: · Editor:Kai

Opening steps

Choose your environment or purpose to see its steps.

AnnData / Scanpy-compatible environment

Preserve the original and inspect a working copy in a compatible application.

  1. Read a copy using a compatible AnnData version.
  2. Inspect shape, observation/variable counts and matrix type.
  3. Check memory needs and consider supported backed reading where appropriate.
Inspect the received file and its requirements

Establish dependencies and settings before proceeding.

  1. Identify producer version and dependencies.
  2. Establish what X/layers/raw mean and how data was preprocessed.
  3. Check observation/variable identifiers and annotation alignment.

Menu labels and support vary by app, OS and version. Preserve the original before making changes.

Troubleshooting by symptom

  • Memory exhaustion: avoid unnecessary sparse-to-dense conversion.
  • Encoding error: compare AnnData producer/reader versions.
  • raw is not original counts: establish semantics from the producer, not the field name.
  • Duplicate IDs: inspect name uniqueness and analysis assumptions.

H5AD → selected tables/matrices

  1. Select required matrices/annotations and export them with axis identifiers.
  2. Verify shape, axis IDs, value scale, annotations and selected output.

A single CSV does not retain all layers, embeddings, graphs or metadata.

Establish matrix semantics

The suffix does not reveal whether X contains counts, normalized data or log values. Record provenance/preprocessing and align scales before comparisons.

Source for these steps:scverse / AnnData · anndata.io.read_h5ad / scverse / AnnData · On-disk format specification

Worked example: checks before handoff

Example: before exporting expression CSV, choose the layer/orientation and compare sample values with cell and gene IDs against the source.

Source for these steps:scverse / AnnData · anndata.io.read_h5ad / scverse / AnnData · On-disk format specification

Related-format differences

Related-format differences
Format / methodPurpose and preserved information
.h5adStore a matrix with observation and variable annotations
H5 / CSVH5 is generic HDF5 and CSV a table, neither establishing AnnData structure/semantics.
H5AD → selected tables/matricesA single CSV does not retain all layers, embeddings, graphs or metadata.

Handling and security

Annotations may contain confidential sample/individual information; review distributed columns.

Questions and answers

Does renaming to H5 make it generally usable?

HDF5 access does not supply AnnData encoding/semantic support.

Does raw always mean unprocessed data?

It depends on what the producer stored; inspect provenance.

Can one CSV preserve the entire analysis?

Auxiliary arrays, graphs and annotations occupy separate structures; inventory required information.

Format facts: name, steward and MIME type
Formal name
AnnData Dataset
Steward / specification
scverse / AnnData
MIME type
Consult the producer or delivery system. The extension alone does not establish a MIME type.

Primary and official sources

  • Software documentationanndata.io.read_h5ad

    Reading H5AD and backed-mode limitations.

    scverse / AnnData · Link checked:
  • Software documentationOn-disk format specification

    Storage for matrices, annotations and sparse arrays.

    scverse / AnnData · Link checked: