alterlab-anndata
Build, slice, concatenate, read, and write AnnData annotated data matrices (obs, var, X, layers, obsm, uns) — the scverse data STRUCTURE, not an analysis…
Skill by AlterLab-IEU
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/alterlab-ieu-alterlab-anndata
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, writing, research
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/alterlab-anndata
Tools it pre-approves 5
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
ReadWriteEditBash(python:*)Bash(uv:*)
What's inside
- Skill name
alterlab-anndata- Description
- Build, slice, concatenate, read, and write AnnData annotated data matrices (obs, var, X, layers, obsm, uns) — the scverse data STRUCTURE, not an analysis pipeline. Use when creating or wrangling .h5ad/zarr files, managing cell and gene annotations, concatenating batches, or handling layers/obsm/backed-mode; for the QC, normalization, clustering, UMAP, and differential-expression analysis pipeline prefer alterlab-scanpy instead, and for RNA velocity from spliced/unspliced layers prefer alterlab-scvelo instead. Part of the AlterLab Academic Skills suite.
- License
- MIT
- Compatibility
- Runs under `uv run python` with `anndata` >= 0.13 (current 0.13.4 as of 2026-09, requires Python >= 3.12, zarr >= 3.1) installed in the project env; no API key or account required. The 0.11/0.12 APIs still work except where flagged below.
- Allowed tools
- Read, Write, Edit, Bash(python:*), Bash(uv:*)
- Metadata
- version: 1.1.0 · last_updated: 2026-09-23 · skill-author: AlterLab
- Instructions
- 411 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (7)
- SKILL.md
- evals.json · evals/
- best_practices.md · references/
- concatenation.md · references/
- data_structure.md · references/
- io_operations.md · references/
- manipulation.md · references/
SKILL.md (first lines)
# AnnData
## Overview
AnnData is a Python package for handling annotated data matrices, storing experimental measurements (X) alongside observation metadata (obs), variable metadata (var), and multi-dimensional annotations (obsm, varm, obsp, varp, uns). Originally designed for single-cell genomics through Scanpy, it now serves as a general-purpose framework for any annotated data requiring efficient storage, manipulation, and analysis.
## When to Use This Skill
Use this skill when:
- Creating, reading, or writing AnnData objects
- Working with h5ad, zarr, or other genomics data formats
- Performing single-cell RNA-seq analysis
- Managing large datasets with sparse matrices or backed mode
- Concatenating multiple datasets or experimental batches
- Subsetting, filtering, or transforming annotated data
- Integrating with scanpy, scvi-tools, or other scverse ecosystem tools
### Does NOT Trigger
| Scenario | Use Instead |
|----------|-------------|
| QC, normalization, HVG, clustering, UMAP, or marker genes | `alterlab-scanpy` |
| RNA velocity from spliced/unspliced layers | `alterlab-scvelo` |
| Deep generative models / batch integration (scVI, scANVI) | `alterlab-scvi-tools` |
| Querying the public CELLxGENE Census for reference cells | `alterlab-cellxgene` |
| Chunked n-dimensional arrays outside the AnnData model | `alterlab-zarr` |
## Installation
```bash
uv pip install anndata # 0.13.x as of 2026-09; needs Python >= 3.12
# Lazy/backed reads (ad.experimental.read_lazy) need dask + xarray:
uv pip install 'anndata[lazy]' # or 'anndata[dask]' for dask-backed arrays only
```
### What changed in 0.13 (breaking)
These bite existing scripts, so check them before running older code:
- **`AnnData.concatenate()` is gone** — use the module-level `ad.concat([...])`.
- **`.X` is copy-on-write** like `layers`/`obsm`: writing into a subset (`view.X = 0`) no
longer propagates to the parent object. `.X` is now stored as `layers[None]`, so it shows
up in the repr and in `.layers.keys()`.
- **The `dtype=` argument to the `AnnData` constructor was removed** — cast `X` yourself.
- **zarr v3 only** (`zarr >= 3.1`); writing the v2 format is deprecated as of 0.13.4 and
goes away in 0.14. Stores are written sharded by default.
- **`anndata.__version__` and the `adata.*_keys()` methods are deprecated** — use
`importlib.metadata.version("anndata")` and `sorted(adata.obs)` / `k in adata.uns`.
- **Loom I/O is deprecated** (`ad.io.read_loom`, `adata.write_loom`) in favour of h5ad/zarr.
## Quick Start
### Creating an AnnData object
```python
import anndata as ad
import numpy as np
import pandas as pd
# Minimal creation
X = np.random.rand(100, 2000) # 100 cells × 2000 genes
adata = ad.AnnData(X)
# With metadata
obs = pd.DataFrame({
'cell_type': ['T cell', 'B cell'] * 50,
'sample': ['A', 'B'] * 50
}, index=[f'cell_{i}' for i in range(100)])
var = pd.DataFrame({
'gene_name': [f'Gene_{i}' for i in range(2000)]
}, index=[f'ENSG{i:05d}' for i in range(2000)])
adata = ad.AnnData(X=X, obs=obs, var=var)
```
### Reading data
```python
import scanpy as sc # 10x readers live in scanpy, not anndata
# Read h5ad file
adata = ad.read_h5ad('data.h5ad')
# Read with backed mode (for large files)
adata = ad.read_h5ad('large_data.h5ad', backed='r')
# Read other formats (these live under ad.io as of anndata 0.11)
adata = ad.io.read_csv('data.csv')
adata = ad.io.read_mtx('matrix.mtx')
adata = sc.read_10x_h5('filtered_feature_bc_matrix.h5')
```
> **API namespaces (anndata >= 0.11)**: all format readers/writers live in the
> `anndata.io` module (`ad.io.read_csv`, `ad.io.read_mtx`, `ad.io.read_loom`,
> `ad.io.read_elem`, ...). The top-level `ad.read_csv`-style aliases still resolve
> but emit a `FutureWarning` (upgraded from `DeprecationWarning` in 0.12), and
> `anndata.read` was removed in 0.12. **Exceptions**: `ad.read_h5ad`, `ad.read_zarr`,
> `adata.write_h5ad`, and `adata.write_zarr` stay top-level with no warning.
>
> **10x readers** (`read_10x_h5`, `read_10x_mtx`) live in **scanpy**
> (`sc.read_10x_h5`), not anndata — this skill defers analysis-specific I/O to scanpy.
### Writing data
```python
# Write h5ad file
adata.write_h5ad('output.h5ad')
# Write with compression
adata.write_h5ad('output.h5ad', compression='gzip')
# Write other formats
adata.write_zarr('output.zarr') # zarr v3, sharded by default
adata.write_csvs('output_dir/', skip_data=False) # skip_data defaults to True (obs/var only)
```
### Basic operations
```python
# Subset by conditions
t_cells = adata[adata.obs['cell_type'] == 'T cell']From AlterLab-IEU/AlterLab-Academic-Skills, MIT.
More from AlterLab-IEU/AlterLab-Academic-Skills
- 0.545score
alterlab-alphafold
AlterLab-IEU
Predict protein 3D structures with AlphaFold2 via ColabFold — MMseqs2-accelerated MSAs, monomer and AlphaFold2-Multimer complex folding, and confidence-based…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-arboreto
AlterLab-IEU
Infer gene regulatory networks (GRNs) from expression matrices using arboreto's scalable GRNBoost2 and GENIE3 tree-ensemble algorithms with Dask-distributed…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-biopython
AlterLab-IEU
Manipulate biological sequences, parse FASTA/GenBank/PDB files, run phylogenetics, and access NCBI/PubMed programmatically via Biopython (Bio.SeqIO…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-bioservices
AlterLab-IEU
Query 40+ bioinformatics web services through one consistent Python API with bioservices (UniProt, KEGG, ChEMBL, Reactome, Ensembl, NCBI and more).
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-boltz
AlterLab-IEU
Co-fold biomolecular complexes with Boltz-2, an open AlphaFold3-style model — predict protein + ligand (SMILES/CCD), protein + nucleic-acid, and multi-chain…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-borzoi
AlterLab-IEU
Predict genome-wide functional genomics tracks from DNA sequence with Borzoi (Linder 2025) — a sequence-to-function model outputting RNA-seq, CAGE, ATAC, and…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-cellxgene
AlterLab-IEU
Query the CZ CELLxGENE Census (200M+ cells) programmatically via cellxgene-census and TileDB-SOMA, slicing expression by tissue, disease, or cell type and…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-chai
AlterLab-IEU
Predict biomolecular complexes with Chai-1, an open AlphaFold3-style model that folds multi-entity assemblies (proteins, ligands, nucleic acids) from a single…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-cobrapy
AlterLab-IEU
Build and analyze genome-scale constraint-based metabolic models with COBRApy — flux balance analysis (FBA), flux variability analysis (FVA), gene and…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-deeptools
AlterLab-IEU
Process and visualize deep-sequencing coverage with the deepTools CLI — convert BAM to bigWig (bamCoverage), build log2 ratio tracks (bamCompare), run QC…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-esm
AlterLab-IEU
Run ESM protein language models — ESMC for embeddings and representations, ESMFold2 for structure prediction, and ESM3 for generative multimodal protein…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-blast
AlterLab-IEU
Runs NCBI BLAST+ 2.17.0 sequence searches from the command line: makeblastdb (with -parse_seqids), blastn/blastp/blastx/tblastn with tabular -outfmt 6/7 for…
SkillBFreshness: B★ 78Claude Code +9
Signals
- Stars
- 78
- Forks
- 16
- Open issues
- 1
- Last commit (this folder)
- Sep 23, 2026 (1 month ago)
- Last release
- Sep 23, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.1.0
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from AlterLab-IEU
- 0.545score
alterlab-blast
AlterLab-IEU
Runs NCBI BLAST+ 2.17.0 sequence searches from the command line: makeblastdb (with -parse_seqids), blastn/blastp/blastx/tblastn with tabular -outfmt 6/7 for…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-alphafold
AlterLab-IEU
Predict protein 3D structures with AlphaFold2 via ColabFold — MMseqs2-accelerated MSAs, monomer and AlphaFold2-Multimer complex folding, and confidence-based…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-arboreto
AlterLab-IEU
Infer gene regulatory networks (GRNs) from expression matrices using arboreto's scalable GRNBoost2 and GENIE3 tree-ensemble algorithms with Dask-distributed…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-biopython
AlterLab-IEU
Manipulate biological sequences, parse FASTA/GenBank/PDB files, run phylogenetics, and access NCBI/PubMed programmatically via Biopython (Bio.SeqIO…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-bioservices
AlterLab-IEU
Query 40+ bioinformatics web services through one consistent Python API with bioservices (UniProt, KEGG, ChEMBL, Reactome, Ensembl, NCBI and more).
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-boltz
AlterLab-IEU
Co-fold biomolecular complexes with Boltz-2, an open AlphaFold3-style model — predict protein + ligand (SMILES/CCD), protein + nucleic-acid, and multi-chain…
SkillBFreshness: B★ 78Claude Code +9
Cite this page
alterlab-anndata skill. Agent Mart. https://agentmart.dev/skills/alterlab-ieu-alterlab-anndata (last updated 2026-10-24)