cellxgene-census

Query CZ CELLxGENE Census single-cell data via TileDB-SOMA in Python.

15|2|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/rubensliv/k-dense-ai --skill cellxgene-census-rubensliv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cellxgene-census
Source: https://github.com/rubensliv/k-dense-ai/tree/main/scientific-skills/cellxgene-census
Command: npx skills add https://github.com/rubensliv/k-dense-ai --skill cellxgene-census-rubensliv

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Accessing and analyzing the CZ CELLxGENE Census at scale is complex; researchers need a unified way to query, filter, and extract cell-level metadata, gene expression, and embeddings across hundreds to thousands of datasets.

Core Features & Use Cases

  • Programmatic access to Census data via TileDB-SOMA for Homo sapiens and Mus musculus.
  • Flexible filtering by cell_type, tissue, disease, donor, and is_primary_data to ensure unique cells.
  • Retrieve obs, var, and expression data, compute summaries, or feed data into AnnData, PyTorch, or Scanpy workflows.
  • Multi-dataset analyses, cross-tissue comparisons, model training, and integration with downstream ML/vis tools.

Quick Start

Open a Soma session and run a simple query to list cell types in a tissue using is_primary_data == True.

Frequently Asked Questions about cellxgene-census

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

FAQPage Schema
How do I query single-cell data from CELLxGENE Census using Python?

You can query CELLxGENE Census single-cell data using Python via TileDB-SOMA. This allows you to filter by cell_type, tissue, disease, and donor to retrieve obs, var, and expression matrices programmatically.

Can I use CELLxGENE Census data with PyTorch and Scanpy workflows?

Yes, CELLxGENE Census data integrates directly with AnnData, PyTorch, and Scanpy. You can retrieve cell-level metadata and precomputed embeddings to feed into downstream machine learning and visualization workflows.

How do I analyze large-scale single-cell datasets out-of-core without loading everything into memory?

The Skill supports out-of-core processing across multiple datasets using TileDB-SOMA. This enables cross-tissue comparisons and multi-dataset analyses on large-scale single-cell data without loading it all into memory.

What is the best way to ensure I only retrieve unique primary cells from the Census?

To ensure you only retrieve unique primary cells from the Census, you should filter your queries using the is_primary_data == True condition. This prevents duplicate cells from appearing across multiple datasets.

Does the Skill support querying single-cell data for both human and mouse organisms?

Yes, the Skill provides programmatic access to Census data for both Homo sapiens and Mus musculus. You can query and analyze single-cell data across these two organisms using the TileDB-SOMA API.

How do I control the census_version when querying single-cell data?

The Skill supports census_version control to manage which version of the Census data you are querying. This ensures reproducible single-cell data retrieval and analysis across different dataset snapshots.