본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트51k · #3437

cellxgene-census

하는 일

이 에이전트는 방대한 양의 단일 세포 및 공간 전사체 데이터에 프로그래밍 방식으로 접근해 분석할 수 있게 합니다. 모든 것을 내려받지 않고도 메타데이터, 유전자 발현, 공간 데이터 등 수백만 개 세포에 관한 정보를 제공합니다.

사용하는 경우

  • ✓수백만 개 세포에 대한 정보(세포 유형, 조직, 질병 등)가 필요할 때.
  • ✓단일 세포 데이터로 머신러닝 모델을 훈련하고 싶을 때.
  • ✓서로 다른 생물이나 질병 간에 단일 세포 데이터를 비교할 때.

스킬 링크

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/cellxgene-census/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/cellxgene-census/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“최신 데이터에 따르면, 사람의 뇌 조직에서 발견되는 세포 유형은 무엇인가요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

방대한 전사체 데이터베이스에 연결해 작동합니다. 세포 유형이나 질병으로 걸러 내는 등 필요한 데이터를 요청하면, 에이전트가 이를 찾아 가져옵니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

CZ CELLxGENE Census

Overview

The CZ CELLxGENE Census provides programmatic access to a comprehensive, versioned collection of standardized single-cell and spatial transcriptomics data from CZ CELLxGENE Discover. This skill enables efficient querying and analysis of public Census releases without downloading whole datasets first.

The Census includes:

  • 217+ million total cells and 125+ million unique cells in the 2025-11-08 stable LTS release
  • 1,845 datasets in the 2025-11-08 stable LTS release
  • Human, mouse, marmoset, rhesus macaque, and chimpanzee data in the current schema
  • Standardized metadata (cell types, tissues, diseases, donors)
  • Raw gene expression matrices and source H5AD lookup/download helpers
  • Pre-calculated summary counts, embeddings, and spatial data
  • Integration with AnnData, Scanpy, TileDB-SOMA, TileDB-SOMA-ML, and other analysis tools

When to Use This Skill

This skill should be used when:

  • Querying single-cell expression data by cell type, tissue, or disease
  • Exploring available single-cell datasets and metadata
  • Training machine learning models on single-cell data
  • Performing large-scale cross-dataset analyses
  • Integrating Census data with scanpy or other analysis frameworks
  • Computing statistics across millions of cells
  • Accessing pre-calculated embeddings or model predictions

Installation and Setup

Install the Census API:

uv pip install "cellxgene-census==1.18.0"

For spatial workflows:

uv pip install "cellxgene-census[spatial]==1.18.0"

For PyTorch model training, use TileDB-SOMA-ML. The old cellxgene_census.experimental.ml loaders are absent from 1.18.0:

uv pip install "cellxgene-census==1.18.0" tiledbsoma-ml

Core Workflow Patterns

Eight patterns, each with code, are in references/core_workflow_patterns.md:

  1. Opening the Census — always pin census_version so an analysis stays reproducible.
  2. Exploring Census information — available datasets, cell counts, and summary tables.
  3. Querying expression data — small to medium scale into an AnnData.
  4. Large-scale queries — out-of-core processing when the slice will not fit in memory.
  5. Machine learning with PyTorch — TileDB-SOMA-ML data loaders.
  6. Spatial Census data — accessing spatial assays.
  7. Integration with Scanpy — handing a Census slice to a standard Scanpy workflow.
  8. Multi-dataset integration — combining datasets and handling batch effects.

Key Concepts and Best Practices

The examples pin the current LTS build 2025-11-08, verified through the live release directory on 2026-09-30. The SDK and data release are separate versions. Resolve stable once with get_census_version_description("stable")["release_build"] and record that date; never silently switch builds midway through analysis.

Always Filter for Primary Data

Unless analyzing duplicates, always include is_primary_data == True in queries to avoid counting cells multiple times:

obs_value_filter="cell_type == 'B cell' and is_primary_data == True"

Specify Census Version for Reproducibility

Always specify the Census version in production analyses:

census = cellxgene_census.open_soma(census_version="2025-11-08")

Estimate Query Size Before Loading

For large queries, count the selected rows without loading every metadata column. Cell count alone is not a memory estimate: gene count, sparsity, dtype, layers, embeddings, and downstream dense copies also matter:

import tiledbsoma as soma
with census["census_data"]["homo_sapiens"].axis_query(
    measurement_name="RNA",
    obs_query=soma.AxisQuery(
        value_filter="tissue_general == 'brain' and is_primary_data == True"
    ),
) as query:
    print(f"Selected {query.n_obs:,} cells and {query.n_vars:,} genes")

# Query axes consume memory too; stream expression if the matrix will not fit.

Use tissue_general for Broader Groupings

The tissue_general field provides coarser categories than tissue, useful for cross-tissue analyses:

# Broader grouping
obs_value_filter="tissue_general == 'immune system'"

# Specific tissue
obs_value_filter="tissue == 'venous blood'"

Select Only Needed Columns

Minimize data transfer by specifying only required metadata columns:

obs_column_names=["cell_type", "tissue_general", "disease"]  # Not all columns

…

자주 묻는 질문

단일 세포 전사체 데이터란 무엇인가요?

개별 세포에서 어떤 유전자가 활성화되어 있는지 보여 주는 데이터입니다. 과학자들이 세포 유형의 기능을 이해하는 데 도움이 됩니다.

‘프로그래밍 방식 접근’은 무슨 뜻인가요?

메뉴를 클릭하거나 파일을 수동으로 내려받는 대신, 프로그래밍 코드를 사용해 데이터를 요청하고 받을 수 있다는 뜻입니다.

데이터 버전을 지정하는 것이 왜 중요한가요?

분석을 재현할 수 있도록 보장하기 때문입니다. 데이터가 업데이트되더라도, 처음 사용한 데이터 버전으로 이전 분석이 계속 작동합니다.

상세 정보

작성자의 원본 설명

Queries the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data. Use when you need population-scale cell metadata, gene expression slices, Census summary counts, source H5AD URIs/downloads, embeddings, spatial Census data, or reference atlas comparisons across organisms, tissues, diseases, assays, and cell types. For analyzing your own local singl

repo: K-Dense-AI/scientific-agent-skills

인기도

GitHub 스타
51k
순위
#3437
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬