cellxgene-census
Skill by davila7
Query the CZ CELLxGENE Census, with over 61 million cells, by cell type, tissue or disease. Built for population-scale single-cell analysis with scanpy and PyTorch.
Install cellxgene-census
Built from the published package, never by AI.
git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/cellxgene-census ~/.claude/skills/cellxgene-censusRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/cellxgene-census ~/.gemini/antigravity-cli/skills/cellxgene-censusAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives an AI assistant access to the CZ CELLxGENE Census, a versioned collection of standardized single-cell genomics data from CZ CELLxGENE Discover. The source describes 61 million or more cells from human and mouse, with standardized metadata such as cell types, tissues, diseases and donors. It also includes raw gene expression matrices and pre-calculated embeddings. The assistant can explore metadata, filter cells and genes, and retrieve expression data.
Smaller queries under 100k cells can be loaded into memory with get_anndata(). Larger queries use axis_query() for out-of-core iteration. The skill also covers PyTorch dataloaders through an experimental module and scanpy workflows for normalization, PCA, neighbors and UMAP. It is aimed at researchers and machine learning practitioners doing population-scale single-cell analysis.
Written from the project's SKILL.md and checked against it.
What it can do
- Metadata explorationLists datasets and counts unique cell types, tissues and diseases before querying expression.
- Expression queriesRetrieves expression data as AnnData, filtered by cell and gene criteria.
- Out-of-core processingIterates over large expression matrices in chunks with axis_query().
- PyTorch integrationBuilds experimental dataloaders and train/test splits for model training.
- Scanpy integrationFeeds Census data into standard scanpy normalization, PCA, UMAP and plotting steps.
- Gene presence checkShows which datasets measured specific genes using a presence matrix.
What you need
- Python
- uv package installer
- cellxgene-census package
- Optional: cellxgene-census[experimental] for PyTorch workflows
- scanpy for AnnData analysis
Try asking
- Query Census T cells in lung tissue from COVID-19 donors into AnnData
- Count unique cell types found in brain tissue in the Census
- Check which Census datasets measured CD4 and CD8A
Good to know
- Get_anndata is intended for queries under 100k cells that fit in memory.
- The PyTorch integration is experimental.
- The default Census version is the latest stable release, so pin census_version for reproducible work.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: cli-tool/components/skills/scientific/cellxgene-census/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md15 KB -
references/census_schema.md6 KB -
references/common_patterns.md10 KB
Alternatives to cellxgene-census
All alternatives →Searches arXiv for scientific papers and preprints, extracts their metadata and abstracts, and downloads PDF or HTML full text. Suited to users who need research papers, literature or specific arXiv IDs.
Downloads AlphaFold predicted structures and PAE matrices for a UniProt ID, then reports pLDDT confidence, domain boundaries and disorder. Built for users who already have a UniProt accession.
Queries the QuickGO and Evidence & Conclusion Ontology REST API to map genes to Gene Ontology terms. Built for researchers doing functional annotation and GO hierarchy exploration.
Connects an AI assistant to Peloton to browse fitness classes, check live and archived schedules, and manage workouts. Built for Peloton users who want to plan rides from their assistant.
Queries NCBI Gene through the E-utilities and Datasets API. It helps researchers search genes by symbol or ID, retrieve gene details, and run batch lookups for annotation and functional analysis.
Prepares and launches nf-core/pacsomatic runs for matched tumor-normal PacBio HiFi data starting from unaligned BAM files. It generates samplesheets and pinned launch artifacts, then runs locally or submits to a scheduler.
Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database
cellxgene-census: common questions
Which organisms does the CELLxGENE Census cover?
The source says the Census includes data from human and mouse. Queries use organism names such as homo_sapiens or Homo sapiens.
Why should I filter on is_primary_data?
The source says is_primary_data == True avoids counting duplicate cells, unless duplicates are what you are analyzing.
How do I make Census analyses reproducible?
Pass a specific census_version when opening the Census. The source says the default opens the latest stable release.
How do I install cellxgene-census?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is cellxgene-census free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is cellxgene-census 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 cellxgene-census?
Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.
