spatial-velocity
RNA velocity and cellular dynamics analysis for spatial transcriptomics using scVelo stochastic / deterministic / dynamical models or VELOVI, with…
от mdbabumiamssm★ 36 звёзд на GitHub
Установить spatial-velocity в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
🏎️ Spatial Velocity
You are Spatial Velocity, the OmicsClaw skill for RNA velocity, directional state change, and kinetic / variational temporal ordering in spatial transcriptomics.
This skill follows the newer OmicsClaw unified template:
- method-specific core parameters stay explicit
- Python figures are the canonical standard gallery
figure_data/is the stable bridge for downstream styling- optional R plotting is a separate visualization layer, not a second analysis engine
Why This Exists
- RNA velocity is highly sensitive to preprocessing, graph construction, and
backend choice; hiding those settings behind one generic
--methodis not acceptable. - Spatial users need both embedding-centric and tissue-centric views.
- OmicsClaw needs a stable output contract so future velocity backends can be added without breaking downstream interpretation or custom visualization.
Core Capabilities
- scVelo kinetic backends
stochasticdeterministicdynamical
- Variational posterior backend
velovi
- Standard OmicsClaw gallery
- velocity stream on UMAP / spatial
- phase portraits
- spliced / unspliced proportion diagnostics
- heatmap and PAGA summary panels
- feature maps for speed, confidence, pseudotime, and latent time when available
- Figure-ready exports
figures/manifest.jsonfigure_data/*.csvfigure_data/manifest.json
- Stable tabular outputs
- cell-level metrics
- gene-level kinetic summaries
- cluster-level velocity summaries
- top-cell and top-gene exports
Input Convention
| Input slot | Used by | Notes |
|---|---|---|
adata.layers["spliced"] |
all methods | required |
adata.layers["unspliced"] |
all methods | required |
adata.obsm["spatial"] |
spatial gallery panels | strongly recommended |
adata.obsm["X_umap"] |
embedding gallery panels | optional, but OmicsClaw will best-effort compute UMAP when absent |
adata.obs[cluster_key] |
grouped summaries, PAGA, proportions | defaults to leiden; OmicsClaw can auto-compute it |
After the shared preprocessing stage, OmicsClaw also expects or creates:
adata.layers["Ms"] # moment-smoothed spliced counts
adata.layers["Mu"] # moment-smoothed unspliced counts
Method Contract
All methods share the same first stage:
- filter / normalize
log1p- HVG selection when requested
- PCA
- neighbors
- moments
That means the following are part of the scientific contract, not mere wrapper details:
velocity_min_shared_countsvelocity_n_top_genesvelocity_n_pcsvelocity_n_neighborsvelocity_use_highly_variablevelocity_graph_*
Workflow
- Load the h5ad and verify spliced / unspliced layers exist.
- Resolve
cluster_keyfor grouped exports and gallery summaries. - Run shared preprocessing for the requested velocity contract.
- Run the selected backend with method-specific core parameters only.
- Persist velocity results into stable AnnData slots such as:
obs["velocity_speed"]obs["velocity_confidence"]obs["velocity_pseudotime"]obs["latent_time"]when availableobs["root_cells"]/obs["end_points"]when available
- Build gallery context from stable
obs,obsm, and exported summary tables instead of from transient local variables. - Render the standard Python gallery through
PlotSpec/VisualizationRecipe. - Export
figure_data/for downstream styling without recomputing the science.
Visualization Contract
OmicsClaw treats spatial-velocity visualization as a two-layer system:
Python standard gallery
- the canonical analysis output
- generated during the main run
- built primarily from shared
_lib/vizvelocity primitives:streamphaseproportionsheatmappaga
- plus a small number of skill-specific summary plots
Optional R visualization layer
- reads
figure_data/ - focuses on styling, layout, manuscript composition, and publication polish
- must not rerun scVelo or VELOVI internally
- reads
This means:
- Python figures are the default OmicsClaw narrative users should interpret first.
figure_data/*.csvis the stable handoff for downstream beautification.reproducibility/r_visualization.shis an entrypoint for that optional layer.
CLI Reference
# Default stochastic scVelo run
oc run spatial-velocity \
--input <processed.h5ad> --output <dir>
# Deterministic comparison run
oc run spatial-velocity \
--input <processed.h5ad> \
--method deterministic \
--velocity-min-r2 0.02 \
--velocity-min-likelihood 0.005 \
--output <dir>
# Lightweight dynamical smoke test
oc run spatial-velocity \
--input <processed.h5ad> \
--method dynamical \
--dynamical-n-top-genes 500 \
--dynamical-max-iter 5 \
--dynamical-n-jobs 4 \
--output <dir>
# VELOVI
oc run spatial-
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл spatial-velocity?
RNA velocity and cellular dynamics analysis for spatial transcriptomics using scVelo stochastic / deterministic / dynamical models or VELOVI, with method-aware preprocessing, graph, training controls, and a standardized OmicsClaw gallery + figure_data output contract.
Как установить скилл spatial-velocity?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл spatial-velocity запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate 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…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…