Skillpedia
التحليل وجداول البيانات51k · #3437

cellxgene-census

ما الذي تفعله

يتيح لك هذا الوكيل الوصول إلى كميات كبيرة من بيانات النسخ الجيني للخلية المفردة وبيانات النسخ المكاني، وتحليلها برمجيًا. يوفر معلومات عن ملايين الخلايا، تشمل البيانات الوصفية والتعبير الجيني والبيانات المكانية، دون الحاجة إلى تنزيل كل شيء.

متى تستخدمها

  • ✓عندما تحتاج إلى معلومات عن ملايين الخلايا، مثل أنواع الخلايا أو الأنسجة أو الأمراض.
  • ✓عندما تريد تدريب نماذج تعلم الآلة باستخدام بيانات الخلية المفردة.
  • ✓عندما تريد مقارنة بيانات الخلية المفردة عبر كائنات حية أو أمراض مختلفة.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/cellxgene-census/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“ما أنواع الخلايا الموجودة في نسيج دماغ الإنسان، وفق أحدث البيانات؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يتصل الوكيل بقاعدة بيانات كبيرة لبيانات النسخ الجيني. يمكنك طرح أسئلة محددة لاستخراج البيانات التي تحتاج إليها، مثل التصفية حسب نوع الخلية أو المرض، فيسترجعها لك.

المحتوى التقني (ملف 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
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة