anndata

Manipulate AnnData objects with expression matrices and metadata for single-cell data.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/gabrielvuksani/wotann --skill anndata-gabrielvuksani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: anndata
Source: https://github.com/gabrielvuksani/wotann/tree/main/skills/scientific/anndata
Command: npx skills add https://github.com/gabrielvuksani/wotann --skill anndata-gabrielvuksani

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you work with annotated data matrices by keeping measurements and rich metadata aligned, so you can reliably load, transform, and analyze large single-cell datasets.

Core Features & Use Cases

  • AnnData object structure: Manage expression matrices (X) alongside observation metadata (obs), variable metadata (var), embeddings (obsm/varm), pairwise relationships (obsp/varp), and unstructured fields (uns).
  • I/O for research workflows: Read and write common genomics formats (notably .h5ad and zarr), including backed mode for large-on-disk datasets.
  • Common analysis operations: Subset, concatenate, transform, and follow best practices for memory efficiency and reproducible pipelines.
  • Scverse ecosystem integration: Use as the foundational container for tools like scanpy and muon, and support downstream workflows such as QC, embedding, and batch handling.

Quick Start

Create an AnnData object from an expression matrix plus cell and gene metadata using the Python snippet described in the skill instructions.

Frequently Asked Questions about anndata

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

FAQPage Schema
How do I load a large .h5ad single-cell dataset without running out of memory?

Use backed mode to load large .h5ad files on disk without reading the full expression matrix into memory. This memory-efficient approach keeps annotated single-cell data accessible for subsetting and analysis.

How do I concatenate single-cell expression matrices across multiple batches?

Concatenate single-cell expression matrices by merging multiple AnnData objects while keeping observation and variable metadata aligned. This batch handling workflow ensures measurements and metadata stay correctly organized.

What is the best way to store embeddings and pairwise relationships for single-cell data?

Store embeddings in obsm/varm and pairwise relationships in obsp/varp within an AnnData object. This structure keeps annotated single-cell matrices aligned with observation and variable metadata for analysis.

Can I use AnnData objects with scanpy and scvi-tools workflows?

Yes, AnnData serves as the foundational container for scverse ecosystem tools like scanpy and scvi-tools. It integrates with downstream workflows for QC, embedding, and batch handling.

Does backed mode support zarr formats for single-cell data manipulation?

Backed mode supports reading and writing both .h5ad and zarr formats for large single-cell datasets. This allows memory-efficient access to on-disk annotated matrices during analysis.

When should I use sparse matrices in an AnnData object?

Use sparse matrices within the X component to handle large annotated single-cell datasets efficiently. This practice reduces memory usage while maintaining alignment with observation and variable metadata.