spatial-register
БесплатноБез исполняемых скриптовНе проверенSpatial registration and multi-slice alignment for spatial transcriptomics data using PASTE or STalign, with method-specific parameter hints, standardized…
от 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
- PASTE registration: optimal-transport alignment using expression dissimilarity plus spatial distance.
- STalign registration: pairwise diffeomorphic alignment through LDDMM.
- Explicit slice handling: the wrapper can auto-detect common slice columns or accept
--slice-key. - Expression-aware alignment: PASTE always uses expression; STalign can optionally use a wrapper-generated expression signal.
- Aligned coordinate export: aligned coordinates are written to
adata.obsm["spatial_aligned"]. - Shift diagnostics: OmicsClaw annotates per-observation coordinate displacement as
adata.obs["registration_shift_distance"]. - Standard Python gallery: emits a recipe-driven registration gallery with before/after slice overlays, shift diagnostics, and per-slice summaries.
- Figure-ready exports: writes
figure_data/CSVs plus a manifest so downstream tools can restyle the same registration result without recomputing PASTE or STalign. - 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
- Load: read the multi-slice AnnData.
- Validate: confirm spatial coordinates and a real slice-label column exist.
- Run the selected backend.
- Store aligned coordinates: write
adata.obsm["spatial_aligned"]. - Annotate shift metrics: compute
registration_shift_distanceand mark the reference slice inadata.obs. - Render the standard gallery: build the OmicsClaw registration gallery with before/after slice maps, shift diagnostics, and uncertainty panels.
- Export figure-ready data: write
figure_data/*.csvandfigure_data/manifest.json. - 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:
- Python standard gallery: the canonical registration result layer.
- 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 registrationdiagnostic: shift magnitude projected onto the aligned coordinate framesupporting: per-slice shift summary and method-reported disparity plotsuncertainty: 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
Установить 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), без исполняемых скриптов.
Похожие скиллы
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