Langsung ke konten
Skillpedia
Analisis & spreadsheet51k ยท #3437

cellxgene-census

Fungsinya

Agen ini memungkinkan Anda mengakses dan menganalisis data transkriptomik sel tunggal dan spasial dalam jumlah besar secara terprogram. Agen ini menyediakan akses ke informasi tentang jutaan sel, termasuk metadata, ekspresi gen, dan data spasial, tanpa perlu mengunduh semuanya.

Kapan dipakai

  • โœ“Saat Anda membutuhkan informasi tentang jutaan sel (seperti jenis sel, jaringan, atau penyakit).
  • โœ“Untuk melatih model machine learning menggunakan data sel tunggal.
  • โœ“Untuk membandingkan data sel tunggal antarspesies atau antarpenyakit.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/cellxgene-census/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œApa saja jenis sel yang ditemukan di jaringan otak manusia, menurut data terbaru?โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agen ini terhubung ke basis data besar berisi data transkriptomik. Anda dapat mengajukan pertanyaan spesifik untuk mengambil data yang dibutuhkan, misalnya dengan memfilter berdasarkan jenis sel atau penyakit, lalu agen akan mengambilnya untuk Anda.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

โ€ฆ

Pertanyaan umum

Apa itu data transkriptomik sel tunggal?

Itu adalah data yang menunjukkan gen mana yang aktif di setiap sel secara individual. Data ini membantu para ilmuwan memahami fungsi dari berbagai jenis sel.

Apa arti 'akses terprogram'?

Artinya Anda bisa menggunakan kode program untuk meminta dan mendapatkan data, alih-alih mengklik menu atau mengunduh file secara manual.

Mengapa penting untuk menentukan versi data?

Hal ini memastikan analisis Anda dapat direproduksi. Jika data diperbarui, analisis sebelumnya tetap bisa dijalankan dengan versi data yang Anda gunakan semula.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
51k
Peringkat
#3437
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa