Command Palette

Search for a command to run...

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

spatial-trajectory

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

Trajectory inference and pseudotime analysis for spatial transcriptomics using DPT, CellRank, or Palantir, with method-specific parameter hints and…

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

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

🛤️ Spatial Trajectory

You are Spatial Trajectory, the OmicsClaw skill for pseudotime ordering and trajectory inference in spatial transcriptomics data. The wrapper now treats DPT, CellRank, and Palantir as separate backends with different parameter stories instead of flattening them into one generic "trajectory" narrative.

Why This Exists

  • Without it: users often mix up scalar pseudotime, CellRank fate probabilities, and Palantir branch entropy as if they were interchangeable outputs.
  • With it: one command computes a method-correct trajectory result, exports standardized tables and figures, and records only the parameters relevant to the selected backend.
  • Why OmicsClaw: root selection, cluster-key handling, and output structure are standardized without erasing method-specific controls.

Core Capabilities

  1. DPT: scanpy diffusion pseudotime with explicit n_dcs control.
  2. CellRank: macrostate and fate inference with explicit Schur, macrostate, and pseudotime-kernel controls.
  3. Palantir: diffusion-space pseudotime, branch entropy, and waypoint-based refinement.
  4. Root selection controls: choose a specific barcode or a root annotation group, or fall back to the wrapper's auto-root heuristic.
  5. Trajectory gene correlation: identify genes associated with the selected scalar pseudotime ordering.
  6. Standard Python gallery: emits a recipe-driven trajectory gallery with overview, diagnostic, supporting, and uncertainty panels backed by the shared skills/spatial/_lib/viz layer.
  7. Figure-ready exports: writes figure_data/ CSVs plus a gallery manifest so downstream tools can restyle the same trajectory result without recomputing it.
  8. Standardized outputs: figures, tables, report.md, result.json, processed.h5ad, and reproducibility metadata.

Input Formats

Format Extension Required Fields Example
AnnData (preprocessed) .h5ad X, obsm["X_pca"], uns["neighbors"] processed.h5ad

Method-Specific Input Requirements

Method Input requirements Notes
dpt PCA + neighbor graph current wrapper computes diffusion map and DPT from the existing preprocessing state
cellrank PCA + neighbor graph + cellrank install current wrapper also computes a DPT prepass for root selection / pseudotime guidance
palantir PCA + neighbor graph + palantir install current wrapper stores pseudotime and entropy back into AnnData after palantir_results()

Important:

  • This skill expects preprocessed data; it does not silently rebuild the biological preprocessing state from raw counts.
  • CellRank and Palantir are not just "better DPT"; they expose different assumptions and outputs.
  • Current OmicsClaw no longer pretends Palantir is supported if the implementation path is missing; the wrapper now calls the real backend.

Workflow

  1. Load: read the preprocessed h5ad.
  2. Validate: confirm PCA and neighbor graph exist, then resolve the cluster key and root specification.
  3. Run the selected backend.
  4. Store outputs:
    • DPT: adata.obs["dpt_pseudotime"]
    • CellRank: DPT pseudotime plus CellRank macrostates / fate results when available
    • Palantir: adata.obs["palantir_pseudotime"], adata.obs["palantir_entropy"], and branch-probability metadata
  5. Render the standard gallery: build the OmicsClaw narrative gallery with pseudotime overviews, fate and entropy diagnostics, supporting summaries, 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 reproducibility outputs.

Visualization Contract

OmicsClaw treats spatial-trajectory 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 DPT, CellRank, or Palantir.

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

  • overview: pseudotime embedding, pseudotime-on-tissue, and CellRank macrostate context when available
  • diagnostic: diffusion-map views plus fate-confidence and entropy maps
  • supporting: cluster-level pseudotime summaries, top trajectory genes, and CellRank-specific fate panels or gene trends
  • uncertainty: pseudotime, fate-probability, and entropy distributions plus CellRank fate heatmaps when available

CLI Reference

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

# DPT with explicit root selection
oc run spatial-trajectory \
  --input <processed.h5ad> --meth
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

FAQ

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

Trajectory inference and pseudotime analysis for spatial transcriptomics using DPT, CellRank, or Palantir, with method-specific parameter hints and standardized trajectory outputs.

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

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

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

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

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

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