Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

sc-batch-integration

БесплатноБез исполняемых скриптовНе проверен

Integrate multi-sample scRNA-seq data with Harmony, scVI, scANVI, BBKNN, Scanorama, or supported R-backed integration methods.

mdbabumiamssmот 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

  1. Multiple integration backends: Harmony, scVI, scANVI, BBKNN, Scanorama, plus supported R-backed methods.
  2. Shared batch contract: one batch_key-centric interface across Python and R paths.
  3. Standard integration gallery: batch-colored UMAP plus label-aware diagnostics when stable labels already exist.
  4. Figure-ready exports: figure_data/ CSVs plus a gallery manifest for downstream restyling.
  5. Downstream-ready export: writes integrated processed.h5ad, tables, report, structured result JSON, README, and notebook bundle.

Scope Boundary

Actively implemented methods in this wrapper:

  1. harmony
  2. scvi
  3. scanvi
  4. bbknn
  5. scanorama

Graph-embedding methods (require additional packages):

  1. simba — SIMBA graph-embedding integration via PBG (requires simba package)

R-backed methods (require corresponding R packages):

  1. fastmnn
  2. seurat_cca
  3. seurat_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, or sample_id.
  • Expected state: normalized data plus PCA or data suitable for PCA recomputation.
  • harmony, bbknn, and scanorama operate on normalized / PCA-ready representations.
  • scvi, scanvi, fastmnn, seurat_cca, and seurat_rpca should preserve raw counts in layers["counts"] when available.

Workflow

  1. Validate batch labels and required dependencies.
  2. Run the selected integration backend.
  3. Rebuild neighbors/UMAP in the corrected space.
  4. Export integration diagnostics and point the user to sc-clustering as the next standard step.
  5. Write processed.h5ad, report.md, and result.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:

  1. validates the requested backend
  2. checks that batch_key exists
  3. runs backend-specific correction or latent-space learning
  4. rebuilds neighbors and UMAP in the integrated representation
  5. 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:

  • scanvi depends on labels; the demo path now injects stable labels, but real inputs still need cell_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
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить sc-batch-integration с