Command Palette

Search for a command to run...

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

spatial-velocity

RNA velocity and cellular dynamics analysis for spatial transcriptomics using scVelo stochastic / deterministic / dynamical models or VELOVI, with…

БесплатноБез исполняемых скриптов
mdbabumiamssmот 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 --method is 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

  1. scVelo kinetic backends
    • stochastic
    • deterministic
    • dynamical
  2. Variational posterior backend
    • velovi
  3. 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
  4. Figure-ready exports
    • figures/manifest.json
    • figure_data/*.csv
    • figure_data/manifest.json
  5. 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:

  1. filter / normalize
  2. log1p
  3. HVG selection when requested
  4. PCA
  5. neighbors
  6. moments

That means the following are part of the scientific contract, not mere wrapper details:

  • velocity_min_shared_counts
  • velocity_n_top_genes
  • velocity_n_pcs
  • velocity_n_neighbors
  • velocity_use_highly_variable
  • velocity_graph_*

Workflow

  1. Load the h5ad and verify spliced / unspliced layers exist.
  2. Resolve cluster_key for grouped exports and gallery summaries.
  3. Run shared preprocessing for the requested velocity contract.
  4. Run the selected backend with method-specific core parameters only.
  5. Persist velocity results into stable AnnData slots such as:
    • obs["velocity_speed"]
    • obs["velocity_confidence"]
    • obs["velocity_pseudotime"]
    • obs["latent_time"] when available
    • obs["root_cells"] / obs["end_points"] when available
  6. Build gallery context from stable obs, obsm, and exported summary tables instead of from transient local variables.
  7. Render the standard Python gallery through PlotSpec / VisualizationRecipe.
  8. Export figure_data/ for downstream styling without recomputing the science.

Visualization Contract

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

  1. Python standard gallery

    • the canonical analysis output
    • generated during the main run
    • built primarily from shared _lib/viz velocity primitives:
      • stream
      • phase
      • proportions
      • heatmap
      • paga
    • plus a small number of skill-specific summary plots
  2. Optional R visualization layer

    • reads figure_data/
    • focuses on styling, layout, manuscript composition, and publication polish
    • must not rerun scVelo or VELOVI internally

This means:

  • Python figures are the default OmicsClaw narrative users should interpret first.
  • figure_data/*.csv is the stable handoff for downstream beautification.
  • reproducibility/r_visualization.sh is 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-
Полный SKILL.md на GitHub

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

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

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

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), без исполняемых скриптов.

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

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