scanpy
यह क्या करती है
यह टूल single-cell RNA sequencing (scRNA-seq) data का विश्लेषण करता है। यह data की quality समझने, मिलते-जुलते cells को समूहों में बाँटने, खास genes खोजने और नतीजों को visualize करने में मदद करता है।
कब इस्तेमाल करें
- ✓जब आपके पास raw single-cell sequencing data हो।
- ✓अपने single-cell data को व्यवस्थित करने और visualize करने के लिए।
- ✓किसी sample के भीतर अलग-अलग cell types पहचानने के लिए।
Skill का लिंक
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/scanpy/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे single-cell RNA-seq data का विश्लेषण करो: quality control करो, data को normalize करो, PCA और UMAP से dimensionality कम करो, cells को cluster करो, और marker genes खोजो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
टूल अपनी processing के लिए Scanpy नाम के निर्देशों के सेट का इस्तेमाल करता है। यह cleaning, normalization, dimensionality reduction और clustering जैसे कई चरण करता है, ताकि data में छिपे patterns सामने आ सकें।
तकनीकी सामग्री (मूल 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 countswhen X is already normalized; never infer provenance from integer-looking values alone. layers["counts"]remains unnormalized;.rawis an independent full-gene log-normalized snapshot. Gene subsetting also subsets every layer, but does not subset.rawgenes. Retain a full-gene object for pseudobulk; the full pipeline does so.seurat/cell_rangerHVGs use log-normalized values;seurat_v3andseurat_v3_paperuse counts and requirescanpy[skmisc]. Scaling/regression are optional, may densify sparse data, and can remove biology along with covariates.- Marker ranking defaults to
.rawwhen present;--no-use-rawselects X and--layerselects an explicit log-normalized layer.--groups/--referencecontrol 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. .rdsneeds 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.
…
अक्सर पूछे जाने वाले सवाल
single-cell RNA sequencing (scRNA-seq) data क्या है?
यह एक तकनीक है जिससे अलग-अलग cells के RNA का विश्लेषण किया जा सकता है। इससे किसी tissue या sample में हर cell की विविधता और उसका काम पता चलता है।
'.h5ad' file क्या है?
यह एक आम file format है जिसमें single-cell data कुशलता से स्टोर किया जाता है, और यह Scanpy टूल के साथ काम करता है।
क्या मैं .rds जैसे दूसरे formats का data इस्तेमाल कर सकता हूँ?
हाँ, टूल .rds (R में आम) जैसे formats के data को विश्लेषण से पहले .h5ad format में बदल सकता है।
जानकारी
लेखक का मूल विवरण
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.
लोकप्रियता
- GitHub स्टार
- 51k
- रैंकिंग में स्थान
- #3559
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
13c-metabolic-flux
51kकार्बन-13 आइसोटोप ट्रेसिंग डेटा से मेटाबोलिक फ़्लक्स का अनुमान लगाता है। कोशिका के मेटाबॉलिज़्म और बायोकेमिकल मार्गों का विश्लेषण करने के लिए यह उपयोगी है।
adaptyv
51kAdaptyv API का उपयोग करके प्रोटीन कैरेक्टराइज़ेशन प्रयोग डिज़ाइन करता है। लागत का अनुमान लगाने, सीक्वेंस सबमिट करने और लैब के नतीजों पर नज़र रखने में मदद करता है।
aeon
51kटाइम सीरीज़ डेटा पर मशीन लर्निंग के काम करता है। क्रमबद्ध डेटा में वर्गीकरण, पूर्वानुमान, एनोमली डिटेक्शन और पैटर्न खोजने के लिए यह उपयोगी है।
alphagenome
51kजेनेटिक वेरिएंट्स के पहले से गणना किए गए जीनोमिक प्रभाव देखता है। वेरिएंट का जीनोम पर असर समझने के लिए स्कोर और स्पष्टीकरण देता है।
मिलती-जुलती skills
pytorch-patterns
280kआपके एजेंट को machine learning models के लिए PyTorch इस्तेमाल करने में मदद करता है। कुशल model training के best practices लागू करता है और नतीजों को दोहराने लायक रखता है।
evm-token-decimals
280kयह आपके एजेंट को अलग-अलग blockchain networks पर decimal numbers की गलतियों से बचने में मदद करता है। यह transactions और calculations में token values सही रखने का ध्यान रखता है।
ito-inference
280kआपके एजेंट को AI models की उपलब्धता जाँचने देता है। यह compute request को तैयार model service से जोड़ता है।