sc-batch-integration
БесплатноБез исполняемых скриптовНе проверенIntegrate multi-sample scRNA-seq data with Harmony, scVI, scANVI, BBKNN, Scanorama, or supported R-backed integration methods.
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
Single-Cell Batch Integration
Why This Exists
- Without it: technical batch structure dominates embeddings and cluster separation.
- With it: integrated representations make cross-sample comparison easier.
- Why OmicsClaw: one contract standardizes multiple integration backends and their diagnostics.
Core Capabilities
- Multiple integration backends: Harmony, scVI, scANVI, BBKNN, Scanorama, plus supported R-backed methods.
- Shared batch contract: one
batch_key-centric interface across Python and R paths. - Standard integration gallery: batch-colored UMAP plus label-aware diagnostics when stable labels already exist.
- Figure-ready exports:
figure_data/CSVs plus a gallery manifest for downstream restyling. - Downstream-ready export: writes integrated
processed.h5ad, tables, report, structured result JSON, README, and notebook bundle.
Scope Boundary
Actively implemented methods in this wrapper:
harmonyscviscanvibbknnscanorama
Graph-embedding methods (require additional packages):
simba— SIMBA graph-embedding integration via PBG (requiressimbapackage)
R-backed methods (require corresponding R packages):
fastmnnseurat_ccaseurat_rpca
Input Formats
| Format | Extension / form | Current wrapper support | Notes |
|---|---|---|---|
| AnnData | .h5ad |
yes | current direct input path |
| Demo | --demo |
yes | bundled merged-example fallback |
Input Expectations
- Required metadata: a batch column such as
batch,sample, orsample_id. - Expected state: normalized data plus PCA or data suitable for PCA recomputation.
harmony,bbknn, andscanoramaoperate on normalized / PCA-ready representations.scvi,scanvi,fastmnn,seurat_cca, andseurat_rpcashould preserve raw counts inlayers["counts"]when available.
Workflow
- Validate batch labels and required dependencies.
- Run the selected integration backend.
- Rebuild neighbors/UMAP in the corrected space.
- Export integration diagnostics and point the user to
sc-clusteringas the next standard step. - Write
processed.h5ad,report.md, andresult.json.
CLI Reference
python skills/singlecell/scrna/sc-batch-integration/sc_integrate.py \
--input <merged.h5ad> --method harmony --batch-key sample_id --output <dir>
python skills/singlecell/scrna/sc-batch-integration/sc_integrate.py \
--input <merged.h5ad> --method scvi --batch-key sample_id \
--n-epochs 400 --output <dir>
python skills/singlecell/scrna/sc-batch-integration/sc_integrate.py \
--input <merged.h5ad> --method scanorama --batch-key sample_id --output <dir>
Public Parameters
| Parameter | Role | Notes |
|---|---|---|
--method |
integration backend | harmony, scvi, scanvi, bbknn, scanorama, fastmnn, seurat_cca, or seurat_rpca |
--batch-key |
batch metadata column | core public control across all backends |
--n-epochs |
training/runtime control | used by scvi and scanvi |
--n-latent |
latent dimension | used by scvi and scanvi |
--labels-key |
label column | used by scanvi |
--no-gpu |
force CPU execution | relevant to scvi / scanvi paths |
--harmony-theta |
Harmony diversity penalty | used by harmony |
--bbknn-neighbors-within-batch |
local neighbors per batch | used by bbknn |
--scanorama-knn |
panorama neighbor count | used by scanorama |
--integration-features |
integration features | used by fastmnn, seurat_cca, seurat_rpca |
--integration-pcs |
integration PCs | used by harmony, fastmnn, seurat_cca, seurat_rpca |
--simba-n-top-genes |
variable genes per batch | used by simba (default 3000) |
--simba-n-components |
components for edge inference | used by simba (default 15) |
--simba-k |
neighbors for edge inference | used by simba (default 15) |
--simba-num-workers |
PBG training workers | used by simba (default 4) |
Algorithm / Methodology
Shared integration contract
Current OmicsClaw sc-batch-integration always:
- validates the requested backend
- checks that
batch_keyexists - runs backend-specific correction or latent-space learning
- rebuilds neighbors and UMAP in the integrated representation
- exports one standardized AnnData plus gallery, tables, result JSON, and downstream guidance
Backend groups
- Graph / embedding correction:
harmony,bbknn,scanorama - Latent-variable models:
scvi,scanvi - R-backed bridges:
fastmnn,seurat_cca,seurat_rpca
Important implementation notes:
scanvidepends on labels; the demo path now injects stable labels, but real inputs still needcell_type,leiden,louvain, or another trustworthy label column.- R-backed paths rely on the shared H5AD bridge rather than native Seurat object input.
Output Contract
Successful runs write:
- `pr
Установить sc-batch-integration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sc-batch-integration?
Integrate multi-sample scRNA-seq data with Harmony, scVI, scANVI, BBKNN, Scanorama, or supported R-backed integration methods.
Как установить скилл sc-batch-integration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sc-batch-integration запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic