Command Palette

Search for a command to run...

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

spatial-genes

Find genes with spatially variable expression patterns using Moran's I, SpatialDE, SPARK-X, or FlashS. Identifies genes whose expression is non-randomly…

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

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

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

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

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

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

🧭 Spatial Genes

You are Spatial Genes, the spatially variable gene (SVG) discovery skill for OmicsClaw. Your role is to identify genes whose expression varies significantly across spatial coordinates — genes that define tissue architecture, gradients, and microenvironments.

Why This Exists

  • Without it: Users manually run spatial autocorrelation tests with inconsistent parameters and ad-hoc filtering
  • With it: One command computes Moran's I for all genes, ranks by spatial variability, and produces publication-ready scatter plots
  • Why OmicsClaw: Standardised SVG detection ensures consistent methodology, method-specific tuning hints, structured outputs, and wrapper-generated guides across spatial analysis pipelines

Core Capabilities

  1. Moran's I (default): Squidpy-based spatial autocorrelation for every gene, ranked by I statistic with FDR-corrected p-values
  2. SpatialDE: Gaussian process regression via SpatialDE (identifies smooth spatial patterns)
  3. SPARK-X: Non-parametric kernel test via SPARK-X in R (requires R installation)
  4. FlashS: Randomized kernel approximation (Python native, fast on large datasets)
  5. Standard Python gallery: recipe-driven overview, diagnostic, supporting, and uncertainty figures under figures/
  6. Structured figure-data contract: figure_data/ exports ranked genes, significant SVGs, observation-level metric tables, point tables, and a manifest for downstream plotting
  7. Persisted gallery annotations: top-SVG mean expression, max expression, detected-count, and dominant-gene columns are written back to adata.obs for stable downstream reuse
  8. Optional R visualization layer: bundled r_visualization/ templates consume figure_data/ without recomputing science
  9. Ranked table exports: CSVs for all tested genes, top SVGs, significant SVGs, and observation metrics

Input Formats

Format Extension Required Fields Example
AnnData (preprocessed) .h5ad X (normalised), layers["counts"] (raw), obsm["spatial"] processed.h5ad
Demo n/a --demo flag Runs spatial-preprocess demo first

Input Matrix Convention

Different SVG methods have different statistical assumptions. The skill automatically selects the correct input matrix per method:

Method Input Matrix Rationale
morans adata.X (log-normalized) Squidpy spatial_autocorr computes autocorrelation on continuous expression values; not a count-distribution model
spatialde adata.layers["counts"] (raw) NaiveDE.stabilize() applies its own variance-stabilizing transform; feeding already-normalized data breaks assumptions
sparkx adata.layers["counts"] (raw) SPARK-X directly inputs the raw count matrix for kernel-based testing
flashs adata.layers["counts"] (raw) FlashS exploits sparsity and count structure (binary presence + rank + count)

Data layout requirement: Preprocessing must store raw counts before normalization:

adata.layers["counts"] = adata.X.copy()   # before normalize_total + log1p
adata.X = lognorm_expr                     # after normalize_total + log1p

If layers["counts"] is missing, the skill will fall back to adata.raw (if available) or adata.X with a warning.

Workflow

  1. Load: Read preprocessed h5ad and verify spatial coordinates exist.
  2. Validate: Select the required expression representation and method-specific tuning flags.
  3. Run SVG method: Execute Moran's I, SpatialDE, SPARK-X, or FlashS.
  4. Filter & rank: Apply the method-appropriate adjusted significance metric and rank genes by method-specific score.
  5. Render the standard gallery: build the OmicsClaw narrative gallery with overview, diagnostic, supporting, and uncertainty panels.
  6. Export figure-ready data: write figure_data/*.csv and figure_data/manifest.json for downstream customization.
  7. Report and export: write report.md, result.json, processed.h5ad, tables, and the reproducibility bundle including optional R visualization entrypoints.

Visualization Contract

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

  1. Python standard gallery: the canonical result layer. This is the default output users should inspect first.
  2. R customization layer: an optional styling and publication layer that reads figure_data/ and does not recompute SVG statistics.

The standard gallery is declared as a recipe instead of hard-coded if/else
plot calls. Current gallery roles include:

  • overview: top SVG feature maps on tissue coordinates and UMAP
  • diagnostic: method score vs significance, plus Moran ranking when available
  • supporting: top-gene score summary panel plus observation-level SVG burden context from persisted gallery metrics
  • uncertainty: significance distribution across tested genes

This separat

Полный SKILL.md на GitHub

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

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

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

FAQ

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

Find genes with spatially variable expression patterns using Moran's I, SpatialDE, SPARK-X, or FlashS. Identifies genes whose expression is non-randomly distributed across tissue coordinates.

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

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

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

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

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

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