anndata

Manage and analyze annotated data matrices with the AnnData structure.

6|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/pur3v4d3r/pur3-pkb-codebase --skill anndata-pur3v4d3r
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: anndata
Source: https://github.com/pur3v4d3r/pur3-pkb-codebase/tree/main/.claude/skills/__scientific-skills/anndata
Command: npx skills add https://github.com/pur3v4d3r/pur3-pkb-codebase --skill anndata-pur3v4d3r

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

AnnData provides a robust framework for storing and manipulating annotated data matrices (X) with associated metadata (obs, var, layers, obsm, varm, obsp, varp, uns, raw), enabling scalable single-cell and general data workflows.

Core Features & Use Cases

  • Core data structure: X, obs, var, layers, obsm, varm, obsp, varp, uns, and raw components with memory-efficient options.
  • I/O and interoperability: read/write h5ad, zarr, loom, and CSV-like formats; integrate with Scanpy, Muon, and PyTorch for downstream analysis.
  • Data manipulation: subset, concatenate, transform, reformat, and preserve raw data for reproducibility.
  • Integration and reproducibility: store processing history and versions in uns for traceability; support backed mode for large datasets.

Quick Start

Install AnnData and create an AnnData object from a dense matrix with basic obs/var metadata to begin analysis.

Frequently Asked Questions about anndata

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

FAQPage Schema
How do I manage large single-cell data matrices without running out of memory?

Annotated data matrices can be handled in backed mode to process large single-cell datasets without loading everything into memory, enabling efficient loading, filtering, and transformation across X, obs, and var components.

What is the best way to store single-cell embeddings and metadata together?

Using the AnnData structure allows you to store the main data matrix X alongside embeddings in obsm, unstructured metadata in uns, and feature annotations in var, keeping all single-cell analysis components aligned in one object.

Can I read and write h5ad, zarr, and loom formats for single-cell analysis?

Yes, the framework supports broad I/O compatibility for reading and writing h5ad, zarr, loom, and CSV-like formats, ensuring annotated data matrices integrate smoothly across different single-cell analysis environments.

Does this annotated data structure work with the Scanpy ecosystem?

Yes, the framework is designed for integration with the Scanpy ecosystem, allowing you to pass annotated data matrices directly into downstream single-cell analysis workflows and tools like Muon or PyTorch.

How do I preserve raw data and processing history for reproducibility?

You can store processing history and version information in the uns attribute, and use the raw component to preserve pre-transformation data matrices, ensuring full traceability and reproducibility during single-cell analysis.

What are the limitations of backed mode for annotated data matrices?

Backed mode requires compatible file formats like h5ad or zarr to access data on disk, and while it enables memory-efficient handling of large datasets, certain in-memory transformations or modifications might be restricted or require loading data fully.