Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

anndata

Skill by K-Dense-AI

Explains how to create, read, write, and subset AnnData objects for annotated data matrices. It is aimed at single-cell analysts working with .h5ad and Zarr files in the scverse ecosystem.

  • Score 94
  • 59k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install anndata

Built from the published package, never by AI.

git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/anndata ~/.claude/skills/anndata

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install anndata in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill covers AnnData, a Python package for annotated data matrices. An AnnData object stores measurements in X next to observation metadata (obs), variable metadata (var), and extra annotations in obsm, varm, obsp, varp, and uns. The skill gives code for creating objects, reading and writing h5ad and Zarr files, and using anndata.io for other formats such as CSV, MTX, and Loom.

It also covers concatenating datasets with ad.concat, subsetting and copying data, backed mode for large files, and best practices for memory use. The skill points to scanpy for analysis workflows and to other skills for probabilistic models and population-scale queries. It is intended for single-cell genomics users and anyone who needs annotated data storage in Python.

Written from the project's SKILL.md and checked against it.

What it can do

  • Create AnnData objectsBuilds an AnnData object from a matrix with obs and var metadata tables.
  • Read and write h5ad and ZarrLoads and saves .h5ad and .zarr files, with optional compression.
  • Alternative formatsReads CSV, MTX, and Loom files through anndata.io helpers.
  • Backed modeOpens large h5ad files with backed='r' so X stays on disk.
  • Concatenate datasetsCombines multiple AnnData objects along observations or variables with ad.concat.
  • Subset and transformFilters by metadata or indices, copies or views data, and converts strings to categoricals.
  • Lazy collectionsDescribes AnnCollection for lazy concatenation of backed objects (experimental).
  • Scverse integrationShows how AnnData connects with scanpy and muon for analysis and multimodal data.
  • Best practice guidanceCovers sparse matrices, raw data snapshots, and memory-efficient handling.

What you need

  • Python 3.12 or later
  • anndata package, installed with uv
  • Optional dask and lazy extras for lazy I/O
  • Network access for installation and remote data

Try asking

  • Create an AnnData object from my count matrix and sample metadata
  • Open a large h5ad file in backed mode and subset the first 1000 cells
  • Concatenate three h5ad batches into one AnnData with a batch label

Good to know

  • AnnLoader and Loom reading and writing are deprecated
  • Backed sparse item assignment is unsupported in AnnData 0.13
  • AnnCollection and other experimental APIs carry caveats
  • AnnData.concatenate() was removed in 0.13; use ad.concat

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/anndata/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: Read Write Edit Bash

  • SKILL.md15 KB
  • references/best_practices.md15 KB
  • references/concatenation.md12 KB
  • references/data_structure.md10 KB
  • references/io_operations.md15 KB
Show all 6 files
  • references/manipulation.md14 KB

Alternatives to anndata

All alternatives →

Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database

anndata: common questions

Does this skill run single-cell analysis workflows?

No. The skill is for the data format layer. The source says to use scanpy for analysis workflows, scvi-tools for probabilistic models, and cellxgene-census for population-scale queries.

Which AnnData version does the skill target?

The skill targets AnnData 0.13.4 and requires Python 3.12 or later. It was reviewed on 2026-09-30.

Can it read 10X Genomics data?

The source says 10X data should be read with scanpy, not anndata. It shows sc.read_10x_h5 and sc.read_10x_mtx for this.

How do I install anndata?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is anndata free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is anndata safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to anndata?

Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.

anndata Install

Add to stack

Loading.