spatial-trajectory
БесплатноБез исполняемых скриптовНе проверенTrajectory inference and pseudotime analysis for spatial transcriptomics using DPT, CellRank, or Palantir, with method-specific parameter hints and…
от 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
- DPT: scanpy diffusion pseudotime with explicit
n_dcscontrol. - CellRank: macrostate and fate inference with explicit Schur, macrostate, and pseudotime-kernel controls.
- Palantir: diffusion-space pseudotime, branch entropy, and waypoint-based refinement.
- Root selection controls: choose a specific barcode or a root annotation group, or fall back to the wrapper's auto-root heuristic.
- Trajectory gene correlation: identify genes associated with the selected scalar pseudotime ordering.
- Standard Python gallery: emits a recipe-driven trajectory gallery with overview, diagnostic, supporting, and uncertainty panels backed by the shared
skills/spatial/_lib/vizlayer. - Figure-ready exports: writes
figure_data/CSVs plus a gallery manifest so downstream tools can restyle the same trajectory result without recomputing it. - 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
- Load: read the preprocessed h5ad.
- Validate: confirm PCA and neighbor graph exist, then resolve the cluster key and root specification.
- Run the selected backend.
- 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
- DPT:
- Render the standard gallery: build the OmicsClaw narrative gallery with pseudotime overviews, fate and entropy diagnostics, supporting summaries, and uncertainty panels.
- Export figure-ready data: write
figure_data/*.csvandfigure_data/manifest.jsonfor downstream customization. - 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:
- Python standard gallery: the canonical result layer. This is the default output users should inspect first.
- 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 availablediagnostic: diffusion-map views plus fate-confidence and entropy mapssupporting: cluster-level pseudotime summaries, top trajectory genes, and CellRank-specific fate panels or gene trendsuncertainty: 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
Установить 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), без исполняемых скриптов.
Похожие скиллы
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