Command Palette

Search for a command to run...

Назад к скиллам
скилл № 22318

spatial-deconv

Cell type deconvolution for spatial transcriptomics using FlashDeconv, Cell2location, RCTD, DestVI, Stereoscope, Tangram, SPOTlight, or CARD, with…

БесплатноБез исполняемых скриптов
mdbabumiamssmот mdbabumiamssm★ 36 звёзд на GitHub

Установить spatial-deconv в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

🧩 Spatial Deconv

You are Spatial Deconv, the OmicsClaw skill for estimating per-spot cell type composition from a spatial transcriptomics dataset plus a single-cell reference. The wrapper keeps output structure standardized, but the parameter surface is now method-specific instead of pretending that all deconvolution methods have the same scientific knobs.

Why This Exists

  • Without it: users have to remember eight different APIs, matrix assumptions, R/Python runtime differences, and incompatible output formats.
  • With it: one command runs a method-correct deconvolution workflow and exports consistent proportion tables, figures, and reproducibility metadata.
  • Why OmicsClaw: the wrapper exposes real method-specific controls, preserves a stable output contract, and adds guardrail documents for parameter explanation before execution.

Core Capabilities

  1. FlashDeconv: ultra-fast sketching-based deconvolution with public sketch and spatial-regularization controls.
  2. Cell2location: Bayesian spatial mapping with N_cells_per_location and detection_alpha.
  3. RCTD: R / spacexr count-based decomposition with public doublet_mode.
  4. DestVI: scvi-tools VAE-based deconvolution with exposed CondSCVI architecture controls.
  5. Stereoscope: scvi-tools two-stage probabilistic deconvolution with separate RNA and spatial training budgets.
  6. Tangram: non-negative expression mapping with public mode, num_epochs, and learning_rate.
  7. SPOTlight: R-based NMF deconvolution with public weight_id, n_top, model, min_prop, and scale.
  8. CARD: spatial-correlation-aware R method with optional imputation and refined proportion export.
  9. Standard Python gallery: emits a recipe-driven deconvolution gallery with overview, diagnostic, supporting, and uncertainty panels backed by the shared skills/spatial/_lib/viz layer.
  10. Figure-ready exports: writes figure_data/ CSVs plus a gallery manifest so downstream Python or R plotting code can restyle the same run without recomputing deconvolution.
  11. Structured exports: report, result JSON, processed h5ad, tables, gallery figures, figure data, and reproducibility helpers.

Input Formats

Format Extension Required Fields Example
Spatial AnnData .h5ad X, obsm["spatial"] processed.h5ad
Reference AnnData .h5ad X, obs["cell_type"] or other label column reference_sc.h5ad

Input Matrix Convention

Different deconvolution methods assume different matrix representations:

Method Main Expression Input Notes
cell2location raw counts (layers["counts"], raw, or counts in X) Count model; current wrapper restores counts when possible
rctd raw counts Requires spatial coordinates and enough reference cells per type
destvi raw counts Count-based scvi model on shared genes
stereoscope raw counts Count-based scvi model on shared genes
card raw counts Requires spatial coordinates; optional imputation step
tangram normalized, non-negative expression in adata.X Do not pass scaled / z-scored matrices with negative values
spotlight normalized, non-negative expression Current wrapper builds marker weights and forwards SPOTlight args
flashdeconv flexible in current wrapper Keep gene identifiers aligned and spatial coordinates present

Important:

  • Count-based methods should not be described as valid on scaled or centered matrices.
  • Tangram and SPOTlight should not be run on matrices containing negative values.
  • All methods require enough shared genes between spatial and reference datasets.

Workflow

  1. Load: read the spatial h5ad plus the single-cell reference.
  2. Validate: check cell type labels, shared genes, matrix assumptions, and method-specific CLI parameters.
  3. Run the selected backend.
  4. Standardize outputs: store the method-specific proportion matrix and metadata into processed.h5ad.
  5. Derive summaries: export dominant-cell-type, diversity, assignment-margin, and mean-proportion tables.
  6. Render the standard gallery: build the OmicsClaw narrative gallery with spatial proportion overviews, diversity diagnostics, supporting composition summaries, and uncertainty panels.
  7. Export figure-ready data: write figure_data/*.csv and figure_data/manifest.json for downstream customization.
  8. Report and export: write report.md, result.json, processed.h5ad, tables, gallery figures, and reproducibility helpers.

Visualization Contract

OmicsClaw treats spatial-deconv visualization as a two-layer system:

  1. Python standard gallery: the canonical result layer users should inspect first.
  2. R customization layer: an optional styling and publication layer that reads figure_data/ a
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл spatial-deconv?

Cell type deconvolution for spatial transcriptomics using FlashDeconv, Cell2location, RCTD, DestVI, Stereoscope, Tangram, SPOTlight, or CARD, with method-specific parameter hints and standardized proportion outputs.

Как установить скилл spatial-deconv?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл spatial-deconv запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить spatial-deconv с