Command Palette

Search for a command to run...

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

sc-pseudotime

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

Load when ordering cells along a developmental trajectory in a normalised scRNA AnnData via DPT, Palantir, VIA, CellRank, Slingshot (R), or Monocle3 (R). Skip…

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

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

sc-pseudotime

When to use

The user has a clustered, normalised scRNA AnnData and wants a trajectory / pseudotime ordering across the cells. Six methods:

  • dpt (default) — diffusion pseudotime (Scanpy native).
  • palantir — Palantir waypoint-based pseudotime + fate probabilities.
  • via — VIA, scalable lineage with branching.
  • cellrank — CellRank macrostates + fate probabilities (optionally velocity-coupled with --cellrank-use-velocity).
  • slingshot_r — R-backed Slingshot lineage curves.
  • monocle3_r — R-backed Monocle3 trajectory graph.

Required: a normalised AnnData with a cluster column (leiden by default) and a low-D representation (obsm["X_pca"] / X_harmony / etc.). For per-cluster marker ranking use sc-markers; for velocity vector fields (kinetics, not ordering) use sc-velocity.

Inputs & Outputs

Input Format Required
Normalised clustered AnnData .h5ad with cluster column + low-D rep in obsm yes (unless --demo)
Root anchor --root-cluster or --root-cell (recommended for dpt / palantir / cellrank) conditional
Output Path Notes
Annotated AnnData processed.h5ad adds obs["pseudotime"], optional obsm["trajectory_fate_probabilities"] (palantir / via / cellrank)
Per-cell pseudotime tables/pseudotime_cells.csv always
Trajectory genes tables/trajectory_genes.csv top---n-genes correlated with pseudotime
Run summary tables/trajectory_summary.csv always
Fate probabilities tables/fate_probabilities.csv palantir / via / cellrank
Slingshot curves tables/slingshot_curves.csv slingshot_r
Monocle3 trajectory monocle3_trajectory.csv monocle3_r
Figures figures/pseudotime_embedding.png, figures/pseudotime_distribution_by_group.png always
Report report.md + result.json always

Flow

  1. Load AnnData (--input) or auto-build a demo with the largest cluster as the root.
  2. Validate cluster_key exists; require X = normalized_expression.
  3. Resolve representation (--use-rep) — auto-pick from obsm if unset.
  4. Resolve root cell from --root-cluster or --root-cell (integer index or obs_name).
  5. Dispatch to the method-specific runner; the R-backed methods exec via RScriptRunner against the bundled R scripts.
  6. Build trajectory-gene correlations (--n-genes, --corr-method).
  7. Save processed.h5ad, tables, figures, report.md, result.json (incl. backend, n_clusters, n_trajectory_genes).

Gotchas

  • Hard-fails when .X isn't normalised. sc_pseudotime.py:1122 raises ValueError("sc-pseudotimeexpects normalized expression. Runsc-preprocessing first.") based on the matrix-contract metadata. If you skipped sc-preprocessing, the contract check rejects the run before any pseudotime work happens.
  • No suitable representation → hard fail. sc_pseudotime.py:283 raises ValueError("Embedding was not found in adata.obsm.") for an explicit-but-missing --use-rep; :287 raises ValueError("No suitable representation was found. Run sc-preprocessingorsc-batch-integration first.") when no embedding key resolves.
  • cluster_key validated twice. sc_pseudotime.py:1118 raises ValueError(" was not found in adata.obs.") for the top-level --cluster-key. Default is leiden; pass --cluster-key louvain (or whatever you have) explicitly.
  • --root-cell accepts obs_name OR integer index. sc_pseudotime.py:308 raises ValueError("--root-cell was not found. Provide a valid obs_name or integer cell index.") if neither resolves. The integer path lets you avoid copy-pasting a long barcode.
  • R-backed methods need a working R env. sc_pseudotime.py:746 raises ImportError("Slingshot R dependencies are missing: <list>") (slingshot / SingleCellExperiment / zellkonverter); :824 raises the same shape for Monocle3 (monocle3 / SingleCellExperiment / zellkonverter). Both messages append the full suggest_r_install(...) install hint.
  • result.json["backend"] records the actually-used backend. sc_pseudotime.py:604 (dpt) / :646 (palantir) / :681 (via) / :721 (cellrank) / :800 (slingshot_r) / :890 (monocle3_r) write the literal backend label. Useful when --method was an alias or fell through any future fallback.
  • --input is parser.error, not a Python ValueError. sc_pseudotime.py:1092 calls parser.error("--input is required unless --demo is used") which exits with code 2 — caller wrappers expecting SystemExit(1) or ValueError need to handle code 2 separately. Once --input is given, :1095 raises FileNotFoundError(f"Input file not found: {input_path}") for a bad path.

Key CLI

# Demo (auto-chooses largest cluster as root)
python omicsclaw.py run sc-pseudotime --demo --output /tmp/sc_pt_demo

# DPT with explicit root cluster
python omicsclaw.py run sc-pseudotime \
  --input clustered.h5ad --output r
Полный SKILL.md на GitHub

Установить sc-pseudotime в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл sc-pseudotime?

Load when ordering cells along a developmental trajectory in a normalised scRNA AnnData via DPT, Palantir, VIA, CellRank, Slingshot (R), or Monocle3 (R). Skip when ranking marker genes per cluster (use sc-markers) or for RNA velocity vector fields (use sc-velocity).

Как установить скилл sc-pseudotime?

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

Скилл sc-pseudotime запускает скрипты?

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

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

Сравнить sc-pseudotime с