anndata

Store annotated data matrices for single-cell workflows in Python.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/Victory-Hugo/S2-Agent-Skill --skill anndata-victory-hugo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: anndata
Source: https://github.com/Victory-Hugo/S2-Agent-Skill/tree/main/skills/genomics/anndata
Command: npx skills add https://github.com/Victory-Hugo/S2-Agent-Skill --skill anndata-victory-hugo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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]])

Frequently Asked Questions about anndata

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I store annotated single-cell data matrices in Python?

AnnData organizes annotated single-cell data matrices in Python by unifying the primary data matrix X with observation metadata (obs), variable metadata (var), and multi-dimensional annotations (obsm, varm) for scalable workflows.

What is the best way to manage observation and variable metadata for single-cell analysis?

Managing observation and variable metadata requires a unified data model that stores X, obs, var, layers, and embeddings (obsm/varm) alongside a rich unstructured space (uns), which AnnData natively provides for single-cell analysis.

Can I use AnnData as the central data container for Scanpy workflows?

Yes, AnnData serves as the native data handling structure for Scanpy and the Scverse ecosystem, supporting h5ad read/write, backed mode, and concatenation to build end-to-end single-cell pipelines.

How do I create a minimal annotated data matrix to start a bioinformatics pipeline?

To create an annotated data matrix, install the anndata package via pip, import it in Python, and initialize an AnnData object by passing a two-dimensional array to the X parameter.

Does AnnData support multi-dimensional annotations like embeddings and pairwise graphs?

AnnData supports multi-dimensional annotations by providing dedicated structures for unstructured metadata (uns), multi-dimensional annotations (obsm, varm), and pairwise relationships (obsp, varp) within a single Python object.

Are there limitations when handling large-scale single-cell data matrices in memory?

For large-scale single-cell data matrices, AnnData mitigates in-memory limitations through a backed mode that allows reading and processing h5ad files directly from disk without loading the entire dataset into memory.