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★ 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
- Load AnnData (
--input) or auto-build a demo with the largest cluster as the root. - Validate
cluster_keyexists; requireX = normalized_expression. - Resolve representation (
--use-rep) — auto-pick fromobsmif unset. - Resolve root cell from
--root-clusteror--root-cell(integer index orobs_name). - Dispatch to the method-specific runner; the R-backed methods exec via
RScriptRunneragainst the bundled R scripts. - Build trajectory-gene correlations (
--n-genes,--corr-method). - Save
processed.h5ad, tables, figures,report.md,result.json(incl.backend,n_clusters,n_trajectory_genes).
Gotchas
- Hard-fails when
.Xisn't normalised.sc_pseudotime.py:1122raisesValueError("sc-pseudotimeexpects normalized expression. Runsc-preprocessingfirst.")based on the matrix-contract metadata. If you skippedsc-preprocessing, the contract check rejects the run before any pseudotime work happens. - No suitable representation → hard fail.
sc_pseudotime.py:283raisesValueError("Embeddingwas not found in adata.obsm.")for an explicit-but-missing--use-rep;:287raisesValueError("No suitable representation was found. Runsc-preprocessingorsc-batch-integrationfirst.")when no embedding key resolves. cluster_keyvalidated twice.sc_pseudotime.py:1118raisesValueError("was not found in adata.obs.")for the top-level--cluster-key. Default isleiden; pass--cluster-key louvain(or whatever you have) explicitly.--root-cellaccepts obs_name OR integer index.sc_pseudotime.py:308raisesValueError("--root-cellwas 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:746raisesImportError("Slingshot R dependencies are missing: <list>")(slingshot / SingleCellExperiment / zellkonverter);:824raises the same shape for Monocle3 (monocle3 / SingleCellExperiment / zellkonverter). Both messages append the fullsuggest_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--methodwas an alias or fell through any future fallback.--inputisparser.error, not a PythonValueError.sc_pseudotime.py:1092callsparser.error("--input is required unless --demo is used")which exits with code 2 — caller wrappers expectingSystemExit(1)orValueErrorneed to handle code 2 separately. Once--inputis given,:1095raisesFileNotFoundError(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
Установить 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), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic