scanpy
하는 일
이 도구는 단일 세포 RNA 시퀀싱(scRNA-seq) 데이터를 분석합니다. 데이터 품질을 이해하고, 비슷한 세포를 묶고, 중요한 유전자를 찾고, 결과를 시각화하도록 돕습니다.
사용하는 경우
- ✓원시 단일 세포 시퀀싱 데이터가 있을 때.
- ✓단일 세포 데이터를 정리하고 시각화할 때.
- ✓시료에서 세포 유형을 식별할 때.
스킬 링크
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/scanpy/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 단일 세포 RNA-seq 데이터를 분석해 주세요. 품질 관리를 하고, 정규화하고, PCA와 UMAP으로 차원을 줄이고, 세포를 군집화하고, 마커 유전자를 찾아 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 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 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.
…
자주 묻는 질문
단일 세포 RNA 시퀀싱(scRNA-seq) 데이터란 무엇인가요?
개별 세포의 RNA를 분석하는 기술로, 조직이나 시료에 있는 각 세포의 다양성과 기능을 드러냅니다.
.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.
인기도
- GitHub 스타
- 51k
- 순위
- #3559
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
13c-metabolic-flux
51k탄소-13 동위원소 추적 데이터를 사용해 대사 흐름(플럭스)을 추정합니다. 세포 대사와 생화학 경로를 분석할 때 유용합니다.
adaptyv
51kAdaptyv API를 사용해 단백질 특성 분석 실험을 설계합니다. 비용을 추정하고, 서열을 제출하며, 실험실 결과를 확인하는 데 도움이 됩니다.
aeon
51k시계열 데이터에 대해 머신러닝 작업을 수행합니다. 순차 데이터를 분류하고, 예측하고, 이상을 탐지하고, 패턴을 찾을 때 유용합니다.
alphagenome
51k유전 변이에 대해 미리 계산된 게놈 영향을 조회합니다. 변이가 게놈에 주는 영향을 이해하도록 점수와 설명을 제공합니다.