Skillpedia
تعلّم الآلة51k · #3559

scanpy

ما الذي تفعله

تحلل هذه المهارة بيانات تسلسل الحمض الريبي لخلية واحدة (scRNA-seq). تساعد على فهم جودة البيانات، وتجميع الخلايا المتشابهة، وإيجاد الجينات المهمة، وعرض النتائج بصرياً.

متى تستخدمها

  • ✓عندما تملك بيانات تسلسل خام لخلية واحدة.
  • ✓عندما تريد تنظيم بياناتك لخلية واحدة وعرضها بصرياً.
  • ✓عندما تريد تحديد أنواع الخلايا المختلفة داخل عينتك.

رابط المهارة

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

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

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

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

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

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

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

“حلّل بيانات تسلسل RNA لخلية واحدة الخاصة بي، ونفّذ مراقبة الجودة، ثم طبّع البيانات، وقلّل الأبعاد باستخدام PCA وUMAP، ثم اجمع الخلايا، وابحث عن الجينات المميزة.”

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

كيف تعمل

تستخدم المهارة مجموعة من التعليمات تُسمى Scanpy لمعالجة بياناتك. تنفذ خطوات متعددة مثل التنظيف والتطبيع وتقليل الأبعاد والتجميع، لكشف الأنماط في البيانات.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Scanpy: Single-Cell Analysis

Overview

Scanpy is a scalable Python toolkit for analyzing single-cell RNA-seq data, built on AnnData. Apply this skill for complete single-cell workflows including quality control, normalization, dimensionality reduction, clustering, marker gene identification, visualization, and trajectory analysis. Targets Scanpy 1.12.4 (released 2026-08-27), reviewed 2026-10-01. Native synthetic tests establish data/API contracts, not biological validity.

Installation

Requires Python 3.12+ (scanpy 1.12 dropped Python ≤3.11) and anndata ≥0.10.

uv pip install "scanpy[leiden]"

The [leiden] extra installs igraph and leidenalg; the scripts explicitly select flavor="igraph". For reproducible environments, pin a version: uv pip install "scanpy[leiden]==1.12.4".

For large or out-of-core datasets, many functions support Dask arrays (experimental):

uv pip install "scanpy[leiden]" dask

See the Using dask with Scanpy tutorial. For GPU-accelerated scanpy-like operations, use rapids-singlecell as a separate package.

If the input is an R-native single-cell object (.rds, .RData, Seurat, or SingleCellExperiment), first convert it to .h5ad with R tooling, then load it with Scanpy. Read references/r_interop.md for agent-run installation and conversion instructions across macOS, Linux, and Windows.

For AnnData structure and I/O details, use the anndata skill. For probabilistic models and batch correction, use scvi-tools.

Representation and inference contracts

  • Input to QC/preprocessing must be identified raw counts. The scripts reject negative, fractional, nonfinite or zero-total cells. Use --counts-layer counts when X is already normalized; never infer provenance from integer-looking values alone.
  • layers["counts"] remains unnormalized; .raw is an independent full-gene log-normalized snapshot. Gene subsetting also subsets every layer, but does not subset .raw genes. Retain a full-gene object for pseudobulk; the full pipeline does so.
  • seurat/cell_ranger HVGs use log-normalized values; seurat_v3 and seurat_v3_paper use counts and require scanpy[skmisc]. Scaling/regression are optional, may densify sparse data, and can remove biology along with covariates.
  • Marker ranking defaults to .raw when present; --no-use-raw selects X and --layer selects an explicit log-normalized layer. --groups/--reference control contrasts. Wilcoxon/t-test adjusted p-values use BH within each comparison; logreg returns ranking scores without p-values. Clusters chosen from the same data yield exploratory markers.
  • Condition DE requires raw-count sums per sample and cell type, independent biological replicates, aligned condition/donor metadata and a full-rank design. Analyze each cell type separately; repeated donor samples require a suitable paired design. Aggregation cannot fix confounding, missing replication, doublets or incorrect annotations.
  • Harmony (harmonypy) changes PCA coordinates; BBKNN (bbknn) changes the graph; ComBat changes X. Keep original expression/counts for DE, and assess biological conservation and batch mixing together. Requested integration/doublet failures stop.
  • The toolkit loads files into memory. For backed data, explicitly call .to_memory() on a chosen subset and close the file; backed mode is not a general out-of-core pipeline. Copy views before mutation. Dask support varies by function/array layout.
  • .rds needs an explicit R conversion stage. Cluster IDs do not determine cell types: all mappings/signature assets are illustrative human marker examples, requiring review.

Harmony 2 returns cells x PCs; the toolkit calls its native API because the Scanpy 1.12.4 wrapper still transposes that output and fails with current Harmony.

Optional packages: scikit-image for Scrublet automatic thresholding, loompy for Loom, scikit-misc for v3 HVGs, harmonypy==2.0.2/bbknn==1.6.0 for their integration branches, and louvain for the deprecated Louvain option (separate environment: louvain 0.8.2 requires igraph <0.12, conflicting with the tested igraph 1.0). Install only needed branches. R and optional integration execution boundaries are recorded in references/upstream-review.md.

…

الأسئلة الشائعة

ما هي بيانات تسلسل الحمض الريبي لخلية واحدة (scRNA-seq)؟

هي تقنية تتيح تحليل الحمض الريبي من كل خلية على حدة، مما يكشف تنوع كل خلية في النسيج أو العينة ووظائفها.

ما هو ملف h5ad؟

هو صيغة ملفات شائعة تُستخدم لتخزين بيانات الخلية الواحدة بكفاءة، ومتوافقة مع أداة Scanpy.

هل يمكنني استخدام بيانات من صيغ أخرى مثل rds؟

نعم، تستطيع المهارة تحويل البيانات من صيغ مثل rds (الشائعة في R) إلى صيغة h5ad قبل التحليل.

التفاصيل

الوصف الأصلي من المؤلف

Performs Scanpy single-cell RNA-seq QC, normalization, HVG selection, PCA/UMAP/t-SNE, clustering, exploratory marker ranking, pseudobulk preparation, visualization, and Seurat or SingleCellExperiment RDS conversion to h5ad. Applies to established exploratory scRNA-seq workflows with explicit count and expression provenance; complementary skills cover scvi-tools models and AnnData format details.

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

الشعبية

نجوم GitHub
51k
الترتيب
#3559
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

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

0

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

التعليقات

  • …

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

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