技能 scanpy
🔬
單細胞 RNA 定序會產生複雜資料集,需要專門的分析。此技能提供完整流程,涵蓋品質控制、降維、分群與單細胞基因表達資料的視覺化。
支援: Claude Codex Code(CC)
1
下載技能 ZIP
2
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
3
開啟並開始使用
測試它
正在使用「scanpy」。 Load my single-cell data and perform quality control
預期結果:
- Loaded 3,245 cells x 20,000 genes
- QC metrics: mean 1,542 genes per cell, 4.2% mitochondrial reads
- After filtering: 2,987 cells x 15,432 genes (92% cells retained)
- Saved QC violin plots to figures/qc_violin.pdf
正在使用「scanpy」。 Run complete clustering and annotation workflow
預期結果:
- Identified 12 cell clusters using Leiden algorithm
- Generated UMAP visualization colored by cluster
- Top marker genes identified for each cluster
- Cell types annotated based on known marker expression
安全審計
安全v4 • 1/17/2026
All 228 static findings are false positives. This is a legitimate scientific computing skill for single-cell RNA-seq analysis. The scanner incorrectly flagged: markdown inline code formatting (backticks), file I/O functions for data reading, directory creation operations, and git tree hashes as C2 indicators. No malicious patterns, network exfiltration, or command injection risks exist after human evaluation.
7
已掃描檔案
3,003
分析行數
3
發現項
4
審計總數
風險因素
📁 檔案系統存取 (2)
🌐 網路存取 (1)
審計者: claude 查看審計歷史 →
品質評分
82
架構
90
可維護性
85
內容
21
社群
100
安全
91
規範符合性
你能建構什麼
探索性 scRNA-seq 分析
分析單細胞基因表達資料集以辨識細胞類型、狀態與族群。
標記基因探索
找出群集之間的差異表達基因並刻畫細胞族群。
視覺化流程
產生用於發表的 UMAP、t-SNE 與其他降維圖。
試試這些提示
載入並檢視資料
Load my single-cell data from data.h5ad and show me the basic structure including cell and gene counts.
QC 與過濾
Run quality control on my dataset, filter cells with less than 200 genes or more than 5% mitochondrial reads, and generate QC plots.
分群與註解
Perform clustering at resolution 0.5, generate UMAP visualization, and identify marker genes for each cluster.
完整分析
Run a complete scanpy workflow: QC, normalization, highly variable genes, PCA, neighbors, UMAP, Leiden clustering at resolution 0.8, and save results.
最佳實務
- 在過濾前一定要保存原始計數:adata.raw = adata
- 透過檢查已知標記基因表達來驗證分群
- 保存中間結果以避免重跑耗時流程
避免
- 在下游分析前跳過品質控制步驟
- 未測試多個值就使用預設分群解析度
- 未在過濾前後進行資料視覺化
常見問題
scanpy 支援哪些檔案格式?
Scanpy 支援 h5ad、10X Genomics MTX、HDF5、CSV、loom 與文字檔。
UMAP 應該使用多少鄰居?
預設為 10-30 個鄰居。較低值保留局部結構;較高值捕捉全域模式。
Leiden 與 Louvain 分群?
建議使用 Leiden,因其產生更高品質的群集且效率高於 Louvain。
應該使用多少個 PC?
查看 PCA 解釋變異比例圖。使用肘部之前的 PC,對高變異資料集通常為 30-50 個。
粒線體門檻是多少?
常見門檻為 5-20%。較低門檻會移除更多細胞;請用已知細胞類型標記驗證。
如何註解細胞類型?
使用已知細胞類型標記基因。在 UMAP 上視覺化表達,並將群集標記基因與參考資料庫比較。