Command Palette

Search for a command to run...

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

spatial-register

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

Spatial registration and multi-slice alignment for spatial transcriptomics data using PASTE or STalign, with method-specific parameter hints, standardized…

mdbabumiamssmот mdbabumiamssm★ 36 звёзд на GitHub

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

📐 Spatial Register

You are Spatial Register, the OmicsClaw skill for aligning spatial coordinates across serial sections or related slices. The wrapper now keeps method-specific alignment behavior intact while exposing a shared gallery, figure-ready exports, and optional downstream R styling.

Why This Exists

  • Without it: users have to manually handle slice labels, coordinate systems, and method-specific alignment APIs.
  • With it: one command aligns slices, exports aligned coordinates to spatial_aligned, writes registration diagnostics, and emits a stable visualization / figure-data contract.
  • Why OmicsClaw: method-specific controls are preserved, slice-key handling is explicit, and the output contract is stable across registration methods.

Core Capabilities

  1. PASTE registration: optimal-transport alignment using expression dissimilarity plus spatial distance.
  2. STalign registration: pairwise diffeomorphic alignment through LDDMM.
  3. Explicit slice handling: the wrapper can auto-detect common slice columns or accept --slice-key.
  4. Expression-aware alignment: PASTE always uses expression; STalign can optionally use a wrapper-generated expression signal.
  5. Aligned coordinate export: aligned coordinates are written to adata.obsm["spatial_aligned"].
  6. Shift diagnostics: OmicsClaw annotates per-observation coordinate displacement as adata.obs["registration_shift_distance"].
  7. Standard Python gallery: emits a recipe-driven registration gallery with before/after slice overlays, shift diagnostics, and per-slice summaries.
  8. Figure-ready exports: writes figure_data/ CSVs plus a manifest so downstream tools can restyle the same registration result without recomputing PASTE or STalign.
  9. Structured outputs: writes report.md, result.json, tabular metrics, and reproducibility helpers including an optional R visualization entrypoint.

Input Formats

Format Extension Required Fields Example
AnnData (multi-slice) .h5ad X, obsm["spatial"] or obsm["X_spatial"], real slice labels in obs[...] serial_sections.h5ad
Demo n/a --demo flag runs spatial-preprocess --demo, then synthesizes two shifted slices

Method-Specific Input Requirements

Method Input requirements Notes
paste expression matrix, spatial coordinates, slice labels, shared genes current wrapper aligns all non-reference slices to a chosen reference
stalign exactly 2 slices, spatial coordinates, optional expression-derived signal current wrapper rasterizes coordinates into images and calls STalign LDDMM

Important:

  • PASTE is not a coordinates-only method; expression matters.
  • STalign in the current wrapper requires exactly two slices.
  • OmicsClaw does not fabricate synthetic slice labels for real input data; a real slice column is required.

Workflow

  1. Load: read the multi-slice AnnData.
  2. Validate: confirm spatial coordinates and a real slice-label column exist.
  3. Run the selected backend.
  4. Store aligned coordinates: write adata.obsm["spatial_aligned"].
  5. Annotate shift metrics: compute registration_shift_distance and mark the reference slice in adata.obs.
  6. Render the standard gallery: build the OmicsClaw registration gallery with before/after slice maps, shift diagnostics, and uncertainty panels.
  7. Export figure-ready data: write figure_data/*.csv and figure_data/manifest.json.
  8. Report and export: write summary tables, report.md, result.json, processed.h5ad, and reproducibility outputs.

Visualization Contract

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

  1. Python standard gallery: the canonical registration result layer.
  2. R customization layer: an optional styling layer that reads figure_data/ and does not rerun PASTE or STalign.

The standard gallery is declared as a recipe instead of hard-coded plotting branches. It reuses the shared skills/spatial/_lib/viz feature-map layer for slice overlays and shift projections, while skill-local renderers handle registration-specific summaries such as per-slice displacement bars and shift distance distributions.

Current gallery roles include:

  • overview: slice labels before and after registration
  • diagnostic: shift magnitude projected onto the aligned coordinate frame
  • supporting: per-slice shift summary and method-reported disparity plots
  • uncertainty: shift-distance distribution across slices

CLI Reference

# Default alias used by OmicsClaw
oc run spatial-registration \
  --input <multi_slice.h5ad> --output <dir>

# PASTE with explicit reference and alpha
oc run spatial-registration \
  --input <multi_slice.h5ad> --method paste \
  --slice-key slice --reference-slice slice_1 \
  --paste-alpha 0.1 --paste-dissimilarity kl --output <d
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

FAQ

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

Spatial registration and multi-slice alignment for spatial transcriptomics data using PASTE or STalign, with method-specific parameter hints, standardized aligned-coordinate outputs, and a unified registration visualization contract.

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

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

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

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

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

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