bulkrna-batch-correcti…
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when ordering cells along a developmental trajectory in a normalised scRNA AnnData via
$ npx -y skills add tiangzlab/omicsclaw --skill sc-pseudotime --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sc-pseudotimeContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when ordering cells along a developmental trajectory in a normalised scRNA AnnData via
name: sc-pseudotime description: 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); RNA velocity vector fields (use sc-velocity). trigger: pseudotime, trajectory, lineage, diffusion pseudotime, palantir, via, cellrank, monocle3, slingshot tags: - singlecell - scrna - pseudotime - trajectory - dpt - palantir - via - cellrank - slingshot - monocle3
trajectory = load_skill("sc-pseudotime")
result = trajectory.pseudotime(read_input("clustered.h5ad"), cluster_key="leiden",
use_rep="X_pca", root_cluster="0")
write_output(trajectory.pseudotime_table(result), "tables/pseudotime.csv")
write_output(trajectory.trajectory_genes(result), "tables/trajectory_genes.csv")
write_output(trajectory.pseudotime_figure(result), "figures/pseudotime.png")
write_output(result, "intermediate/adata_pseudotime.h5ad")The input is not changed. The PBMC example in `examples/example_step.py` demonstrates the API; PBMC labels do not validate a differentiation trajectory.
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
Return a copy with pseudotime and backend diagnostics.
The default representation prefers X_pca; UMAP remains the preferred display embedding, not the default inference graph. This function does not disable numba JIT. Roots express an analysis assumption, not a direction inferred from the pseudotime values.
:param method: dpt, palantir, via, cellrank, slingshot_r or monocle3_r. :param cluster_key: Existing obs grouping column; default leiden. :param use_rep: Existing obsm representation; None prefers X_pca. :param root_cluster: Optional root group for the selected backend. :param root_cell: Optional obs name or integer position. :param end_clusters: Optional Slingshot terminal groups. :param n_neighbors: DPT/CellRank neighbors; default 15. :param n_pcs: PCs for those neighbors; default 50. :param n_dcs: Diffusion components used for DPT; default 10. :param palantir_knn: Palantir neighbors, default 30. :param palantir_n_components: Palantir diffusion components, default 10. :param palantir_num_waypoints: Palantir waypoints, default 1200. :param palantir_max_iterations: Palantir iterations, default 25. :param palantir_seed: Overrides random_state for Palantir; default None. :param via_knn: VIA neighbors, default 30. :param via_seed: Overrides random_state for VIA; default None. :param cellrank_n_states: CellRank states, default 3. :param cellrank_schur_components: CellRank Schur components, default 20. :param cellrank_frac_to_keep: CellRank state-cell fraction, default 0.3. :param cellrank_use_velocity: Couple CellRank to existing velocity; default False. :param random_state: Palantir/VIA seed, default 20. DPT retains Scanpy's deterministic defaults; R wrappers do not expose a seed. :returns: New AnnData with obs['pseudotime']; run_info names the backend and original pseudotime column. R curves remain available separately. :raises ValueError: The method, grouping, expression contract or embedding is invalid. :raises ImportError: An optional backend is missing.
Read method, root and representation diagnostics; keep=False removes the record.
Rank genes by correlation with pseudotime; method is pearson or spearman.
Return cell, display coordinates, group and pseudotime columns.
Return backend fate probabilities averaged by group, or an empty table.
Return retained R trajectory curves, or an empty table for Python methods.
Return a matplotlib Figure colored by pseudotime on the display embedding.
<!-- api:end -->
Six methods remain available: DPT, Palantir, VIA, CellRank, Slingshot R and Monocle3 R. DPT uses Scanpy. Other methods require their named backend; missing packages raise errors rather than selecting a different method.
`use_rep=None` now prefers X_pca, consistent with preflight. UMAP is still preferred for display, not the inference graph. Root cells accept obs names or integer positions. Root and terminal choices are biological assumptions the caller must justify.
Neighbor/component defaults retain the CLI behavior: 15 neighbors, 50 PCs and 10 DPT components. Palantir defaults to 30 neighbors, 10 diffusion components, 1200 waypoints and 25 iterations; VIA uses 30 neighbors. `random_state=20` supplies the Palantir/VIA seed unless their explicit overrides are given. DPT retains Scanpy's deterministic defaults.
its existing setting (`sc_pseudotime.py:15`).
`obs["pseudotime"]` values; disconnected graphs can produce infinity (`_api.py:183`).
does not prove direction or causality (`_api.py:28`).
Conversational & memory-enabled AI research partner for multi-omics analysis. CLI + Desktop App (installers in Releases). From biological idea to full research paper.
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when discovering bulk gene co-expression modules and hub genes with R WGCNA. Skip direct expression contrasts (use…
Load when comparing gene expression between two conditions in bulk RNA-seq count data. Skip
Load when estimating cell-type proportions in bulk RNA-seq samples from a single-cell or
Load when running pathway / GO term enrichment on a bulk RNA-seq DE result list. Skip when
Load when converting Ensembl, Entrez or symbol IDs in a bulk RNA count matrix using an explicit mapping or a small human demo…