omicverse-single-cell-trajectory-inference

Installation
SKILL.md

OmicVerse Single-Cell Trajectory Inference

Goal

Run the reusable trajectory-analysis part of the OmicVerse notebook on a cluster-ready AnnData: choose a TrajInfer method branch, set origin and optional terminal states, compute pseudotime or fate outputs, and optionally summarize the trajectory with PAGA. Keep raw QC and preprocessing outside this skill; hand off to the preprocessing skill first when the object is not already graph-ready.

Quick Workflow

  1. Inspect the input AnnData and confirm it already has a usable representation, plotting basis, and cluster labels.
  2. Choose the trajectory branch up front: method='diffusion_map', method='slingshot', or method='palantir'.
  3. Instantiate ov.single.TrajInfer(...) with explicit basis, use_rep, n_comps, n_neighbors, and groupby.
  4. Call set_origin_cells(...) before every trajectory run; call set_terminal_cells(...) when the branch supports or benefits from constrained terminal states.
  5. Run TrajInfer.inference(...).
  6. For lineage topology, use the unified ov.pl.trajectory(...) / ov.pl.trajectory_overlay(...) plotters — they consume the trajectory state written into adata and share the same visual grammar across diffusion_map / slingshot / palantir / monocle / sctour / CellRank. ov.utils.cal_paga(...) + ov.utils.plot_paga(...) remain valid for explicit PAGA computation.
  7. Summarize the branch structure with ov.pl.branch_streamplot(adata, group_key=..., pseudotime_key=...) — river-style plot driven only by a pseudotime vector and cluster labels, interoperable across methods.
  8. Fit marker trends with the shared GAM stack: ov.single.dynamic_features(adata, genes=..., pseudotime=...)ov.pl.dynamic_trends(res, ...) for per-gene curves and ov.pl.dynamic_heatmap(adata, var_names=..., pseudotime=...) for many-gene panels. The same backend is used by every trajectory skill, so output is interoperable.
  9. If you chose palantir, optionally run palantir_cal_branch(...) and then palantir_cal_gene_trends(...) only when the extra dependencies and expression layer are available.
  10. Validate the expected obs, obsm, varm, and uns keys before treating the result as finished.
Installs
2
GitHub Stars
13
First Seen
Jun 29, 2026
omicverse-single-cell-trajectory-inference — omicverse/omicverse-skills