CELLxGENE Census Data Querying
Guides Claude to query and analyze the 200M+ cell CZ CELLxGENE Census of public single-cell and spatial transcriptomics data without downloading full datasets.
Data & AnalyticsAdvanced★ 33,030⑂ 3,248AI score 8/10Last updated: Aug 9, 2026
What it does
- Writes
cellxgene_censusPython code to pull cell metadata and expression slices filtered by cell type, tissue, disease, assay, donor and more. - Returns small/medium slices as
AnnData, or switches to out-of-coreaxis_query()processing when the slice won't fit in memory. - Enforces best practices: pin
census_versionfor reproducibility, always filteris_primary_data == True, select only needed columns, and check the presence matrix before gene-level analysis. - Covers spatial Census access, Scanpy hand-off, PyTorch training via TileDB-SOMA-ML, and multi-dataset integration with batch-effect handling.
- Includes a troubleshooting checklist for oversized queries, memory errors, duplicate cells, missing genes, and version drift.
Who it's for
- Bioinformatics researchers and grad students working with single-cell or spatial transcriptomics.
- Anyone benchmarking their own data against public reference atlases.
- ML engineers training cell-type classifiers on millions of cells.
Example uses
- "Show the cell type distribution in human lung" → metadata-only
get_obsquery summarized withvalue_counts(). - "Get CD4/CD8A expression in T cells from COVID-19 donors" → two-step explore-then-query flow loading only the needed genes.
- "Compare macrophages across lung, liver, and brain" → cross-tissue query followed by Scanpy
rank_genes_groups.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/cellxgene-census/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/cellxgene-census folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/cellxgene-census/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/cellxgene-census ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Set up a Python 3.10–3.12 environment (3.13 is not supported yet).
- Clone the repo:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Copy the skill into place:
mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/cellxgene-census ~/.claude/skills/ - Install dependencies:
uv pip install "cellxgene-census==1.17.*"(add the[spatial]extra for spatial data, ortiledbsoma-mlfor model training). - Restart Claude Code and try a prompt like "Query human lung cell types from the CELLxGENE Census".
- No authentication is needed for public Census data, but always estimate cell counts before loading large slices to avoid memory blowups.
View source on GitHub ↗License: MIT