[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-aws-labs-trajectory-analysis":3,"mdc--3459vw-key":49,"related-org-aws-labs-trajectory-analysis":2928,"related-repo-aws-labs-trajectory-analysis":3108},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":44,"sourceUrl":47,"mdContent":48},"trajectory-analysis","perform single-cell trajectory inference analysis","Single-cell trajectory inference pipeline covering diffusion pseudotime (DPT), PAGA, RNA velocity with scVelo, and fate mapping with CellRank. Use when the user mentions pseudotime, trajectory, lineage, differentiation, RNA velocity, scVelo, CellRank, PAGA, diffusion map, fate probabilities, terminal states, spliced\u002Funspliced, velocyto, order cells by development, cell differentiation path, cell fate, branching analysis, monocle, developmental trajectory, stem cell differentiation, progenitor to mature, how do cells differentiate, cell lineage tree, velocity arrows, fate mapping, transition probabilities, root cells, terminal states, absorption probabilities, or latent time.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"aws-labs","AWS Labs","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Faws-labs.png","awslabs",[13,17,20,23],{"name":14,"slug":15,"type":16},"Data Analysis","data-analysis","tag",{"name":18,"slug":19,"type":16},"Life Sciences","life-sciences",{"name":21,"slug":22,"type":16},"Bioinformatics","bioinformatics",{"name":24,"slug":25,"type":16},"RNA-seq","rna-seq",4,"https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fhcls-agent-skills","2026-07-12T08:37:55.567476",null,0,[32,33,34,35,36,37,38,39,40,19,41,42,43],"agent-skills","agentcore","ai-agents","amazon-quick-desktop","claims-processing","drug-discovery","genomics","healthcare-ai","kiro","medical-imaging","risk-adjustment","strands-agents",{"repoUrl":27,"stars":26,"forks":30,"topics":45,"description":46},[32,33,34,35,36,37,38,39,40,19,41,42,43],"Agent skills for healthcare and life sciences: genomics, imaging, claims, drug discovery, and more. Works with Amazon Quick, Kiro, Amazon AgentCore, AWS Strands SDK, Claude Code, Codex, and any Agent Skills-compatible platform.","https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fhcls-agent-skills\u002Ftree\u002FHEAD\u002Fskills\u002Ftrajectory-analysis","---\nname: trajectory-analysis\ndescription: Single-cell trajectory inference pipeline covering diffusion pseudotime (DPT), PAGA, RNA velocity with scVelo, and fate mapping with CellRank. Use when the user mentions pseudotime, trajectory, lineage, differentiation, RNA velocity, scVelo, CellRank, PAGA, diffusion map, fate probabilities, terminal states, spliced\u002Funspliced, velocyto, order cells by development, cell differentiation path, cell fate, branching analysis, monocle, developmental trajectory, stem cell differentiation, progenitor to mature, how do cells differentiate, cell lineage tree, velocity arrows, fate mapping, transition probabilities, root cells, terminal states, absorption probabilities, or latent time.\nusage: Invoke when inferring cell trajectories, computing pseudotime, running RNA velocity, or mapping cell fate probabilities.\nversion: 2.0.0\nvalidated_against:\n  date: 2025-01-15\n  packages: {scvelo: \"0.3.2\", cellrank: \"2.0\", scanpy: \"1.10\"}\ntags: [skill, category:pipeline, single-cell, trajectory, pseudotime, rna-velocity, hcls]\n---\n\n# Trajectory Analysis\n\n## Overview\n\nReconstructs continuous cell-state transitions from single-cell RNA-seq. Four layers:\n\n1. **Diffusion pseudotime** (`scanpy.tl.dpt`) — orders cells along a diffusion manifold from a user-specified root.\n2. **PAGA** — coarse-grained cluster connectivity; initializes force-directed layouts.\n3. **RNA velocity** (`scVelo`) — directional flow from unspliced\u002Fspliced mRNA ratios. Note: scVelo is in maintenance mode (no new features); APIs remain stable.\n4. **CellRank v2** — unified kernel API combining velocity, pseudotime, real-time, or CytoTRACE signals into a Markov chain for macrostates, terminal states, and fate probabilities. CytoTRACEKernel enables velocity-free trajectory inference.\n\nInputs assume a preprocessed `AnnData` (normalized, log-transformed, HVGs, neighbors computed). Velocity additionally requires `spliced`\u002F`unspliced` layers from velocyto or STARsolo.\n\n## Usage\n\nDescribe the analysis in natural language:\n\n- \"Compute diffusion pseudotime rooted in the HSC cluster.\"\n- \"Run PAGA on leiden clusters and re-embed with force-directed layout.\"\n- \"Run dynamical scVelo and plot the velocity stream.\"\n- \"Use CellRank with CytoTRACEKernel to find terminal states without velocity data.\"\n- \"Combine VelocityKernel and ConnectivityKernel to compute fate probabilities.\"\n\nThe skill produces a runnable Python script or notebook cell.\n\n## Response Format\n\n1. **Method selection** — state which approach fits the user's data (use decision tree below)\n2. **Prerequisites check** — confirm required layers\u002Fannotations exist\n3. **Working code** — complete, copy-paste-ready script\n4. **Key parameters** — explain non-obvious choices\n5. **Gotchas** — warn about common failure modes specific to the chosen method\n\n## Decision Tree — Choosing a Trajectory Method\n\n```\nHave spliced\u002Funspliced layers?\n├─ YES → RNA velocity (scVelo dynamical) → CellRank VelocityKernel\n│         Best for: steady-state or dynamical kinetics inference\n│\n└─ NO\n    ├─ Have experimental time points?\n    │   └─ YES → CellRank RealTimeKernel\n    │             Best for: time-course experiments (reprogramming, perturbation)\n    │\n    └─ NO time points\n        ├─ Want directionality (root → terminal)?\n        │   ├─ CytoTRACEKernel (uses gene-count gradient as differentiation proxy)\n        │   │   Best for: differentiation without velocity; no extra input needed\n        │   └─ PseudotimeKernel (uses precomputed DPT as direction)\n        │       Best for: when you trust your DPT root choice\n        │\n        └─ Just want cluster connectivity?\n            └─ PAGA (no directionality, shows which clusters connect)\n```\n\n## Core Concepts\n\n### 1. Prerequisites — spliced\u002Funspliced counts\n\nVelocity needs `spliced` and `unspliced` layers. Generate with velocyto or STARsolo:\n\n```bash\n# Option A: velocyto run10x\nvelocyto run10x \\\n    --samtools-threads 8 \\\n    \u002Fpath\u002Fto\u002Fcellranger_outs\u002Fsample_id \\\n    \u002Fpath\u002Fto\u002Fgenes.gtf\n\n# Option B: STARsolo (Velocyto-compatible matrices)\nSTAR --runThreadN 16 \\\n     --genomeDir \u002Fpath\u002Fto\u002Fstar_index \\\n     --readFilesIn R2.fq.gz R1.fq.gz \\\n     --readFilesCommand zcat \\\n     --soloType CB_UMI_Simple \\\n     --soloCBallowlist 3M-february-2018.txt \\\n     --soloFeatures Gene Velocyto \\\n     --soloCBstart 1 --soloCBlen 16 --soloUMIstart 17 --soloUMIlen 12 \\\n     --outSAMtype BAM SortedByCoordinate\n```\n\nMerge the loom with an existing `AnnData`:\n\n```python\nimport scvelo as scv\n\nadata = sc.read_h5ad(\"processed.h5ad\")\nldata = scv.read(\"sample_id.loom\", cache=True)\n# scv.utils.merge inner-joins on barcodes — ensure obs_names match between objects\nadata = scv.utils.merge(adata, ldata)\nassert \"spliced\" in adata.layers and \"unspliced\" in adata.layers\n```\n\n### 2. Diffusion pseudotime (DPT)\n\n```python\nimport numpy as np\nimport scanpy as sc\n\nsc.tl.diffmap(adata)\n\n# Root cell: pick one cell in the known starting population\nroot_cluster = \"HSC\"\nadata.uns[\"iroot\"] = np.flatnonzero(adata.obs[\"celltype\"] == root_cluster)[0]\n\nsc.tl.dpt(adata)  # writes adata.obs['dpt_pseudotime']\nsc.pl.umap(adata, color=[\"celltype\", \"dpt_pseudotime\"])\n```\n\n### 3. PAGA\n\n```python\nsc.tl.paga(adata, groups=\"leiden\")\n\n# threshold controls edge pruning: higher = fewer edges shown\n# Default 0.01 shows almost everything; 0.03-0.1 is typical for clean plots\nsc.pl.paga(adata, threshold=0.03, show=False)\n\n# PAGA-initialized layout for cleaner trajectory visualization\nsc.tl.draw_graph(adata, init_pos=\"paga\")\nsc.pl.draw_graph(adata, color=[\"leiden\", \"dpt_pseudotime\"], legend_loc=\"on data\")\n\n# Gene trends along a chosen path\nsc.pl.paga_path(\n    adata,\n    nodes=[\"HSC\", \"MPP\", \"GMP\", \"Mono\"],\n    keys=[\"Elane\", \"Mpo\", \"Gata1\"],\n)\n```\n\n**PAGA threshold note:** `sc.pl.paga(threshold=...)` only affects visualization (which edges to draw), not the underlying graph. The connectivity weights live in `adata.uns['paga']['connectivities']`. Set `threshold=0` to see all edges, increase to declutter.\n\n### 4. RNA velocity (scVelo)\n\n> **Status:** scVelo is in maintenance mode. APIs are stable but no new features are planned. For new projects without velocity data, consider CellRank's CytoTRACEKernel as a velocity-free alternative.\n\n```python\nimport scvelo as scv\n\nscv.settings.n_jobs = 8\n\n# Preprocessing — operates on spliced\u002Funspliced layers\nscv.pp.filter_and_normalize(adata, min_shared_counts=20, n_top_genes=2000)\nscv.pp.moments(adata, n_pcs=30, n_neighbors=30)\n\n# Dynamical mode (recommended): fits full kinetic model per gene\nscv.tl.recover_dynamics(adata, n_jobs=8)\nscv.tl.velocity(adata, mode=\"dynamical\")\nscv.tl.velocity_graph(adata)\n\nscv.pl.velocity_embedding_stream(adata, basis=\"umap\", color=\"celltype\")\n\n# Latent time (dynamical mode only)\nscv.tl.latent_time(adata)\nscv.pl.scatter(adata, color=\"latent_time\", color_map=\"gnuplot\")\n```\n\n### 5. CellRank v2 — unified kernel API\n\nCellRank v2 provides a unified kernel interface. All kernels:\n- Accept an `AnnData` and call `.compute_transition_matrix()`\n- Can be combined with `+` and `*` (weighted sum)\n- Feed into `cr.estimators.GPCCA` for macrostate decomposition\n\n#### 5a. VelocityKernel (requires scVelo velocity)\n\n```python\nimport cellrank as cr\nfrom cellrank.kernels import VelocityKernel, ConnectivityKernel\n\nvk = VelocityKernel(adata).compute_transition_matrix()\nck = ConnectivityKernel(adata).compute_transition_matrix()\nkernel = 0.8 * vk + 0.2 * ck  # weighted combination\n\ng = cr.estimators.GPCCA(kernel)\ng.compute_schur(n_components=20)\ng.compute_macrostates(n_states=5, cluster_key=\"celltype\")\ng.predict_terminal_states()\ng.compute_fate_probabilities()\ng.plot_fate_probabilities(same_plot=False)\n\n# Lineage driver genes\ndrivers = g.compute_lineage_drivers(lineages=[\"Mono\"], use_raw=False)\n```\n\n#### 5b. CytoTRACEKernel (velocity-free, new in v2)\n\nUses gene-count gradient as a proxy for differentiation potential. No velocity data needed.\n\n```python\nfrom cellrank.kernels import CytoTRACEKernel, ConnectivityKernel\n\nctk = CytoTRACEKernel(adata).compute_transition_matrix()\nck = ConnectivityKernel(adata).compute_transition_matrix()\nkernel = 0.8 * ctk + 0.2 * ck\n\ng = cr.estimators.GPCCA(kernel)\ng.compute_schur(n_components=15)\ng.compute_macrostates(n_states=4, cluster_key=\"celltype\")\ng.predict_terminal_states()\ng.compute_fate_probabilities()\n```\n\n#### 5c. RealTimeKernel (experimental time points)\n\nFor time-course experiments where cells are collected at discrete time points.\n\n```python\nfrom cellrank.kernels import RealTimeKernel\n\n# adata.obs[\"day\"] must contain numeric time labels (e.g., 0, 2, 4, 7)\nrtk = RealTimeKernel(adata, time_key=\"day\").compute_transition_matrix()\n\ng = cr.estimators.GPCCA(rtk)\ng.compute_macrostates(n_states=6, cluster_key=\"celltype\")\ng.predict_terminal_states()\ng.compute_fate_probabilities()\n```\n\n#### 5d. PseudotimeKernel (DPT-directed)\n\nUses precomputed pseudotime to define directionality.\n\n```python\nfrom cellrank.kernels import PseudotimeKernel, ConnectivityKernel\n\n# Requires adata.obs[\"dpt_pseudotime\"] from sc.tl.dpt\npk = PseudotimeKernel(adata, time_key=\"dpt_pseudotime\").compute_transition_matrix()\nck = ConnectivityKernel(adata).compute_transition_matrix()\nkernel = 0.8 * pk + 0.2 * ck\n\ng = cr.estimators.GPCCA(kernel)\ng.compute_macrostates(n_states=4, cluster_key=\"celltype\")\ng.predict_terminal_states()\ng.compute_fate_probabilities()\n```\n\n#### 5e. Kernel combination rules\n\n```python\n# All kernels support arithmetic combination after .compute_transition_matrix()\ncombined = 0.6 * vk + 0.2 * ck + 0.2 * pk  # weights must sum to 1\n\n# Inspect kernel quality\ncombined.plot_projection(basis=\"umap\")  # visualize transition arrows\n```\n\n### 6. Spatial neighbors (squidpy)\n\nFor spatial transcriptomics, replace kNN with a spatial graph:\n\n```python\nimport squidpy as sq\n\nsq.gr.spatial_neighbors(adata, coord_type=\"generic\", n_neighs=6)\n# Feed spatial connectivities into CellRank ConnectivityKernel\n```\n\n## Quick Reference\n\n| Task | Call | Output |\n| --- | --- | --- |\n| Diffusion map | `sc.tl.diffmap(adata)` | `.obsm['X_diffmap']` |\n| Set root | `adata.uns['iroot'] = idx` | — |\n| Pseudotime | `sc.tl.dpt(adata)` | `.obs['dpt_pseudotime']` |\n| PAGA | `sc.tl.paga(adata, groups='leiden')` | `.uns['paga']` |\n| PAGA plot | `sc.pl.paga(adata, threshold=0.03)` | figure (threshold=visual only) |\n| PAGA-init layout | `sc.tl.draw_graph(adata, init_pos='paga')` | `.obsm['X_draw_graph_fa']` |\n| Merge loom | `scv.utils.merge(adata, ldata)` | combined AnnData (inner-join on barcodes) |\n| Velocity preproc | `scv.pp.filter_and_normalize`; `scv.pp.moments` | moment layers |\n| Dynamics fit | `scv.tl.recover_dynamics(adata)` | fit params |\n| Velocity | `scv.tl.velocity(adata, mode='dynamical')` | `.layers['velocity']` |\n| Velocity graph | `scv.tl.velocity_graph(adata)` | `.uns['velocity_graph']` |\n| Stream plot | `scv.pl.velocity_embedding_stream(adata, basis='umap')` | figure |\n| Latent time | `scv.tl.latent_time(adata)` | `.obs['latent_time']` |\n| VelocityKernel | `VelocityKernel(adata).compute_transition_matrix()` | kernel |\n| CytoTRACEKernel | `CytoTRACEKernel(adata).compute_transition_matrix()` | kernel (no velocity needed) |\n| RealTimeKernel | `RealTimeKernel(adata, time_key=\"day\").compute_transition_matrix()` | kernel |\n| PseudotimeKernel | `PseudotimeKernel(adata, time_key=\"dpt_pseudotime\").compute_transition_matrix()` | kernel |\n| Combine kernels | `0.8 * vk + 0.2 * ck` | combined kernel |\n| Estimator | `cr.estimators.GPCCA(kernel)` | estimator |\n| Macrostates | `g.compute_macrostates(n_states=5, cluster_key=\"celltype\")` | `.macrostates` |\n| Terminal states | `g.predict_terminal_states()` | `.terminal_states` |\n| Fate probs | `g.compute_fate_probabilities()` | `.fate_probabilities` |\n| Lineage drivers | `g.compute_lineage_drivers(lineages=[\"Mono\"], use_raw=False)` | DataFrame |\n| Spatial graph | `sq.gr.spatial_neighbors(adata)` | `.obsp['spatial_*']` |\n\n## Common Mistakes\n\n- **Wrong:** Calling `sc.tl.dpt` without setting `adata.uns['iroot']`\n  **Right:** Set the root cell index before computing DPT: `adata.uns['iroot'] = np.flatnonzero(adata.obs['celltype'] == root_cluster)[0]`\n  **Why:** Without a root, pseudotime has no direction and results are meaningless\n\n- **Wrong:** Running scVelo velocity without `spliced`\u002F`unspliced` layers in the AnnData\n  **Right:** Check `adata.layers.keys()` after `scv.utils.merge`; ensure both layers exist with matching barcodes\n  **Why:** Velocity computation requires both layers; missing layers cause errors or silent failures\n\n- **Wrong:** Using `mode='dynamical'` in `scv.tl.velocity` without first running `scv.tl.recover_dynamics`\n  **Right:** Always run `scv.tl.recover_dynamics(adata)` before `scv.tl.velocity(adata, mode='dynamical')`\n  **Why:** The dynamical model needs per-gene rate parameters that are only computed by `recover_dynamics`\n\n- **Wrong:** Computing `scv.tl.latent_time` after running velocity in `stochastic` mode\n  **Right:** Use `mode='dynamical'` for velocity if you need latent time\n  **Why:** Latent time is only defined for the dynamical model; stochastic mode does not produce the required parameters\n\n- **Wrong:** Calling `scv.tl.velocity` without running `scv.pp.moments` first\n  **Right:** Run `scv.pp.moments(adata, n_pcs=30, n_neighbors=30)` before velocity computation\n  **Why:** Moments (`Ms`, `Mu` layers) are required inputs for velocity estimation\n\n- **Wrong:** Running `sc.tl.paga` before computing cluster labels\n  **Right:** Run `sc.tl.leiden` (or equivalent clustering) first; pass the cluster key via `groups=`\n  **Why:** PAGA computes connectivity between existing groups; without clusters it has nothing to connect\n\n- **Wrong:** Thinking the `threshold` parameter in `sc.pl.paga()` affects the underlying graph\n  **Right:** Understand that `threshold` is purely visual — it controls which edges are drawn, not computed\n  **Why:** Misinterpreting this leads to incorrect claims about cluster connectivity\n\n- **Wrong:** Re-running `sc.pp.neighbors` after computing velocity graph or CellRank transition matrices\n  **Right:** If neighbors must change, recompute `velocity_graph` and CellRank kernels afterward\n  **Why:** Velocity graph and transition matrices depend on the neighbor graph; changing it silently invalidates them\n\n- **Wrong:** Using `n_cells` parameter in CellRank v2's `compute_macrostates()`\n  **Right:** Use `n_states` — the v2 API renamed this parameter\n  **Why:** `n_cells` was v1 syntax and will raise an error or be silently ignored in v2\n\n- **Wrong:** Calling `predict_terminal_states()` without first inspecting macrostates\n  **Right:** Always run `g.plot_macrostates()` and review coarse-grained transitions before predicting terminals\n  **Why:** Terminal state prediction depends on macrostate quality; garbage macrostates produce garbage fate maps\n\n- **Wrong:** Forcing velocity-based analysis when velocity arrows look random or incoherent\n  **Right:** Switch to CytoTRACEKernel or PseudotimeKernel when velocity signal is absent\n  **Why:** Random velocity arrows indicate the data lacks kinetic signal; forcing velocity produces meaningless trajectories\n\n## References\n\n- CellRank 2: Weiler et al. Nat Methods 2024, https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41592-023-02088-9\n- scVelo: Bergen et al. Nat Biotechnol 2020, https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41587-020-0591-3\n- CellRank: Lange et al. Nat Methods 2022, https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41592-021-01346-6\n- PAGA: Wolf et al. Genome Biol 2019, https:\u002F\u002Fdoi.org\u002F10.1186\u002Fs13059-019-1663-x\n- velocyto: La Manno et al. Nature 2018, https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41586-018-0414-6\n",{"data":50,"body":67},{"name":4,"description":6,"usage":51,"version":52,"validated_against":53,"tags":59},"Invoke when inferring cell trajectories, computing pseudotime, running RNA velocity, or mapping cell fate probabilities.","2.0.0",{"date":54,"packages":55},"2025-01-15",{"scvelo":56,"cellrank":57,"scanpy":58},"0.3.2","2.0","1.10",[60,61,62,63,64,65,66],"skill","category:pipeline","single-cell","trajectory","pseudotime","rna-velocity","hcls",{"type":68,"children":69},"root",[70,78,85,91,153,182,188,193,222,227,233,286,292,304,310,317,336,645,657,721,727,819,825,957,991,997,1011,1158,1164,1169,1223,1230,1362,1368,1373,1462,1468,1473,1548,1554,1559,1647,1653,1699,1705,1710,1748,1754,2364,2370,2856,2862,2922],{"type":71,"tag":72,"props":73,"children":74},"element","h1",{"id":4},[75],{"type":76,"value":77},"text","Trajectory Analysis",{"type":71,"tag":79,"props":80,"children":82},"h2",{"id":81},"overview",[83],{"type":76,"value":84},"Overview",{"type":71,"tag":86,"props":87,"children":88},"p",{},[89],{"type":76,"value":90},"Reconstructs continuous cell-state transitions from single-cell RNA-seq. Four layers:",{"type":71,"tag":92,"props":93,"children":94},"ol",{},[95,116,126,143],{"type":71,"tag":96,"props":97,"children":98},"li",{},[99,105,107,114],{"type":71,"tag":100,"props":101,"children":102},"strong",{},[103],{"type":76,"value":104},"Diffusion pseudotime",{"type":76,"value":106}," (",{"type":71,"tag":108,"props":109,"children":111},"code",{"className":110},[],[112],{"type":76,"value":113},"scanpy.tl.dpt",{"type":76,"value":115},") — orders cells along a diffusion manifold from a user-specified root.",{"type":71,"tag":96,"props":117,"children":118},{},[119,124],{"type":71,"tag":100,"props":120,"children":121},{},[122],{"type":76,"value":123},"PAGA",{"type":76,"value":125}," — coarse-grained cluster connectivity; initializes force-directed layouts.",{"type":71,"tag":96,"props":127,"children":128},{},[129,134,135,141],{"type":71,"tag":100,"props":130,"children":131},{},[132],{"type":76,"value":133},"RNA velocity",{"type":76,"value":106},{"type":71,"tag":108,"props":136,"children":138},{"className":137},[],[139],{"type":76,"value":140},"scVelo",{"type":76,"value":142},") — directional flow from unspliced\u002Fspliced mRNA ratios. Note: scVelo is in maintenance mode (no new features); APIs remain stable.",{"type":71,"tag":96,"props":144,"children":145},{},[146,151],{"type":71,"tag":100,"props":147,"children":148},{},[149],{"type":76,"value":150},"CellRank v2",{"type":76,"value":152}," — unified kernel API combining velocity, pseudotime, real-time, or CytoTRACE signals into a Markov chain for macrostates, terminal states, and fate probabilities. CytoTRACEKernel enables velocity-free trajectory inference.",{"type":71,"tag":86,"props":154,"children":155},{},[156,158,164,166,172,174,180],{"type":76,"value":157},"Inputs assume a preprocessed ",{"type":71,"tag":108,"props":159,"children":161},{"className":160},[],[162],{"type":76,"value":163},"AnnData",{"type":76,"value":165}," (normalized, log-transformed, HVGs, neighbors computed). Velocity additionally requires ",{"type":71,"tag":108,"props":167,"children":169},{"className":168},[],[170],{"type":76,"value":171},"spliced",{"type":76,"value":173},"\u002F",{"type":71,"tag":108,"props":175,"children":177},{"className":176},[],[178],{"type":76,"value":179},"unspliced",{"type":76,"value":181}," layers from velocyto or STARsolo.",{"type":71,"tag":79,"props":183,"children":185},{"id":184},"usage",[186],{"type":76,"value":187},"Usage",{"type":71,"tag":86,"props":189,"children":190},{},[191],{"type":76,"value":192},"Describe the analysis in natural language:",{"type":71,"tag":194,"props":195,"children":196},"ul",{},[197,202,207,212,217],{"type":71,"tag":96,"props":198,"children":199},{},[200],{"type":76,"value":201},"\"Compute diffusion pseudotime rooted in the HSC cluster.\"",{"type":71,"tag":96,"props":203,"children":204},{},[205],{"type":76,"value":206},"\"Run PAGA on leiden clusters and re-embed with force-directed layout.\"",{"type":71,"tag":96,"props":208,"children":209},{},[210],{"type":76,"value":211},"\"Run dynamical scVelo and plot the velocity stream.\"",{"type":71,"tag":96,"props":213,"children":214},{},[215],{"type":76,"value":216},"\"Use CellRank with CytoTRACEKernel to find terminal states without velocity data.\"",{"type":71,"tag":96,"props":218,"children":219},{},[220],{"type":76,"value":221},"\"Combine VelocityKernel and ConnectivityKernel to compute fate probabilities.\"",{"type":71,"tag":86,"props":223,"children":224},{},[225],{"type":76,"value":226},"The skill produces a runnable Python script or notebook cell.",{"type":71,"tag":79,"props":228,"children":230},{"id":229},"response-format",[231],{"type":76,"value":232},"Response Format",{"type":71,"tag":92,"props":234,"children":235},{},[236,246,256,266,276],{"type":71,"tag":96,"props":237,"children":238},{},[239,244],{"type":71,"tag":100,"props":240,"children":241},{},[242],{"type":76,"value":243},"Method selection",{"type":76,"value":245}," — state which approach fits the user's data (use decision tree below)",{"type":71,"tag":96,"props":247,"children":248},{},[249,254],{"type":71,"tag":100,"props":250,"children":251},{},[252],{"type":76,"value":253},"Prerequisites check",{"type":76,"value":255}," — confirm required layers\u002Fannotations exist",{"type":71,"tag":96,"props":257,"children":258},{},[259,264],{"type":71,"tag":100,"props":260,"children":261},{},[262],{"type":76,"value":263},"Working code",{"type":76,"value":265}," — complete, copy-paste-ready script",{"type":71,"tag":96,"props":267,"children":268},{},[269,274],{"type":71,"tag":100,"props":270,"children":271},{},[272],{"type":76,"value":273},"Key parameters",{"type":76,"value":275}," — explain non-obvious choices",{"type":71,"tag":96,"props":277,"children":278},{},[279,284],{"type":71,"tag":100,"props":280,"children":281},{},[282],{"type":76,"value":283},"Gotchas",{"type":76,"value":285}," — warn about common failure modes specific to the chosen method",{"type":71,"tag":79,"props":287,"children":289},{"id":288},"decision-tree-choosing-a-trajectory-method",[290],{"type":76,"value":291},"Decision Tree — Choosing a Trajectory Method",{"type":71,"tag":293,"props":294,"children":298},"pre",{"className":295,"code":297,"language":76},[296],"language-text","Have spliced\u002Funspliced layers?\n├─ YES → RNA velocity (scVelo dynamical) → CellRank VelocityKernel\n│         Best for: steady-state or dynamical kinetics inference\n│\n└─ NO\n    ├─ Have experimental time points?\n    │   └─ YES → CellRank RealTimeKernel\n    │             Best for: time-course experiments (reprogramming, perturbation)\n    │\n    └─ NO time points\n        ├─ Want directionality (root → terminal)?\n        │   ├─ CytoTRACEKernel (uses gene-count gradient as differentiation proxy)\n        │   │   Best for: differentiation without velocity; no extra input needed\n        │   └─ PseudotimeKernel (uses precomputed DPT as direction)\n        │       Best for: when you trust your DPT root choice\n        │\n        └─ Just want cluster connectivity?\n            └─ PAGA (no directionality, shows which clusters connect)\n",[299],{"type":71,"tag":108,"props":300,"children":302},{"__ignoreMap":301},"",[303],{"type":76,"value":297},{"type":71,"tag":79,"props":305,"children":307},{"id":306},"core-concepts",[308],{"type":76,"value":309},"Core Concepts",{"type":71,"tag":311,"props":312,"children":314},"h3",{"id":313},"_1-prerequisites-splicedunspliced-counts",[315],{"type":76,"value":316},"1. Prerequisites — spliced\u002Funspliced counts",{"type":71,"tag":86,"props":318,"children":319},{},[320,322,327,329,334],{"type":76,"value":321},"Velocity needs ",{"type":71,"tag":108,"props":323,"children":325},{"className":324},[],[326],{"type":76,"value":171},{"type":76,"value":328}," and ",{"type":71,"tag":108,"props":330,"children":332},{"className":331},[],[333],{"type":76,"value":179},{"type":76,"value":335}," layers. Generate with velocyto or STARsolo:",{"type":71,"tag":293,"props":337,"children":341},{"className":338,"code":339,"language":340,"meta":301,"style":301},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Option A: velocyto run10x\nvelocyto run10x \\\n    --samtools-threads 8 \\\n    \u002Fpath\u002Fto\u002Fcellranger_outs\u002Fsample_id \\\n    \u002Fpath\u002Fto\u002Fgenes.gtf\n\n# Option B: STARsolo (Velocyto-compatible matrices)\nSTAR --runThreadN 16 \\\n     --genomeDir \u002Fpath\u002Fto\u002Fstar_index \\\n     --readFilesIn R2.fq.gz R1.fq.gz \\\n     --readFilesCommand zcat \\\n     --soloType CB_UMI_Simple \\\n     --soloCBallowlist 3M-february-2018.txt \\\n     --soloFeatures Gene Velocyto \\\n     --soloCBstart 1 --soloCBlen 16 --soloUMIstart 17 --soloUMIlen 12 \\\n     --outSAMtype BAM SortedByCoordinate\n","bash",[342],{"type":71,"tag":108,"props":343,"children":344},{"__ignoreMap":301},[345,357,379,398,410,419,429,438,461,479,502,520,538,556,579,626],{"type":71,"tag":346,"props":347,"children":350},"span",{"class":348,"line":349},"line",1,[351],{"type":71,"tag":346,"props":352,"children":354},{"style":353},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[355],{"type":76,"value":356},"# Option A: velocyto run10x\n",{"type":71,"tag":346,"props":358,"children":360},{"class":348,"line":359},2,[361,367,373],{"type":71,"tag":346,"props":362,"children":364},{"style":363},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[365],{"type":76,"value":366},"velocyto",{"type":71,"tag":346,"props":368,"children":370},{"style":369},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[371],{"type":76,"value":372}," run10x",{"type":71,"tag":346,"props":374,"children":376},{"style":375},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[377],{"type":76,"value":378}," \\\n",{"type":71,"tag":346,"props":380,"children":382},{"class":348,"line":381},3,[383,388,394],{"type":71,"tag":346,"props":384,"children":385},{"style":369},[386],{"type":76,"value":387},"    --samtools-threads",{"type":71,"tag":346,"props":389,"children":391},{"style":390},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[392],{"type":76,"value":393}," 8",{"type":71,"tag":346,"props":395,"children":396},{"style":375},[397],{"type":76,"value":378},{"type":71,"tag":346,"props":399,"children":400},{"class":348,"line":26},[401,406],{"type":71,"tag":346,"props":402,"children":403},{"style":369},[404],{"type":76,"value":405},"    \u002Fpath\u002Fto\u002Fcellranger_outs\u002Fsample_id",{"type":71,"tag":346,"props":407,"children":408},{"style":375},[409],{"type":76,"value":378},{"type":71,"tag":346,"props":411,"children":413},{"class":348,"line":412},5,[414],{"type":71,"tag":346,"props":415,"children":416},{"style":369},[417],{"type":76,"value":418},"    \u002Fpath\u002Fto\u002Fgenes.gtf\n",{"type":71,"tag":346,"props":420,"children":422},{"class":348,"line":421},6,[423],{"type":71,"tag":346,"props":424,"children":426},{"emptyLinePlaceholder":425},true,[427],{"type":76,"value":428},"\n",{"type":71,"tag":346,"props":430,"children":432},{"class":348,"line":431},7,[433],{"type":71,"tag":346,"props":434,"children":435},{"style":353},[436],{"type":76,"value":437},"# Option B: STARsolo (Velocyto-compatible matrices)\n",{"type":71,"tag":346,"props":439,"children":441},{"class":348,"line":440},8,[442,447,452,457],{"type":71,"tag":346,"props":443,"children":444},{"style":363},[445],{"type":76,"value":446},"STAR",{"type":71,"tag":346,"props":448,"children":449},{"style":369},[450],{"type":76,"value":451}," --runThreadN",{"type":71,"tag":346,"props":453,"children":454},{"style":390},[455],{"type":76,"value":456}," 16",{"type":71,"tag":346,"props":458,"children":459},{"style":375},[460],{"type":76,"value":378},{"type":71,"tag":346,"props":462,"children":464},{"class":348,"line":463},9,[465,470,475],{"type":71,"tag":346,"props":466,"children":467},{"style":369},[468],{"type":76,"value":469},"     --genomeDir",{"type":71,"tag":346,"props":471,"children":472},{"style":369},[473],{"type":76,"value":474}," \u002Fpath\u002Fto\u002Fstar_index",{"type":71,"tag":346,"props":476,"children":477},{"style":375},[478],{"type":76,"value":378},{"type":71,"tag":346,"props":480,"children":482},{"class":348,"line":481},10,[483,488,493,498],{"type":71,"tag":346,"props":484,"children":485},{"style":369},[486],{"type":76,"value":487},"     --readFilesIn",{"type":71,"tag":346,"props":489,"children":490},{"style":369},[491],{"type":76,"value":492}," R2.fq.gz",{"type":71,"tag":346,"props":494,"children":495},{"style":369},[496],{"type":76,"value":497}," R1.fq.gz",{"type":71,"tag":346,"props":499,"children":500},{"style":375},[501],{"type":76,"value":378},{"type":71,"tag":346,"props":503,"children":505},{"class":348,"line":504},11,[506,511,516],{"type":71,"tag":346,"props":507,"children":508},{"style":369},[509],{"type":76,"value":510},"     --readFilesCommand",{"type":71,"tag":346,"props":512,"children":513},{"style":369},[514],{"type":76,"value":515}," zcat",{"type":71,"tag":346,"props":517,"children":518},{"style":375},[519],{"type":76,"value":378},{"type":71,"tag":346,"props":521,"children":523},{"class":348,"line":522},12,[524,529,534],{"type":71,"tag":346,"props":525,"children":526},{"style":369},[527],{"type":76,"value":528},"     --soloType",{"type":71,"tag":346,"props":530,"children":531},{"style":369},[532],{"type":76,"value":533}," CB_UMI_Simple",{"type":71,"tag":346,"props":535,"children":536},{"style":375},[537],{"type":76,"value":378},{"type":71,"tag":346,"props":539,"children":541},{"class":348,"line":540},13,[542,547,552],{"type":71,"tag":346,"props":543,"children":544},{"style":369},[545],{"type":76,"value":546},"     --soloCBallowlist",{"type":71,"tag":346,"props":548,"children":549},{"style":369},[550],{"type":76,"value":551}," 3M-february-2018.txt",{"type":71,"tag":346,"props":553,"children":554},{"style":375},[555],{"type":76,"value":378},{"type":71,"tag":346,"props":557,"children":559},{"class":348,"line":558},14,[560,565,570,575],{"type":71,"tag":346,"props":561,"children":562},{"style":369},[563],{"type":76,"value":564},"     --soloFeatures",{"type":71,"tag":346,"props":566,"children":567},{"style":369},[568],{"type":76,"value":569}," Gene",{"type":71,"tag":346,"props":571,"children":572},{"style":369},[573],{"type":76,"value":574}," Velocyto",{"type":71,"tag":346,"props":576,"children":577},{"style":375},[578],{"type":76,"value":378},{"type":71,"tag":346,"props":580,"children":582},{"class":348,"line":581},15,[583,588,593,598,602,607,612,617,622],{"type":71,"tag":346,"props":584,"children":585},{"style":369},[586],{"type":76,"value":587},"     --soloCBstart",{"type":71,"tag":346,"props":589,"children":590},{"style":390},[591],{"type":76,"value":592}," 1",{"type":71,"tag":346,"props":594,"children":595},{"style":369},[596],{"type":76,"value":597}," --soloCBlen",{"type":71,"tag":346,"props":599,"children":600},{"style":390},[601],{"type":76,"value":456},{"type":71,"tag":346,"props":603,"children":604},{"style":369},[605],{"type":76,"value":606}," --soloUMIstart",{"type":71,"tag":346,"props":608,"children":609},{"style":390},[610],{"type":76,"value":611}," 17",{"type":71,"tag":346,"props":613,"children":614},{"style":369},[615],{"type":76,"value":616}," --soloUMIlen",{"type":71,"tag":346,"props":618,"children":619},{"style":390},[620],{"type":76,"value":621}," 12",{"type":71,"tag":346,"props":623,"children":624},{"style":375},[625],{"type":76,"value":378},{"type":71,"tag":346,"props":627,"children":629},{"class":348,"line":628},16,[630,635,640],{"type":71,"tag":346,"props":631,"children":632},{"style":369},[633],{"type":76,"value":634},"     --outSAMtype",{"type":71,"tag":346,"props":636,"children":637},{"style":369},[638],{"type":76,"value":639}," BAM",{"type":71,"tag":346,"props":641,"children":642},{"style":369},[643],{"type":76,"value":644}," SortedByCoordinate\n",{"type":71,"tag":86,"props":646,"children":647},{},[648,650,655],{"type":76,"value":649},"Merge the loom with an existing ",{"type":71,"tag":108,"props":651,"children":653},{"className":652},[],[654],{"type":76,"value":163},{"type":76,"value":656},":",{"type":71,"tag":293,"props":658,"children":662},{"className":659,"code":660,"language":661,"meta":301,"style":301},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import scvelo as scv\n\nadata = sc.read_h5ad(\"processed.h5ad\")\nldata = scv.read(\"sample_id.loom\", cache=True)\n# scv.utils.merge inner-joins on barcodes — ensure obs_names match between objects\nadata = scv.utils.merge(adata, ldata)\nassert \"spliced\" in adata.layers and \"unspliced\" in adata.layers\n","python",[663],{"type":71,"tag":108,"props":664,"children":665},{"__ignoreMap":301},[666,674,681,689,697,705,713],{"type":71,"tag":346,"props":667,"children":668},{"class":348,"line":349},[669],{"type":71,"tag":346,"props":670,"children":671},{},[672],{"type":76,"value":673},"import scvelo as scv\n",{"type":71,"tag":346,"props":675,"children":676},{"class":348,"line":359},[677],{"type":71,"tag":346,"props":678,"children":679},{"emptyLinePlaceholder":425},[680],{"type":76,"value":428},{"type":71,"tag":346,"props":682,"children":683},{"class":348,"line":381},[684],{"type":71,"tag":346,"props":685,"children":686},{},[687],{"type":76,"value":688},"adata = sc.read_h5ad(\"processed.h5ad\")\n",{"type":71,"tag":346,"props":690,"children":691},{"class":348,"line":26},[692],{"type":71,"tag":346,"props":693,"children":694},{},[695],{"type":76,"value":696},"ldata = scv.read(\"sample_id.loom\", cache=True)\n",{"type":71,"tag":346,"props":698,"children":699},{"class":348,"line":412},[700],{"type":71,"tag":346,"props":701,"children":702},{},[703],{"type":76,"value":704},"# scv.utils.merge inner-joins on barcodes — ensure obs_names match between objects\n",{"type":71,"tag":346,"props":706,"children":707},{"class":348,"line":421},[708],{"type":71,"tag":346,"props":709,"children":710},{},[711],{"type":76,"value":712},"adata = scv.utils.merge(adata, ldata)\n",{"type":71,"tag":346,"props":714,"children":715},{"class":348,"line":431},[716],{"type":71,"tag":346,"props":717,"children":718},{},[719],{"type":76,"value":720},"assert \"spliced\" in adata.layers and \"unspliced\" in adata.layers\n",{"type":71,"tag":311,"props":722,"children":724},{"id":723},"_2-diffusion-pseudotime-dpt",[725],{"type":76,"value":726},"2. Diffusion pseudotime (DPT)",{"type":71,"tag":293,"props":728,"children":730},{"className":659,"code":729,"language":661,"meta":301,"style":301},"import numpy as np\nimport scanpy as sc\n\nsc.tl.diffmap(adata)\n\n# Root cell: pick one cell in the known starting population\nroot_cluster = \"HSC\"\nadata.uns[\"iroot\"] = np.flatnonzero(adata.obs[\"celltype\"] == root_cluster)[0]\n\nsc.tl.dpt(adata)  # writes adata.obs['dpt_pseudotime']\nsc.pl.umap(adata, color=[\"celltype\", \"dpt_pseudotime\"])\n",[731],{"type":71,"tag":108,"props":732,"children":733},{"__ignoreMap":301},[734,742,750,757,765,772,780,788,796,803,811],{"type":71,"tag":346,"props":735,"children":736},{"class":348,"line":349},[737],{"type":71,"tag":346,"props":738,"children":739},{},[740],{"type":76,"value":741},"import numpy as np\n",{"type":71,"tag":346,"props":743,"children":744},{"class":348,"line":359},[745],{"type":71,"tag":346,"props":746,"children":747},{},[748],{"type":76,"value":749},"import scanpy as sc\n",{"type":71,"tag":346,"props":751,"children":752},{"class":348,"line":381},[753],{"type":71,"tag":346,"props":754,"children":755},{"emptyLinePlaceholder":425},[756],{"type":76,"value":428},{"type":71,"tag":346,"props":758,"children":759},{"class":348,"line":26},[760],{"type":71,"tag":346,"props":761,"children":762},{},[763],{"type":76,"value":764},"sc.tl.diffmap(adata)\n",{"type":71,"tag":346,"props":766,"children":767},{"class":348,"line":412},[768],{"type":71,"tag":346,"props":769,"children":770},{"emptyLinePlaceholder":425},[771],{"type":76,"value":428},{"type":71,"tag":346,"props":773,"children":774},{"class":348,"line":421},[775],{"type":71,"tag":346,"props":776,"children":777},{},[778],{"type":76,"value":779},"# Root cell: pick one cell in the known starting population\n",{"type":71,"tag":346,"props":781,"children":782},{"class":348,"line":431},[783],{"type":71,"tag":346,"props":784,"children":785},{},[786],{"type":76,"value":787},"root_cluster = \"HSC\"\n",{"type":71,"tag":346,"props":789,"children":790},{"class":348,"line":440},[791],{"type":71,"tag":346,"props":792,"children":793},{},[794],{"type":76,"value":795},"adata.uns[\"iroot\"] = np.flatnonzero(adata.obs[\"celltype\"] == root_cluster)[0]\n",{"type":71,"tag":346,"props":797,"children":798},{"class":348,"line":463},[799],{"type":71,"tag":346,"props":800,"children":801},{"emptyLinePlaceholder":425},[802],{"type":76,"value":428},{"type":71,"tag":346,"props":804,"children":805},{"class":348,"line":481},[806],{"type":71,"tag":346,"props":807,"children":808},{},[809],{"type":76,"value":810},"sc.tl.dpt(adata)  # writes adata.obs['dpt_pseudotime']\n",{"type":71,"tag":346,"props":812,"children":813},{"class":348,"line":504},[814],{"type":71,"tag":346,"props":815,"children":816},{},[817],{"type":76,"value":818},"sc.pl.umap(adata, color=[\"celltype\", \"dpt_pseudotime\"])\n",{"type":71,"tag":311,"props":820,"children":822},{"id":821},"_3-paga",[823],{"type":76,"value":824},"3. PAGA",{"type":71,"tag":293,"props":826,"children":828},{"className":659,"code":827,"language":661,"meta":301,"style":301},"sc.tl.paga(adata, groups=\"leiden\")\n\n# threshold controls edge pruning: higher = fewer edges shown\n# Default 0.01 shows almost everything; 0.03-0.1 is typical for clean plots\nsc.pl.paga(adata, threshold=0.03, show=False)\n\n# PAGA-initialized layout for cleaner trajectory visualization\nsc.tl.draw_graph(adata, init_pos=\"paga\")\nsc.pl.draw_graph(adata, color=[\"leiden\", \"dpt_pseudotime\"], legend_loc=\"on data\")\n\n# Gene trends along a chosen path\nsc.pl.paga_path(\n    adata,\n    nodes=[\"HSC\", \"MPP\", \"GMP\", \"Mono\"],\n    keys=[\"Elane\", \"Mpo\", \"Gata1\"],\n)\n",[829],{"type":71,"tag":108,"props":830,"children":831},{"__ignoreMap":301},[832,840,847,855,863,871,878,886,894,902,909,917,925,933,941,949],{"type":71,"tag":346,"props":833,"children":834},{"class":348,"line":349},[835],{"type":71,"tag":346,"props":836,"children":837},{},[838],{"type":76,"value":839},"sc.tl.paga(adata, groups=\"leiden\")\n",{"type":71,"tag":346,"props":841,"children":842},{"class":348,"line":359},[843],{"type":71,"tag":346,"props":844,"children":845},{"emptyLinePlaceholder":425},[846],{"type":76,"value":428},{"type":71,"tag":346,"props":848,"children":849},{"class":348,"line":381},[850],{"type":71,"tag":346,"props":851,"children":852},{},[853],{"type":76,"value":854},"# threshold controls edge pruning: higher = fewer edges shown\n",{"type":71,"tag":346,"props":856,"children":857},{"class":348,"line":26},[858],{"type":71,"tag":346,"props":859,"children":860},{},[861],{"type":76,"value":862},"# Default 0.01 shows almost everything; 0.03-0.1 is typical for clean plots\n",{"type":71,"tag":346,"props":864,"children":865},{"class":348,"line":412},[866],{"type":71,"tag":346,"props":867,"children":868},{},[869],{"type":76,"value":870},"sc.pl.paga(adata, threshold=0.03, show=False)\n",{"type":71,"tag":346,"props":872,"children":873},{"class":348,"line":421},[874],{"type":71,"tag":346,"props":875,"children":876},{"emptyLinePlaceholder":425},[877],{"type":76,"value":428},{"type":71,"tag":346,"props":879,"children":880},{"class":348,"line":431},[881],{"type":71,"tag":346,"props":882,"children":883},{},[884],{"type":76,"value":885},"# PAGA-initialized layout for cleaner trajectory visualization\n",{"type":71,"tag":346,"props":887,"children":888},{"class":348,"line":440},[889],{"type":71,"tag":346,"props":890,"children":891},{},[892],{"type":76,"value":893},"sc.tl.draw_graph(adata, init_pos=\"paga\")\n",{"type":71,"tag":346,"props":895,"children":896},{"class":348,"line":463},[897],{"type":71,"tag":346,"props":898,"children":899},{},[900],{"type":76,"value":901},"sc.pl.draw_graph(adata, color=[\"leiden\", \"dpt_pseudotime\"], legend_loc=\"on data\")\n",{"type":71,"tag":346,"props":903,"children":904},{"class":348,"line":481},[905],{"type":71,"tag":346,"props":906,"children":907},{"emptyLinePlaceholder":425},[908],{"type":76,"value":428},{"type":71,"tag":346,"props":910,"children":911},{"class":348,"line":504},[912],{"type":71,"tag":346,"props":913,"children":914},{},[915],{"type":76,"value":916},"# Gene trends along a chosen path\n",{"type":71,"tag":346,"props":918,"children":919},{"class":348,"line":522},[920],{"type":71,"tag":346,"props":921,"children":922},{},[923],{"type":76,"value":924},"sc.pl.paga_path(\n",{"type":71,"tag":346,"props":926,"children":927},{"class":348,"line":540},[928],{"type":71,"tag":346,"props":929,"children":930},{},[931],{"type":76,"value":932},"    adata,\n",{"type":71,"tag":346,"props":934,"children":935},{"class":348,"line":558},[936],{"type":71,"tag":346,"props":937,"children":938},{},[939],{"type":76,"value":940},"    nodes=[\"HSC\", \"MPP\", \"GMP\", \"Mono\"],\n",{"type":71,"tag":346,"props":942,"children":943},{"class":348,"line":581},[944],{"type":71,"tag":346,"props":945,"children":946},{},[947],{"type":76,"value":948},"    keys=[\"Elane\", \"Mpo\", \"Gata1\"],\n",{"type":71,"tag":346,"props":950,"children":951},{"class":348,"line":628},[952],{"type":71,"tag":346,"props":953,"children":954},{},[955],{"type":76,"value":956},")\n",{"type":71,"tag":86,"props":958,"children":959},{},[960,965,967,973,975,981,983,989],{"type":71,"tag":100,"props":961,"children":962},{},[963],{"type":76,"value":964},"PAGA threshold note:",{"type":76,"value":966}," ",{"type":71,"tag":108,"props":968,"children":970},{"className":969},[],[971],{"type":76,"value":972},"sc.pl.paga(threshold=...)",{"type":76,"value":974}," only affects visualization (which edges to draw), not the underlying graph. The connectivity weights live in ",{"type":71,"tag":108,"props":976,"children":978},{"className":977},[],[979],{"type":76,"value":980},"adata.uns['paga']['connectivities']",{"type":76,"value":982},". Set ",{"type":71,"tag":108,"props":984,"children":986},{"className":985},[],[987],{"type":76,"value":988},"threshold=0",{"type":76,"value":990}," to see all edges, increase to declutter.",{"type":71,"tag":311,"props":992,"children":994},{"id":993},"_4-rna-velocity-scvelo",[995],{"type":76,"value":996},"4. RNA velocity (scVelo)",{"type":71,"tag":998,"props":999,"children":1000},"blockquote",{},[1001],{"type":71,"tag":86,"props":1002,"children":1003},{},[1004,1009],{"type":71,"tag":100,"props":1005,"children":1006},{},[1007],{"type":76,"value":1008},"Status:",{"type":76,"value":1010}," scVelo is in maintenance mode. APIs are stable but no new features are planned. For new projects without velocity data, consider CellRank's CytoTRACEKernel as a velocity-free alternative.",{"type":71,"tag":293,"props":1012,"children":1014},{"className":659,"code":1013,"language":661,"meta":301,"style":301},"import scvelo as scv\n\nscv.settings.n_jobs = 8\n\n# Preprocessing — operates on spliced\u002Funspliced layers\nscv.pp.filter_and_normalize(adata, min_shared_counts=20, n_top_genes=2000)\nscv.pp.moments(adata, n_pcs=30, n_neighbors=30)\n\n# Dynamical mode (recommended): fits full kinetic model per gene\nscv.tl.recover_dynamics(adata, n_jobs=8)\nscv.tl.velocity(adata, mode=\"dynamical\")\nscv.tl.velocity_graph(adata)\n\nscv.pl.velocity_embedding_stream(adata, basis=\"umap\", color=\"celltype\")\n\n# Latent time (dynamical mode only)\nscv.tl.latent_time(adata)\nscv.pl.scatter(adata, color=\"latent_time\", color_map=\"gnuplot\")\n",[1015],{"type":71,"tag":108,"props":1016,"children":1017},{"__ignoreMap":301},[1018,1025,1032,1040,1047,1055,1063,1071,1078,1086,1094,1102,1110,1117,1125,1132,1140,1149],{"type":71,"tag":346,"props":1019,"children":1020},{"class":348,"line":349},[1021],{"type":71,"tag":346,"props":1022,"children":1023},{},[1024],{"type":76,"value":673},{"type":71,"tag":346,"props":1026,"children":1027},{"class":348,"line":359},[1028],{"type":71,"tag":346,"props":1029,"children":1030},{"emptyLinePlaceholder":425},[1031],{"type":76,"value":428},{"type":71,"tag":346,"props":1033,"children":1034},{"class":348,"line":381},[1035],{"type":71,"tag":346,"props":1036,"children":1037},{},[1038],{"type":76,"value":1039},"scv.settings.n_jobs = 8\n",{"type":71,"tag":346,"props":1041,"children":1042},{"class":348,"line":26},[1043],{"type":71,"tag":346,"props":1044,"children":1045},{"emptyLinePlaceholder":425},[1046],{"type":76,"value":428},{"type":71,"tag":346,"props":1048,"children":1049},{"class":348,"line":412},[1050],{"type":71,"tag":346,"props":1051,"children":1052},{},[1053],{"type":76,"value":1054},"# Preprocessing — operates on spliced\u002Funspliced layers\n",{"type":71,"tag":346,"props":1056,"children":1057},{"class":348,"line":421},[1058],{"type":71,"tag":346,"props":1059,"children":1060},{},[1061],{"type":76,"value":1062},"scv.pp.filter_and_normalize(adata, min_shared_counts=20, n_top_genes=2000)\n",{"type":71,"tag":346,"props":1064,"children":1065},{"class":348,"line":431},[1066],{"type":71,"tag":346,"props":1067,"children":1068},{},[1069],{"type":76,"value":1070},"scv.pp.moments(adata, n_pcs=30, n_neighbors=30)\n",{"type":71,"tag":346,"props":1072,"children":1073},{"class":348,"line":440},[1074],{"type":71,"tag":346,"props":1075,"children":1076},{"emptyLinePlaceholder":425},[1077],{"type":76,"value":428},{"type":71,"tag":346,"props":1079,"children":1080},{"class":348,"line":463},[1081],{"type":71,"tag":346,"props":1082,"children":1083},{},[1084],{"type":76,"value":1085},"# Dynamical mode (recommended): fits full kinetic model per gene\n",{"type":71,"tag":346,"props":1087,"children":1088},{"class":348,"line":481},[1089],{"type":71,"tag":346,"props":1090,"children":1091},{},[1092],{"type":76,"value":1093},"scv.tl.recover_dynamics(adata, n_jobs=8)\n",{"type":71,"tag":346,"props":1095,"children":1096},{"class":348,"line":504},[1097],{"type":71,"tag":346,"props":1098,"children":1099},{},[1100],{"type":76,"value":1101},"scv.tl.velocity(adata, mode=\"dynamical\")\n",{"type":71,"tag":346,"props":1103,"children":1104},{"class":348,"line":522},[1105],{"type":71,"tag":346,"props":1106,"children":1107},{},[1108],{"type":76,"value":1109},"scv.tl.velocity_graph(adata)\n",{"type":71,"tag":346,"props":1111,"children":1112},{"class":348,"line":540},[1113],{"type":71,"tag":346,"props":1114,"children":1115},{"emptyLinePlaceholder":425},[1116],{"type":76,"value":428},{"type":71,"tag":346,"props":1118,"children":1119},{"class":348,"line":558},[1120],{"type":71,"tag":346,"props":1121,"children":1122},{},[1123],{"type":76,"value":1124},"scv.pl.velocity_embedding_stream(adata, basis=\"umap\", color=\"celltype\")\n",{"type":71,"tag":346,"props":1126,"children":1127},{"class":348,"line":581},[1128],{"type":71,"tag":346,"props":1129,"children":1130},{"emptyLinePlaceholder":425},[1131],{"type":76,"value":428},{"type":71,"tag":346,"props":1133,"children":1134},{"class":348,"line":628},[1135],{"type":71,"tag":346,"props":1136,"children":1137},{},[1138],{"type":76,"value":1139},"# Latent time (dynamical mode only)\n",{"type":71,"tag":346,"props":1141,"children":1143},{"class":348,"line":1142},17,[1144],{"type":71,"tag":346,"props":1145,"children":1146},{},[1147],{"type":76,"value":1148},"scv.tl.latent_time(adata)\n",{"type":71,"tag":346,"props":1150,"children":1152},{"class":348,"line":1151},18,[1153],{"type":71,"tag":346,"props":1154,"children":1155},{},[1156],{"type":76,"value":1157},"scv.pl.scatter(adata, color=\"latent_time\", color_map=\"gnuplot\")\n",{"type":71,"tag":311,"props":1159,"children":1161},{"id":1160},"_5-cellrank-v2-unified-kernel-api",[1162],{"type":76,"value":1163},"5. CellRank v2 — unified kernel API",{"type":71,"tag":86,"props":1165,"children":1166},{},[1167],{"type":76,"value":1168},"CellRank v2 provides a unified kernel interface. All kernels:",{"type":71,"tag":194,"props":1170,"children":1171},{},[1172,1190,1210],{"type":71,"tag":96,"props":1173,"children":1174},{},[1175,1177,1182,1184],{"type":76,"value":1176},"Accept an ",{"type":71,"tag":108,"props":1178,"children":1180},{"className":1179},[],[1181],{"type":76,"value":163},{"type":76,"value":1183}," and call ",{"type":71,"tag":108,"props":1185,"children":1187},{"className":1186},[],[1188],{"type":76,"value":1189},".compute_transition_matrix()",{"type":71,"tag":96,"props":1191,"children":1192},{},[1193,1195,1201,1202,1208],{"type":76,"value":1194},"Can be combined with ",{"type":71,"tag":108,"props":1196,"children":1198},{"className":1197},[],[1199],{"type":76,"value":1200},"+",{"type":76,"value":328},{"type":71,"tag":108,"props":1203,"children":1205},{"className":1204},[],[1206],{"type":76,"value":1207},"*",{"type":76,"value":1209}," (weighted sum)",{"type":71,"tag":96,"props":1211,"children":1212},{},[1213,1215,1221],{"type":76,"value":1214},"Feed into ",{"type":71,"tag":108,"props":1216,"children":1218},{"className":1217},[],[1219],{"type":76,"value":1220},"cr.estimators.GPCCA",{"type":76,"value":1222}," for macrostate decomposition",{"type":71,"tag":1224,"props":1225,"children":1227},"h4",{"id":1226},"_5a-velocitykernel-requires-scvelo-velocity",[1228],{"type":76,"value":1229},"5a. VelocityKernel (requires scVelo velocity)",{"type":71,"tag":293,"props":1231,"children":1233},{"className":659,"code":1232,"language":661,"meta":301,"style":301},"import cellrank as cr\nfrom cellrank.kernels import VelocityKernel, ConnectivityKernel\n\nvk = VelocityKernel(adata).compute_transition_matrix()\nck = ConnectivityKernel(adata).compute_transition_matrix()\nkernel = 0.8 * vk + 0.2 * ck  # weighted combination\n\ng = cr.estimators.GPCCA(kernel)\ng.compute_schur(n_components=20)\ng.compute_macrostates(n_states=5, cluster_key=\"celltype\")\ng.predict_terminal_states()\ng.compute_fate_probabilities()\ng.plot_fate_probabilities(same_plot=False)\n\n# Lineage driver genes\ndrivers = g.compute_lineage_drivers(lineages=[\"Mono\"], use_raw=False)\n",[1234],{"type":71,"tag":108,"props":1235,"children":1236},{"__ignoreMap":301},[1237,1245,1253,1260,1268,1276,1284,1291,1299,1307,1315,1323,1331,1339,1346,1354],{"type":71,"tag":346,"props":1238,"children":1239},{"class":348,"line":349},[1240],{"type":71,"tag":346,"props":1241,"children":1242},{},[1243],{"type":76,"value":1244},"import cellrank as cr\n",{"type":71,"tag":346,"props":1246,"children":1247},{"class":348,"line":359},[1248],{"type":71,"tag":346,"props":1249,"children":1250},{},[1251],{"type":76,"value":1252},"from cellrank.kernels import VelocityKernel, ConnectivityKernel\n",{"type":71,"tag":346,"props":1254,"children":1255},{"class":348,"line":381},[1256],{"type":71,"tag":346,"props":1257,"children":1258},{"emptyLinePlaceholder":425},[1259],{"type":76,"value":428},{"type":71,"tag":346,"props":1261,"children":1262},{"class":348,"line":26},[1263],{"type":71,"tag":346,"props":1264,"children":1265},{},[1266],{"type":76,"value":1267},"vk = VelocityKernel(adata).compute_transition_matrix()\n",{"type":71,"tag":346,"props":1269,"children":1270},{"class":348,"line":412},[1271],{"type":71,"tag":346,"props":1272,"children":1273},{},[1274],{"type":76,"value":1275},"ck = ConnectivityKernel(adata).compute_transition_matrix()\n",{"type":71,"tag":346,"props":1277,"children":1278},{"class":348,"line":421},[1279],{"type":71,"tag":346,"props":1280,"children":1281},{},[1282],{"type":76,"value":1283},"kernel = 0.8 * vk + 0.2 * ck  # weighted combination\n",{"type":71,"tag":346,"props":1285,"children":1286},{"class":348,"line":431},[1287],{"type":71,"tag":346,"props":1288,"children":1289},{"emptyLinePlaceholder":425},[1290],{"type":76,"value":428},{"type":71,"tag":346,"props":1292,"children":1293},{"class":348,"line":440},[1294],{"type":71,"tag":346,"props":1295,"children":1296},{},[1297],{"type":76,"value":1298},"g = cr.estimators.GPCCA(kernel)\n",{"type":71,"tag":346,"props":1300,"children":1301},{"class":348,"line":463},[1302],{"type":71,"tag":346,"props":1303,"children":1304},{},[1305],{"type":76,"value":1306},"g.compute_schur(n_components=20)\n",{"type":71,"tag":346,"props":1308,"children":1309},{"class":348,"line":481},[1310],{"type":71,"tag":346,"props":1311,"children":1312},{},[1313],{"type":76,"value":1314},"g.compute_macrostates(n_states=5, cluster_key=\"celltype\")\n",{"type":71,"tag":346,"props":1316,"children":1317},{"class":348,"line":504},[1318],{"type":71,"tag":346,"props":1319,"children":1320},{},[1321],{"type":76,"value":1322},"g.predict_terminal_states()\n",{"type":71,"tag":346,"props":1324,"children":1325},{"class":348,"line":522},[1326],{"type":71,"tag":346,"props":1327,"children":1328},{},[1329],{"type":76,"value":1330},"g.compute_fate_probabilities()\n",{"type":71,"tag":346,"props":1332,"children":1333},{"class":348,"line":540},[1334],{"type":71,"tag":346,"props":1335,"children":1336},{},[1337],{"type":76,"value":1338},"g.plot_fate_probabilities(same_plot=False)\n",{"type":71,"tag":346,"props":1340,"children":1341},{"class":348,"line":558},[1342],{"type":71,"tag":346,"props":1343,"children":1344},{"emptyLinePlaceholder":425},[1345],{"type":76,"value":428},{"type":71,"tag":346,"props":1347,"children":1348},{"class":348,"line":581},[1349],{"type":71,"tag":346,"props":1350,"children":1351},{},[1352],{"type":76,"value":1353},"# Lineage driver genes\n",{"type":71,"tag":346,"props":1355,"children":1356},{"class":348,"line":628},[1357],{"type":71,"tag":346,"props":1358,"children":1359},{},[1360],{"type":76,"value":1361},"drivers = g.compute_lineage_drivers(lineages=[\"Mono\"], use_raw=False)\n",{"type":71,"tag":1224,"props":1363,"children":1365},{"id":1364},"_5b-cytotracekernel-velocity-free-new-in-v2",[1366],{"type":76,"value":1367},"5b. CytoTRACEKernel (velocity-free, new in v2)",{"type":71,"tag":86,"props":1369,"children":1370},{},[1371],{"type":76,"value":1372},"Uses gene-count gradient as a proxy for differentiation potential. No velocity data needed.",{"type":71,"tag":293,"props":1374,"children":1376},{"className":659,"code":1375,"language":661,"meta":301,"style":301},"from cellrank.kernels import CytoTRACEKernel, ConnectivityKernel\n\nctk = CytoTRACEKernel(adata).compute_transition_matrix()\nck = ConnectivityKernel(adata).compute_transition_matrix()\nkernel = 0.8 * ctk + 0.2 * ck\n\ng = cr.estimators.GPCCA(kernel)\ng.compute_schur(n_components=15)\ng.compute_macrostates(n_states=4, cluster_key=\"celltype\")\ng.predict_terminal_states()\ng.compute_fate_probabilities()\n",[1377],{"type":71,"tag":108,"props":1378,"children":1379},{"__ignoreMap":301},[1380,1388,1395,1403,1410,1418,1425,1432,1440,1448,1455],{"type":71,"tag":346,"props":1381,"children":1382},{"class":348,"line":349},[1383],{"type":71,"tag":346,"props":1384,"children":1385},{},[1386],{"type":76,"value":1387},"from cellrank.kernels import CytoTRACEKernel, ConnectivityKernel\n",{"type":71,"tag":346,"props":1389,"children":1390},{"class":348,"line":359},[1391],{"type":71,"tag":346,"props":1392,"children":1393},{"emptyLinePlaceholder":425},[1394],{"type":76,"value":428},{"type":71,"tag":346,"props":1396,"children":1397},{"class":348,"line":381},[1398],{"type":71,"tag":346,"props":1399,"children":1400},{},[1401],{"type":76,"value":1402},"ctk = CytoTRACEKernel(adata).compute_transition_matrix()\n",{"type":71,"tag":346,"props":1404,"children":1405},{"class":348,"line":26},[1406],{"type":71,"tag":346,"props":1407,"children":1408},{},[1409],{"type":76,"value":1275},{"type":71,"tag":346,"props":1411,"children":1412},{"class":348,"line":412},[1413],{"type":71,"tag":346,"props":1414,"children":1415},{},[1416],{"type":76,"value":1417},"kernel = 0.8 * ctk + 0.2 * ck\n",{"type":71,"tag":346,"props":1419,"children":1420},{"class":348,"line":421},[1421],{"type":71,"tag":346,"props":1422,"children":1423},{"emptyLinePlaceholder":425},[1424],{"type":76,"value":428},{"type":71,"tag":346,"props":1426,"children":1427},{"class":348,"line":431},[1428],{"type":71,"tag":346,"props":1429,"children":1430},{},[1431],{"type":76,"value":1298},{"type":71,"tag":346,"props":1433,"children":1434},{"class":348,"line":440},[1435],{"type":71,"tag":346,"props":1436,"children":1437},{},[1438],{"type":76,"value":1439},"g.compute_schur(n_components=15)\n",{"type":71,"tag":346,"props":1441,"children":1442},{"class":348,"line":463},[1443],{"type":71,"tag":346,"props":1444,"children":1445},{},[1446],{"type":76,"value":1447},"g.compute_macrostates(n_states=4, cluster_key=\"celltype\")\n",{"type":71,"tag":346,"props":1449,"children":1450},{"class":348,"line":481},[1451],{"type":71,"tag":346,"props":1452,"children":1453},{},[1454],{"type":76,"value":1322},{"type":71,"tag":346,"props":1456,"children":1457},{"class":348,"line":504},[1458],{"type":71,"tag":346,"props":1459,"children":1460},{},[1461],{"type":76,"value":1330},{"type":71,"tag":1224,"props":1463,"children":1465},{"id":1464},"_5c-realtimekernel-experimental-time-points",[1466],{"type":76,"value":1467},"5c. RealTimeKernel (experimental time points)",{"type":71,"tag":86,"props":1469,"children":1470},{},[1471],{"type":76,"value":1472},"For time-course experiments where cells are collected at discrete time points.",{"type":71,"tag":293,"props":1474,"children":1476},{"className":659,"code":1475,"language":661,"meta":301,"style":301},"from cellrank.kernels import RealTimeKernel\n\n# adata.obs[\"day\"] must contain numeric time labels (e.g., 0, 2, 4, 7)\nrtk = RealTimeKernel(adata, time_key=\"day\").compute_transition_matrix()\n\ng = cr.estimators.GPCCA(rtk)\ng.compute_macrostates(n_states=6, cluster_key=\"celltype\")\ng.predict_terminal_states()\ng.compute_fate_probabilities()\n",[1477],{"type":71,"tag":108,"props":1478,"children":1479},{"__ignoreMap":301},[1480,1488,1495,1503,1511,1518,1526,1534,1541],{"type":71,"tag":346,"props":1481,"children":1482},{"class":348,"line":349},[1483],{"type":71,"tag":346,"props":1484,"children":1485},{},[1486],{"type":76,"value":1487},"from cellrank.kernels import RealTimeKernel\n",{"type":71,"tag":346,"props":1489,"children":1490},{"class":348,"line":359},[1491],{"type":71,"tag":346,"props":1492,"children":1493},{"emptyLinePlaceholder":425},[1494],{"type":76,"value":428},{"type":71,"tag":346,"props":1496,"children":1497},{"class":348,"line":381},[1498],{"type":71,"tag":346,"props":1499,"children":1500},{},[1501],{"type":76,"value":1502},"# adata.obs[\"day\"] must contain numeric time labels (e.g., 0, 2, 4, 7)\n",{"type":71,"tag":346,"props":1504,"children":1505},{"class":348,"line":26},[1506],{"type":71,"tag":346,"props":1507,"children":1508},{},[1509],{"type":76,"value":1510},"rtk = RealTimeKernel(adata, time_key=\"day\").compute_transition_matrix()\n",{"type":71,"tag":346,"props":1512,"children":1513},{"class":348,"line":412},[1514],{"type":71,"tag":346,"props":1515,"children":1516},{"emptyLinePlaceholder":425},[1517],{"type":76,"value":428},{"type":71,"tag":346,"props":1519,"children":1520},{"class":348,"line":421},[1521],{"type":71,"tag":346,"props":1522,"children":1523},{},[1524],{"type":76,"value":1525},"g = cr.estimators.GPCCA(rtk)\n",{"type":71,"tag":346,"props":1527,"children":1528},{"class":348,"line":431},[1529],{"type":71,"tag":346,"props":1530,"children":1531},{},[1532],{"type":76,"value":1533},"g.compute_macrostates(n_states=6, cluster_key=\"celltype\")\n",{"type":71,"tag":346,"props":1535,"children":1536},{"class":348,"line":440},[1537],{"type":71,"tag":346,"props":1538,"children":1539},{},[1540],{"type":76,"value":1322},{"type":71,"tag":346,"props":1542,"children":1543},{"class":348,"line":463},[1544],{"type":71,"tag":346,"props":1545,"children":1546},{},[1547],{"type":76,"value":1330},{"type":71,"tag":1224,"props":1549,"children":1551},{"id":1550},"_5d-pseudotimekernel-dpt-directed",[1552],{"type":76,"value":1553},"5d. PseudotimeKernel (DPT-directed)",{"type":71,"tag":86,"props":1555,"children":1556},{},[1557],{"type":76,"value":1558},"Uses precomputed pseudotime to define directionality.",{"type":71,"tag":293,"props":1560,"children":1562},{"className":659,"code":1561,"language":661,"meta":301,"style":301},"from cellrank.kernels import PseudotimeKernel, ConnectivityKernel\n\n# Requires adata.obs[\"dpt_pseudotime\"] from sc.tl.dpt\npk = PseudotimeKernel(adata, time_key=\"dpt_pseudotime\").compute_transition_matrix()\nck = ConnectivityKernel(adata).compute_transition_matrix()\nkernel = 0.8 * pk + 0.2 * ck\n\ng = cr.estimators.GPCCA(kernel)\ng.compute_macrostates(n_states=4, cluster_key=\"celltype\")\ng.predict_terminal_states()\ng.compute_fate_probabilities()\n",[1563],{"type":71,"tag":108,"props":1564,"children":1565},{"__ignoreMap":301},[1566,1574,1581,1589,1597,1604,1612,1619,1626,1633,1640],{"type":71,"tag":346,"props":1567,"children":1568},{"class":348,"line":349},[1569],{"type":71,"tag":346,"props":1570,"children":1571},{},[1572],{"type":76,"value":1573},"from cellrank.kernels import PseudotimeKernel, ConnectivityKernel\n",{"type":71,"tag":346,"props":1575,"children":1576},{"class":348,"line":359},[1577],{"type":71,"tag":346,"props":1578,"children":1579},{"emptyLinePlaceholder":425},[1580],{"type":76,"value":428},{"type":71,"tag":346,"props":1582,"children":1583},{"class":348,"line":381},[1584],{"type":71,"tag":346,"props":1585,"children":1586},{},[1587],{"type":76,"value":1588},"# Requires adata.obs[\"dpt_pseudotime\"] from sc.tl.dpt\n",{"type":71,"tag":346,"props":1590,"children":1591},{"class":348,"line":26},[1592],{"type":71,"tag":346,"props":1593,"children":1594},{},[1595],{"type":76,"value":1596},"pk = PseudotimeKernel(adata, time_key=\"dpt_pseudotime\").compute_transition_matrix()\n",{"type":71,"tag":346,"props":1598,"children":1599},{"class":348,"line":412},[1600],{"type":71,"tag":346,"props":1601,"children":1602},{},[1603],{"type":76,"value":1275},{"type":71,"tag":346,"props":1605,"children":1606},{"class":348,"line":421},[1607],{"type":71,"tag":346,"props":1608,"children":1609},{},[1610],{"type":76,"value":1611},"kernel = 0.8 * pk + 0.2 * ck\n",{"type":71,"tag":346,"props":1613,"children":1614},{"class":348,"line":431},[1615],{"type":71,"tag":346,"props":1616,"children":1617},{"emptyLinePlaceholder":425},[1618],{"type":76,"value":428},{"type":71,"tag":346,"props":1620,"children":1621},{"class":348,"line":440},[1622],{"type":71,"tag":346,"props":1623,"children":1624},{},[1625],{"type":76,"value":1298},{"type":71,"tag":346,"props":1627,"children":1628},{"class":348,"line":463},[1629],{"type":71,"tag":346,"props":1630,"children":1631},{},[1632],{"type":76,"value":1447},{"type":71,"tag":346,"props":1634,"children":1635},{"class":348,"line":481},[1636],{"type":71,"tag":346,"props":1637,"children":1638},{},[1639],{"type":76,"value":1322},{"type":71,"tag":346,"props":1641,"children":1642},{"class":348,"line":504},[1643],{"type":71,"tag":346,"props":1644,"children":1645},{},[1646],{"type":76,"value":1330},{"type":71,"tag":1224,"props":1648,"children":1650},{"id":1649},"_5e-kernel-combination-rules",[1651],{"type":76,"value":1652},"5e. Kernel combination rules",{"type":71,"tag":293,"props":1654,"children":1656},{"className":659,"code":1655,"language":661,"meta":301,"style":301},"# All kernels support arithmetic combination after .compute_transition_matrix()\ncombined = 0.6 * vk + 0.2 * ck + 0.2 * pk  # weights must sum to 1\n\n# Inspect kernel quality\ncombined.plot_projection(basis=\"umap\")  # visualize transition arrows\n",[1657],{"type":71,"tag":108,"props":1658,"children":1659},{"__ignoreMap":301},[1660,1668,1676,1683,1691],{"type":71,"tag":346,"props":1661,"children":1662},{"class":348,"line":349},[1663],{"type":71,"tag":346,"props":1664,"children":1665},{},[1666],{"type":76,"value":1667},"# All kernels support arithmetic combination after .compute_transition_matrix()\n",{"type":71,"tag":346,"props":1669,"children":1670},{"class":348,"line":359},[1671],{"type":71,"tag":346,"props":1672,"children":1673},{},[1674],{"type":76,"value":1675},"combined = 0.6 * vk + 0.2 * ck + 0.2 * pk  # weights must sum to 1\n",{"type":71,"tag":346,"props":1677,"children":1678},{"class":348,"line":381},[1679],{"type":71,"tag":346,"props":1680,"children":1681},{"emptyLinePlaceholder":425},[1682],{"type":76,"value":428},{"type":71,"tag":346,"props":1684,"children":1685},{"class":348,"line":26},[1686],{"type":71,"tag":346,"props":1687,"children":1688},{},[1689],{"type":76,"value":1690},"# Inspect kernel quality\n",{"type":71,"tag":346,"props":1692,"children":1693},{"class":348,"line":412},[1694],{"type":71,"tag":346,"props":1695,"children":1696},{},[1697],{"type":76,"value":1698},"combined.plot_projection(basis=\"umap\")  # visualize transition arrows\n",{"type":71,"tag":311,"props":1700,"children":1702},{"id":1701},"_6-spatial-neighbors-squidpy",[1703],{"type":76,"value":1704},"6. Spatial neighbors (squidpy)",{"type":71,"tag":86,"props":1706,"children":1707},{},[1708],{"type":76,"value":1709},"For spatial transcriptomics, replace kNN with a spatial graph:",{"type":71,"tag":293,"props":1711,"children":1713},{"className":659,"code":1712,"language":661,"meta":301,"style":301},"import squidpy as sq\n\nsq.gr.spatial_neighbors(adata, coord_type=\"generic\", n_neighs=6)\n# Feed spatial connectivities into CellRank ConnectivityKernel\n",[1714],{"type":71,"tag":108,"props":1715,"children":1716},{"__ignoreMap":301},[1717,1725,1732,1740],{"type":71,"tag":346,"props":1718,"children":1719},{"class":348,"line":349},[1720],{"type":71,"tag":346,"props":1721,"children":1722},{},[1723],{"type":76,"value":1724},"import squidpy as sq\n",{"type":71,"tag":346,"props":1726,"children":1727},{"class":348,"line":359},[1728],{"type":71,"tag":346,"props":1729,"children":1730},{"emptyLinePlaceholder":425},[1731],{"type":76,"value":428},{"type":71,"tag":346,"props":1733,"children":1734},{"class":348,"line":381},[1735],{"type":71,"tag":346,"props":1736,"children":1737},{},[1738],{"type":76,"value":1739},"sq.gr.spatial_neighbors(adata, coord_type=\"generic\", n_neighs=6)\n",{"type":71,"tag":346,"props":1741,"children":1742},{"class":348,"line":26},[1743],{"type":71,"tag":346,"props":1744,"children":1745},{},[1746],{"type":76,"value":1747},"# Feed spatial connectivities into CellRank ConnectivityKernel\n",{"type":71,"tag":79,"props":1749,"children":1751},{"id":1750},"quick-reference",[1752],{"type":76,"value":1753},"Quick Reference",{"type":71,"tag":1755,"props":1756,"children":1757},"table",{},[1758,1782],{"type":71,"tag":1759,"props":1760,"children":1761},"thead",{},[1762],{"type":71,"tag":1763,"props":1764,"children":1765},"tr",{},[1766,1772,1777],{"type":71,"tag":1767,"props":1768,"children":1769},"th",{},[1770],{"type":76,"value":1771},"Task",{"type":71,"tag":1767,"props":1773,"children":1774},{},[1775],{"type":76,"value":1776},"Call",{"type":71,"tag":1767,"props":1778,"children":1779},{},[1780],{"type":76,"value":1781},"Output",{"type":71,"tag":1783,"props":1784,"children":1785},"tbody",{},[1786,1813,1835,1861,1886,1908,1934,1956,1986,2008,2034,2060,2082,2108,2130,2152,2173,2194,2216,2238,2264,2290,2316,2338],{"type":71,"tag":1763,"props":1787,"children":1788},{},[1789,1795,1804],{"type":71,"tag":1790,"props":1791,"children":1792},"td",{},[1793],{"type":76,"value":1794},"Diffusion map",{"type":71,"tag":1790,"props":1796,"children":1797},{},[1798],{"type":71,"tag":108,"props":1799,"children":1801},{"className":1800},[],[1802],{"type":76,"value":1803},"sc.tl.diffmap(adata)",{"type":71,"tag":1790,"props":1805,"children":1806},{},[1807],{"type":71,"tag":108,"props":1808,"children":1810},{"className":1809},[],[1811],{"type":76,"value":1812},".obsm['X_diffmap']",{"type":71,"tag":1763,"props":1814,"children":1815},{},[1816,1821,1830],{"type":71,"tag":1790,"props":1817,"children":1818},{},[1819],{"type":76,"value":1820},"Set root",{"type":71,"tag":1790,"props":1822,"children":1823},{},[1824],{"type":71,"tag":108,"props":1825,"children":1827},{"className":1826},[],[1828],{"type":76,"value":1829},"adata.uns['iroot'] = idx",{"type":71,"tag":1790,"props":1831,"children":1832},{},[1833],{"type":76,"value":1834},"—",{"type":71,"tag":1763,"props":1836,"children":1837},{},[1838,1843,1852],{"type":71,"tag":1790,"props":1839,"children":1840},{},[1841],{"type":76,"value":1842},"Pseudotime",{"type":71,"tag":1790,"props":1844,"children":1845},{},[1846],{"type":71,"tag":108,"props":1847,"children":1849},{"className":1848},[],[1850],{"type":76,"value":1851},"sc.tl.dpt(adata)",{"type":71,"tag":1790,"props":1853,"children":1854},{},[1855],{"type":71,"tag":108,"props":1856,"children":1858},{"className":1857},[],[1859],{"type":76,"value":1860},".obs['dpt_pseudotime']",{"type":71,"tag":1763,"props":1862,"children":1863},{},[1864,1868,1877],{"type":71,"tag":1790,"props":1865,"children":1866},{},[1867],{"type":76,"value":123},{"type":71,"tag":1790,"props":1869,"children":1870},{},[1871],{"type":71,"tag":108,"props":1872,"children":1874},{"className":1873},[],[1875],{"type":76,"value":1876},"sc.tl.paga(adata, groups='leiden')",{"type":71,"tag":1790,"props":1878,"children":1879},{},[1880],{"type":71,"tag":108,"props":1881,"children":1883},{"className":1882},[],[1884],{"type":76,"value":1885},".uns['paga']",{"type":71,"tag":1763,"props":1887,"children":1888},{},[1889,1894,1903],{"type":71,"tag":1790,"props":1890,"children":1891},{},[1892],{"type":76,"value":1893},"PAGA plot",{"type":71,"tag":1790,"props":1895,"children":1896},{},[1897],{"type":71,"tag":108,"props":1898,"children":1900},{"className":1899},[],[1901],{"type":76,"value":1902},"sc.pl.paga(adata, threshold=0.03)",{"type":71,"tag":1790,"props":1904,"children":1905},{},[1906],{"type":76,"value":1907},"figure (threshold=visual only)",{"type":71,"tag":1763,"props":1909,"children":1910},{},[1911,1916,1925],{"type":71,"tag":1790,"props":1912,"children":1913},{},[1914],{"type":76,"value":1915},"PAGA-init layout",{"type":71,"tag":1790,"props":1917,"children":1918},{},[1919],{"type":71,"tag":108,"props":1920,"children":1922},{"className":1921},[],[1923],{"type":76,"value":1924},"sc.tl.draw_graph(adata, init_pos='paga')",{"type":71,"tag":1790,"props":1926,"children":1927},{},[1928],{"type":71,"tag":108,"props":1929,"children":1931},{"className":1930},[],[1932],{"type":76,"value":1933},".obsm['X_draw_graph_fa']",{"type":71,"tag":1763,"props":1935,"children":1936},{},[1937,1942,1951],{"type":71,"tag":1790,"props":1938,"children":1939},{},[1940],{"type":76,"value":1941},"Merge loom",{"type":71,"tag":1790,"props":1943,"children":1944},{},[1945],{"type":71,"tag":108,"props":1946,"children":1948},{"className":1947},[],[1949],{"type":76,"value":1950},"scv.utils.merge(adata, ldata)",{"type":71,"tag":1790,"props":1952,"children":1953},{},[1954],{"type":76,"value":1955},"combined AnnData (inner-join on barcodes)",{"type":71,"tag":1763,"props":1957,"children":1958},{},[1959,1964,1981],{"type":71,"tag":1790,"props":1960,"children":1961},{},[1962],{"type":76,"value":1963},"Velocity preproc",{"type":71,"tag":1790,"props":1965,"children":1966},{},[1967,1973,1975],{"type":71,"tag":108,"props":1968,"children":1970},{"className":1969},[],[1971],{"type":76,"value":1972},"scv.pp.filter_and_normalize",{"type":76,"value":1974},"; ",{"type":71,"tag":108,"props":1976,"children":1978},{"className":1977},[],[1979],{"type":76,"value":1980},"scv.pp.moments",{"type":71,"tag":1790,"props":1982,"children":1983},{},[1984],{"type":76,"value":1985},"moment layers",{"type":71,"tag":1763,"props":1987,"children":1988},{},[1989,1994,2003],{"type":71,"tag":1790,"props":1990,"children":1991},{},[1992],{"type":76,"value":1993},"Dynamics fit",{"type":71,"tag":1790,"props":1995,"children":1996},{},[1997],{"type":71,"tag":108,"props":1998,"children":2000},{"className":1999},[],[2001],{"type":76,"value":2002},"scv.tl.recover_dynamics(adata)",{"type":71,"tag":1790,"props":2004,"children":2005},{},[2006],{"type":76,"value":2007},"fit params",{"type":71,"tag":1763,"props":2009,"children":2010},{},[2011,2016,2025],{"type":71,"tag":1790,"props":2012,"children":2013},{},[2014],{"type":76,"value":2015},"Velocity",{"type":71,"tag":1790,"props":2017,"children":2018},{},[2019],{"type":71,"tag":108,"props":2020,"children":2022},{"className":2021},[],[2023],{"type":76,"value":2024},"scv.tl.velocity(adata, mode='dynamical')",{"type":71,"tag":1790,"props":2026,"children":2027},{},[2028],{"type":71,"tag":108,"props":2029,"children":2031},{"className":2030},[],[2032],{"type":76,"value":2033},".layers['velocity']",{"type":71,"tag":1763,"props":2035,"children":2036},{},[2037,2042,2051],{"type":71,"tag":1790,"props":2038,"children":2039},{},[2040],{"type":76,"value":2041},"Velocity graph",{"type":71,"tag":1790,"props":2043,"children":2044},{},[2045],{"type":71,"tag":108,"props":2046,"children":2048},{"className":2047},[],[2049],{"type":76,"value":2050},"scv.tl.velocity_graph(adata)",{"type":71,"tag":1790,"props":2052,"children":2053},{},[2054],{"type":71,"tag":108,"props":2055,"children":2057},{"className":2056},[],[2058],{"type":76,"value":2059},".uns['velocity_graph']",{"type":71,"tag":1763,"props":2061,"children":2062},{},[2063,2068,2077],{"type":71,"tag":1790,"props":2064,"children":2065},{},[2066],{"type":76,"value":2067},"Stream plot",{"type":71,"tag":1790,"props":2069,"children":2070},{},[2071],{"type":71,"tag":108,"props":2072,"children":2074},{"className":2073},[],[2075],{"type":76,"value":2076},"scv.pl.velocity_embedding_stream(adata, basis='umap')",{"type":71,"tag":1790,"props":2078,"children":2079},{},[2080],{"type":76,"value":2081},"figure",{"type":71,"tag":1763,"props":2083,"children":2084},{},[2085,2090,2099],{"type":71,"tag":1790,"props":2086,"children":2087},{},[2088],{"type":76,"value":2089},"Latent time",{"type":71,"tag":1790,"props":2091,"children":2092},{},[2093],{"type":71,"tag":108,"props":2094,"children":2096},{"className":2095},[],[2097],{"type":76,"value":2098},"scv.tl.latent_time(adata)",{"type":71,"tag":1790,"props":2100,"children":2101},{},[2102],{"type":71,"tag":108,"props":2103,"children":2105},{"className":2104},[],[2106],{"type":76,"value":2107},".obs['latent_time']",{"type":71,"tag":1763,"props":2109,"children":2110},{},[2111,2116,2125],{"type":71,"tag":1790,"props":2112,"children":2113},{},[2114],{"type":76,"value":2115},"VelocityKernel",{"type":71,"tag":1790,"props":2117,"children":2118},{},[2119],{"type":71,"tag":108,"props":2120,"children":2122},{"className":2121},[],[2123],{"type":76,"value":2124},"VelocityKernel(adata).compute_transition_matrix()",{"type":71,"tag":1790,"props":2126,"children":2127},{},[2128],{"type":76,"value":2129},"kernel",{"type":71,"tag":1763,"props":2131,"children":2132},{},[2133,2138,2147],{"type":71,"tag":1790,"props":2134,"children":2135},{},[2136],{"type":76,"value":2137},"CytoTRACEKernel",{"type":71,"tag":1790,"props":2139,"children":2140},{},[2141],{"type":71,"tag":108,"props":2142,"children":2144},{"className":2143},[],[2145],{"type":76,"value":2146},"CytoTRACEKernel(adata).compute_transition_matrix()",{"type":71,"tag":1790,"props":2148,"children":2149},{},[2150],{"type":76,"value":2151},"kernel (no velocity needed)",{"type":71,"tag":1763,"props":2153,"children":2154},{},[2155,2160,2169],{"type":71,"tag":1790,"props":2156,"children":2157},{},[2158],{"type":76,"value":2159},"RealTimeKernel",{"type":71,"tag":1790,"props":2161,"children":2162},{},[2163],{"type":71,"tag":108,"props":2164,"children":2166},{"className":2165},[],[2167],{"type":76,"value":2168},"RealTimeKernel(adata, time_key=\"day\").compute_transition_matrix()",{"type":71,"tag":1790,"props":2170,"children":2171},{},[2172],{"type":76,"value":2129},{"type":71,"tag":1763,"props":2174,"children":2175},{},[2176,2181,2190],{"type":71,"tag":1790,"props":2177,"children":2178},{},[2179],{"type":76,"value":2180},"PseudotimeKernel",{"type":71,"tag":1790,"props":2182,"children":2183},{},[2184],{"type":71,"tag":108,"props":2185,"children":2187},{"className":2186},[],[2188],{"type":76,"value":2189},"PseudotimeKernel(adata, time_key=\"dpt_pseudotime\").compute_transition_matrix()",{"type":71,"tag":1790,"props":2191,"children":2192},{},[2193],{"type":76,"value":2129},{"type":71,"tag":1763,"props":2195,"children":2196},{},[2197,2202,2211],{"type":71,"tag":1790,"props":2198,"children":2199},{},[2200],{"type":76,"value":2201},"Combine kernels",{"type":71,"tag":1790,"props":2203,"children":2204},{},[2205],{"type":71,"tag":108,"props":2206,"children":2208},{"className":2207},[],[2209],{"type":76,"value":2210},"0.8 * vk + 0.2 * ck",{"type":71,"tag":1790,"props":2212,"children":2213},{},[2214],{"type":76,"value":2215},"combined kernel",{"type":71,"tag":1763,"props":2217,"children":2218},{},[2219,2224,2233],{"type":71,"tag":1790,"props":2220,"children":2221},{},[2222],{"type":76,"value":2223},"Estimator",{"type":71,"tag":1790,"props":2225,"children":2226},{},[2227],{"type":71,"tag":108,"props":2228,"children":2230},{"className":2229},[],[2231],{"type":76,"value":2232},"cr.estimators.GPCCA(kernel)",{"type":71,"tag":1790,"props":2234,"children":2235},{},[2236],{"type":76,"value":2237},"estimator",{"type":71,"tag":1763,"props":2239,"children":2240},{},[2241,2246,2255],{"type":71,"tag":1790,"props":2242,"children":2243},{},[2244],{"type":76,"value":2245},"Macrostates",{"type":71,"tag":1790,"props":2247,"children":2248},{},[2249],{"type":71,"tag":108,"props":2250,"children":2252},{"className":2251},[],[2253],{"type":76,"value":2254},"g.compute_macrostates(n_states=5, cluster_key=\"celltype\")",{"type":71,"tag":1790,"props":2256,"children":2257},{},[2258],{"type":71,"tag":108,"props":2259,"children":2261},{"className":2260},[],[2262],{"type":76,"value":2263},".macrostates",{"type":71,"tag":1763,"props":2265,"children":2266},{},[2267,2272,2281],{"type":71,"tag":1790,"props":2268,"children":2269},{},[2270],{"type":76,"value":2271},"Terminal states",{"type":71,"tag":1790,"props":2273,"children":2274},{},[2275],{"type":71,"tag":108,"props":2276,"children":2278},{"className":2277},[],[2279],{"type":76,"value":2280},"g.predict_terminal_states()",{"type":71,"tag":1790,"props":2282,"children":2283},{},[2284],{"type":71,"tag":108,"props":2285,"children":2287},{"className":2286},[],[2288],{"type":76,"value":2289},".terminal_states",{"type":71,"tag":1763,"props":2291,"children":2292},{},[2293,2298,2307],{"type":71,"tag":1790,"props":2294,"children":2295},{},[2296],{"type":76,"value":2297},"Fate probs",{"type":71,"tag":1790,"props":2299,"children":2300},{},[2301],{"type":71,"tag":108,"props":2302,"children":2304},{"className":2303},[],[2305],{"type":76,"value":2306},"g.compute_fate_probabilities()",{"type":71,"tag":1790,"props":2308,"children":2309},{},[2310],{"type":71,"tag":108,"props":2311,"children":2313},{"className":2312},[],[2314],{"type":76,"value":2315},".fate_probabilities",{"type":71,"tag":1763,"props":2317,"children":2318},{},[2319,2324,2333],{"type":71,"tag":1790,"props":2320,"children":2321},{},[2322],{"type":76,"value":2323},"Lineage drivers",{"type":71,"tag":1790,"props":2325,"children":2326},{},[2327],{"type":71,"tag":108,"props":2328,"children":2330},{"className":2329},[],[2331],{"type":76,"value":2332},"g.compute_lineage_drivers(lineages=[\"Mono\"], use_raw=False)",{"type":71,"tag":1790,"props":2334,"children":2335},{},[2336],{"type":76,"value":2337},"DataFrame",{"type":71,"tag":1763,"props":2339,"children":2340},{},[2341,2346,2355],{"type":71,"tag":1790,"props":2342,"children":2343},{},[2344],{"type":76,"value":2345},"Spatial graph",{"type":71,"tag":1790,"props":2347,"children":2348},{},[2349],{"type":71,"tag":108,"props":2350,"children":2352},{"className":2351},[],[2353],{"type":76,"value":2354},"sq.gr.spatial_neighbors(adata)",{"type":71,"tag":1790,"props":2356,"children":2357},{},[2358],{"type":71,"tag":108,"props":2359,"children":2361},{"className":2360},[],[2362],{"type":76,"value":2363},".obsp['spatial_*']",{"type":71,"tag":79,"props":2365,"children":2367},{"id":2366},"common-mistakes",[2368],{"type":76,"value":2369},"Common Mistakes",{"type":71,"tag":194,"props":2371,"children":2372},{},[2373,2417,2467,2528,2572,2630,2672,2716,2753,2800,2835],{"type":71,"tag":96,"props":2374,"children":2375},{},[2376,2381,2383,2389,2391,2397,2402,2404,2410,2415],{"type":71,"tag":100,"props":2377,"children":2378},{},[2379],{"type":76,"value":2380},"Wrong:",{"type":76,"value":2382}," Calling ",{"type":71,"tag":108,"props":2384,"children":2386},{"className":2385},[],[2387],{"type":76,"value":2388},"sc.tl.dpt",{"type":76,"value":2390}," without setting ",{"type":71,"tag":108,"props":2392,"children":2394},{"className":2393},[],[2395],{"type":76,"value":2396},"adata.uns['iroot']",{"type":71,"tag":100,"props":2398,"children":2399},{},[2400],{"type":76,"value":2401},"Right:",{"type":76,"value":2403}," Set the root cell index before computing DPT: ",{"type":71,"tag":108,"props":2405,"children":2407},{"className":2406},[],[2408],{"type":76,"value":2409},"adata.uns['iroot'] = np.flatnonzero(adata.obs['celltype'] == root_cluster)[0]",{"type":71,"tag":100,"props":2411,"children":2412},{},[2413],{"type":76,"value":2414},"Why:",{"type":76,"value":2416}," Without a root, pseudotime has no direction and results are meaningless",{"type":71,"tag":96,"props":2418,"children":2419},{},[2420,2424,2426,2431,2432,2437,2439,2443,2445,2451,2453,2459,2461,2465],{"type":71,"tag":100,"props":2421,"children":2422},{},[2423],{"type":76,"value":2380},{"type":76,"value":2425}," Running scVelo velocity without ",{"type":71,"tag":108,"props":2427,"children":2429},{"className":2428},[],[2430],{"type":76,"value":171},{"type":76,"value":173},{"type":71,"tag":108,"props":2433,"children":2435},{"className":2434},[],[2436],{"type":76,"value":179},{"type":76,"value":2438}," layers in the AnnData\n",{"type":71,"tag":100,"props":2440,"children":2441},{},[2442],{"type":76,"value":2401},{"type":76,"value":2444}," Check ",{"type":71,"tag":108,"props":2446,"children":2448},{"className":2447},[],[2449],{"type":76,"value":2450},"adata.layers.keys()",{"type":76,"value":2452}," after ",{"type":71,"tag":108,"props":2454,"children":2456},{"className":2455},[],[2457],{"type":76,"value":2458},"scv.utils.merge",{"type":76,"value":2460},"; ensure both layers exist with matching barcodes\n",{"type":71,"tag":100,"props":2462,"children":2463},{},[2464],{"type":76,"value":2414},{"type":76,"value":2466}," Velocity computation requires both layers; missing layers cause errors or silent failures",{"type":71,"tag":96,"props":2468,"children":2469},{},[2470,2474,2476,2482,2484,2490,2492,2498,2502,2504,2509,2511,2516,2520,2522],{"type":71,"tag":100,"props":2471,"children":2472},{},[2473],{"type":76,"value":2380},{"type":76,"value":2475}," Using ",{"type":71,"tag":108,"props":2477,"children":2479},{"className":2478},[],[2480],{"type":76,"value":2481},"mode='dynamical'",{"type":76,"value":2483}," in ",{"type":71,"tag":108,"props":2485,"children":2487},{"className":2486},[],[2488],{"type":76,"value":2489},"scv.tl.velocity",{"type":76,"value":2491}," without first running ",{"type":71,"tag":108,"props":2493,"children":2495},{"className":2494},[],[2496],{"type":76,"value":2497},"scv.tl.recover_dynamics",{"type":71,"tag":100,"props":2499,"children":2500},{},[2501],{"type":76,"value":2401},{"type":76,"value":2503}," Always run ",{"type":71,"tag":108,"props":2505,"children":2507},{"className":2506},[],[2508],{"type":76,"value":2002},{"type":76,"value":2510}," before ",{"type":71,"tag":108,"props":2512,"children":2514},{"className":2513},[],[2515],{"type":76,"value":2024},{"type":71,"tag":100,"props":2517,"children":2518},{},[2519],{"type":76,"value":2414},{"type":76,"value":2521}," The dynamical model needs per-gene rate parameters that are only computed by ",{"type":71,"tag":108,"props":2523,"children":2525},{"className":2524},[],[2526],{"type":76,"value":2527},"recover_dynamics",{"type":71,"tag":96,"props":2529,"children":2530},{},[2531,2535,2537,2543,2545,2551,2553,2557,2559,2564,2566,2570],{"type":71,"tag":100,"props":2532,"children":2533},{},[2534],{"type":76,"value":2380},{"type":76,"value":2536}," Computing ",{"type":71,"tag":108,"props":2538,"children":2540},{"className":2539},[],[2541],{"type":76,"value":2542},"scv.tl.latent_time",{"type":76,"value":2544}," after running velocity in ",{"type":71,"tag":108,"props":2546,"children":2548},{"className":2547},[],[2549],{"type":76,"value":2550},"stochastic",{"type":76,"value":2552}," mode\n",{"type":71,"tag":100,"props":2554,"children":2555},{},[2556],{"type":76,"value":2401},{"type":76,"value":2558}," Use ",{"type":71,"tag":108,"props":2560,"children":2562},{"className":2561},[],[2563],{"type":76,"value":2481},{"type":76,"value":2565}," for velocity if you need latent time\n",{"type":71,"tag":100,"props":2567,"children":2568},{},[2569],{"type":76,"value":2414},{"type":76,"value":2571}," Latent time is only defined for the dynamical model; stochastic mode does not produce the required parameters",{"type":71,"tag":96,"props":2573,"children":2574},{},[2575,2579,2580,2585,2587,2592,2594,2598,2600,2606,2608,2612,2614,2620,2622,2628],{"type":71,"tag":100,"props":2576,"children":2577},{},[2578],{"type":76,"value":2380},{"type":76,"value":2382},{"type":71,"tag":108,"props":2581,"children":2583},{"className":2582},[],[2584],{"type":76,"value":2489},{"type":76,"value":2586}," without running ",{"type":71,"tag":108,"props":2588,"children":2590},{"className":2589},[],[2591],{"type":76,"value":1980},{"type":76,"value":2593}," first\n",{"type":71,"tag":100,"props":2595,"children":2596},{},[2597],{"type":76,"value":2401},{"type":76,"value":2599}," Run ",{"type":71,"tag":108,"props":2601,"children":2603},{"className":2602},[],[2604],{"type":76,"value":2605},"scv.pp.moments(adata, n_pcs=30, n_neighbors=30)",{"type":76,"value":2607}," before velocity computation\n",{"type":71,"tag":100,"props":2609,"children":2610},{},[2611],{"type":76,"value":2414},{"type":76,"value":2613}," Moments (",{"type":71,"tag":108,"props":2615,"children":2617},{"className":2616},[],[2618],{"type":76,"value":2619},"Ms",{"type":76,"value":2621},", ",{"type":71,"tag":108,"props":2623,"children":2625},{"className":2624},[],[2626],{"type":76,"value":2627},"Mu",{"type":76,"value":2629}," layers) are required inputs for velocity estimation",{"type":71,"tag":96,"props":2631,"children":2632},{},[2633,2637,2639,2645,2647,2651,2652,2658,2660,2666,2670],{"type":71,"tag":100,"props":2634,"children":2635},{},[2636],{"type":76,"value":2380},{"type":76,"value":2638}," Running ",{"type":71,"tag":108,"props":2640,"children":2642},{"className":2641},[],[2643],{"type":76,"value":2644},"sc.tl.paga",{"type":76,"value":2646}," before computing cluster labels\n",{"type":71,"tag":100,"props":2648,"children":2649},{},[2650],{"type":76,"value":2401},{"type":76,"value":2599},{"type":71,"tag":108,"props":2653,"children":2655},{"className":2654},[],[2656],{"type":76,"value":2657},"sc.tl.leiden",{"type":76,"value":2659}," (or equivalent clustering) first; pass the cluster key via ",{"type":71,"tag":108,"props":2661,"children":2663},{"className":2662},[],[2664],{"type":76,"value":2665},"groups=",{"type":71,"tag":100,"props":2667,"children":2668},{},[2669],{"type":76,"value":2414},{"type":76,"value":2671}," PAGA computes connectivity between existing groups; without clusters it has nothing to connect",{"type":71,"tag":96,"props":2673,"children":2674},{},[2675,2679,2681,2687,2689,2695,2697,2701,2703,2708,2710,2714],{"type":71,"tag":100,"props":2676,"children":2677},{},[2678],{"type":76,"value":2380},{"type":76,"value":2680}," Thinking the ",{"type":71,"tag":108,"props":2682,"children":2684},{"className":2683},[],[2685],{"type":76,"value":2686},"threshold",{"type":76,"value":2688}," parameter in ",{"type":71,"tag":108,"props":2690,"children":2692},{"className":2691},[],[2693],{"type":76,"value":2694},"sc.pl.paga()",{"type":76,"value":2696}," affects the underlying graph\n",{"type":71,"tag":100,"props":2698,"children":2699},{},[2700],{"type":76,"value":2401},{"type":76,"value":2702}," Understand that ",{"type":71,"tag":108,"props":2704,"children":2706},{"className":2705},[],[2707],{"type":76,"value":2686},{"type":76,"value":2709}," is purely visual — it controls which edges are drawn, not computed\n",{"type":71,"tag":100,"props":2711,"children":2712},{},[2713],{"type":76,"value":2414},{"type":76,"value":2715}," Misinterpreting this leads to incorrect claims about cluster connectivity",{"type":71,"tag":96,"props":2717,"children":2718},{},[2719,2723,2725,2731,2733,2737,2739,2745,2747,2751],{"type":71,"tag":100,"props":2720,"children":2721},{},[2722],{"type":76,"value":2380},{"type":76,"value":2724}," Re-running ",{"type":71,"tag":108,"props":2726,"children":2728},{"className":2727},[],[2729],{"type":76,"value":2730},"sc.pp.neighbors",{"type":76,"value":2732}," after computing velocity graph or CellRank transition matrices\n",{"type":71,"tag":100,"props":2734,"children":2735},{},[2736],{"type":76,"value":2401},{"type":76,"value":2738}," If neighbors must change, recompute ",{"type":71,"tag":108,"props":2740,"children":2742},{"className":2741},[],[2743],{"type":76,"value":2744},"velocity_graph",{"type":76,"value":2746}," and CellRank kernels afterward\n",{"type":71,"tag":100,"props":2748,"children":2749},{},[2750],{"type":76,"value":2414},{"type":76,"value":2752}," Velocity graph and transition matrices depend on the neighbor graph; changing it silently invalidates them",{"type":71,"tag":96,"props":2754,"children":2755},{},[2756,2760,2761,2767,2769,2775,2779,2780,2786,2788,2792,2793,2798],{"type":71,"tag":100,"props":2757,"children":2758},{},[2759],{"type":76,"value":2380},{"type":76,"value":2475},{"type":71,"tag":108,"props":2762,"children":2764},{"className":2763},[],[2765],{"type":76,"value":2766},"n_cells",{"type":76,"value":2768}," parameter in CellRank v2's ",{"type":71,"tag":108,"props":2770,"children":2772},{"className":2771},[],[2773],{"type":76,"value":2774},"compute_macrostates()",{"type":71,"tag":100,"props":2776,"children":2777},{},[2778],{"type":76,"value":2401},{"type":76,"value":2558},{"type":71,"tag":108,"props":2781,"children":2783},{"className":2782},[],[2784],{"type":76,"value":2785},"n_states",{"type":76,"value":2787}," — the v2 API renamed this parameter\n",{"type":71,"tag":100,"props":2789,"children":2790},{},[2791],{"type":76,"value":2414},{"type":76,"value":966},{"type":71,"tag":108,"props":2794,"children":2796},{"className":2795},[],[2797],{"type":76,"value":2766},{"type":76,"value":2799}," was v1 syntax and will raise an error or be silently ignored in v2",{"type":71,"tag":96,"props":2801,"children":2802},{},[2803,2807,2808,2814,2816,2820,2821,2827,2829,2833],{"type":71,"tag":100,"props":2804,"children":2805},{},[2806],{"type":76,"value":2380},{"type":76,"value":2382},{"type":71,"tag":108,"props":2809,"children":2811},{"className":2810},[],[2812],{"type":76,"value":2813},"predict_terminal_states()",{"type":76,"value":2815}," without first inspecting macrostates\n",{"type":71,"tag":100,"props":2817,"children":2818},{},[2819],{"type":76,"value":2401},{"type":76,"value":2503},{"type":71,"tag":108,"props":2822,"children":2824},{"className":2823},[],[2825],{"type":76,"value":2826},"g.plot_macrostates()",{"type":76,"value":2828}," and review coarse-grained transitions before predicting terminals\n",{"type":71,"tag":100,"props":2830,"children":2831},{},[2832],{"type":76,"value":2414},{"type":76,"value":2834}," Terminal state prediction depends on macrostate quality; garbage macrostates produce garbage fate maps",{"type":71,"tag":96,"props":2836,"children":2837},{},[2838,2842,2844,2848,2850,2854],{"type":71,"tag":100,"props":2839,"children":2840},{},[2841],{"type":76,"value":2380},{"type":76,"value":2843}," Forcing velocity-based analysis when velocity arrows look random or incoherent\n",{"type":71,"tag":100,"props":2845,"children":2846},{},[2847],{"type":76,"value":2401},{"type":76,"value":2849}," Switch to CytoTRACEKernel or PseudotimeKernel when velocity signal is absent\n",{"type":71,"tag":100,"props":2851,"children":2852},{},[2853],{"type":76,"value":2414},{"type":76,"value":2855}," Random velocity arrows indicate the data lacks kinetic signal; forcing velocity produces meaningless trajectories",{"type":71,"tag":79,"props":2857,"children":2859},{"id":2858},"references",[2860],{"type":76,"value":2861},"References",{"type":71,"tag":194,"props":2863,"children":2864},{},[2865,2878,2889,2900,2911],{"type":71,"tag":96,"props":2866,"children":2867},{},[2868,2870],{"type":76,"value":2869},"CellRank 2: Weiler et al. Nat Methods 2024, ",{"type":71,"tag":2871,"props":2872,"children":2876},"a",{"href":2873,"rel":2874},"https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41592-023-02088-9",[2875],"nofollow",[2877],{"type":76,"value":2873},{"type":71,"tag":96,"props":2879,"children":2880},{},[2881,2883],{"type":76,"value":2882},"scVelo: Bergen et al. Nat Biotechnol 2020, ",{"type":71,"tag":2871,"props":2884,"children":2887},{"href":2885,"rel":2886},"https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41587-020-0591-3",[2875],[2888],{"type":76,"value":2885},{"type":71,"tag":96,"props":2890,"children":2891},{},[2892,2894],{"type":76,"value":2893},"CellRank: Lange et al. Nat Methods 2022, ",{"type":71,"tag":2871,"props":2895,"children":2898},{"href":2896,"rel":2897},"https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41592-021-01346-6",[2875],[2899],{"type":76,"value":2896},{"type":71,"tag":96,"props":2901,"children":2902},{},[2903,2905],{"type":76,"value":2904},"PAGA: Wolf et al. Genome Biol 2019, ",{"type":71,"tag":2871,"props":2906,"children":2909},{"href":2907,"rel":2908},"https:\u002F\u002Fdoi.org\u002F10.1186\u002Fs13059-019-1663-x",[2875],[2910],{"type":76,"value":2907},{"type":71,"tag":96,"props":2912,"children":2913},{},[2914,2916],{"type":76,"value":2915},"velocyto: La Manno et al. Nature 2018, ",{"type":71,"tag":2871,"props":2917,"children":2920},{"href":2918,"rel":2919},"https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41586-018-0414-6",[2875],[2921],{"type":76,"value":2918},{"type":71,"tag":2923,"props":2924,"children":2925},"style",{},[2926],{"type":76,"value":2927},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2929,"total":3107},[2930,2951,2972,2982,2995,3008,3018,3028,3049,3064,3079,3094],{"slug":2931,"name":2931,"fn":2932,"description":2933,"org":2934,"tags":2935,"stars":2948,"repoUrl":2949,"updatedAt":2950},"agentcore-investigation","investigate Bedrock AgentCore runtime sessions","Investigate Bedrock AgentCore runtime sessions via CloudWatch Logs Insights — resolve session\u002Ftrace IDs, query OTEL spans, filter noise, build timelines. Use when debugging AgentCore agent sessions, tracing tool calls, or analyzing latency.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2936,2939,2942,2945],{"name":2937,"slug":2938,"type":16},"AWS","aws",{"name":2940,"slug":2941,"type":16},"Debugging","debugging",{"name":2943,"slug":2944,"type":16},"Logs","logs",{"name":2946,"slug":2947,"type":16},"Observability","observability",9427,"https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fmcp","2026-07-12T08:37:22.601527",{"slug":2952,"name":2953,"fn":2954,"description":2955,"org":2956,"tags":2957,"stars":2948,"repoUrl":2949,"updatedAt":2971},"amazon-aurora-dsql","amazon aurora dsql","build applications with Aurora DSQL","Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, FK replacement code generation, OCC retry patterns, ORM migration (Django\u002FHibernate\u002FRails), DDL operations, query plan explainability, SQL compatibility validation, and bulk data loading. Triggers on phrases like: DSQL, Aurora DSQL, create DSQL table, DSQL schema, migrate to DSQL, distributed SQL database, serverless PostgreSQL-compatible database, DSQL query plan, DSQL EXPLAIN ANALYZE, why is my DSQL query slow, DSQL foreign key, DSQL OCC retry, DSQL multi-region, load into DSQL, load CSV into DSQL, bulk load DSQL, aurora-dsql-loader.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2958,2961,2962,2965,2968],{"name":2959,"slug":2960,"type":16},"Aurora","aurora",{"name":2937,"slug":2938,"type":16},{"name":2963,"slug":2964,"type":16},"Database","database",{"name":2966,"slug":2967,"type":16},"Serverless","serverless",{"name":2969,"slug":2970,"type":16},"SQL","sql","2026-07-12T08:36:45.053393",{"slug":2973,"name":2974,"fn":2954,"description":2955,"org":2975,"tags":2976,"stars":2948,"repoUrl":2949,"updatedAt":2981},"aurora-dsql","aurora dsql",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2977,2978,2979,2980],{"name":2937,"slug":2938,"type":16},{"name":2963,"slug":2964,"type":16},{"name":2966,"slug":2967,"type":16},{"name":2969,"slug":2970,"type":16},"2026-07-12T08:36:42.694299",{"slug":2983,"name":2984,"fn":2954,"description":2955,"org":2985,"tags":2986,"stars":2948,"repoUrl":2949,"updatedAt":2994},"aws-dsql","aws dsql",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2987,2988,2989,2992,2993],{"name":2937,"slug":2938,"type":16},{"name":2963,"slug":2964,"type":16},{"name":2990,"slug":2991,"type":16},"Migration","migration",{"name":2966,"slug":2967,"type":16},{"name":2969,"slug":2970,"type":16},"2026-07-12T08:36:38.584057",{"slug":2996,"name":2997,"fn":2954,"description":2955,"org":2998,"tags":2999,"stars":2948,"repoUrl":2949,"updatedAt":3007},"distributed-postgres","distributed postgres",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3000,3001,3002,3005,3006],{"name":2937,"slug":2938,"type":16},{"name":2963,"slug":2964,"type":16},{"name":3003,"slug":3004,"type":16},"PostgreSQL","postgresql",{"name":2966,"slug":2967,"type":16},{"name":2969,"slug":2970,"type":16},"2026-07-12T08:36:46.530743",{"slug":3009,"name":3010,"fn":2954,"description":2955,"org":3011,"tags":3012,"stars":2948,"repoUrl":2949,"updatedAt":3017},"distributed-sql","distributed sql",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3013,3014,3015,3016],{"name":2937,"slug":2938,"type":16},{"name":2963,"slug":2964,"type":16},{"name":2966,"slug":2967,"type":16},{"name":2969,"slug":2970,"type":16},"2026-07-12T08:36:48.104182",{"slug":3019,"name":3019,"fn":2954,"description":2955,"org":3020,"tags":3021,"stars":2948,"repoUrl":2949,"updatedAt":3027},"dsql",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3022,3023,3024,3025,3026],{"name":2937,"slug":2938,"type":16},{"name":2963,"slug":2964,"type":16},{"name":2990,"slug":2991,"type":16},{"name":2966,"slug":2967,"type":16},{"name":2969,"slug":2970,"type":16},"2026-07-12T08:36:36.374512",{"slug":3029,"name":3029,"fn":3030,"description":3031,"org":3032,"tags":3033,"stars":3046,"repoUrl":3047,"updatedAt":3048},"cost-efficiency-analyzer","analyze cost efficiency and expenses","Analyzes cost structure, cost efficiency, and expense management from P&L data. Use when the user asks about costs, expenses, COGS, operating expenses, cost ratios, cost control, spending efficiency, margin compression from cost side, or wants to understand where money is going. Also use for \"are we spending too much\", \"cost breakdown\", \"expense analysis\", or \"how efficient are our operations\". NOT for revenue or top-line analysis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3034,3037,3040,3043],{"name":3035,"slug":3036,"type":16},"Accounting","accounting",{"name":3038,"slug":3039,"type":16},"Analytics","analytics",{"name":3041,"slug":3042,"type":16},"Cost Optimization","cost-optimization",{"name":3044,"slug":3045,"type":16},"Finance","finance",3176,"https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fagentcore-samples","2026-07-12T08:40:03.29555",{"slug":3050,"name":3050,"fn":3051,"description":3052,"org":3053,"tags":3054,"stars":3046,"repoUrl":3047,"updatedAt":3063},"executive-financial-briefing","generate executive financial briefings","Generates a concise executive-level financial briefing or summary suitable for a CEO, CFO, or board presentation. Use when the user asks for a summary, briefing, executive summary, board update, financial overview, financial health check, or \"how is the business doing\". Covers the full P&L picture in one page. Also use for \"give me the highlights\", \"what do I need to know\", or \"quick financial update\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3055,3056,3057,3060],{"name":2937,"slug":2938,"type":16},{"name":3044,"slug":3045,"type":16},{"name":3058,"slug":3059,"type":16},"Management","management",{"name":3061,"slug":3062,"type":16},"Reporting","reporting","2026-07-12T08:40:02.066471",{"slug":3065,"name":3065,"fn":3066,"description":3067,"org":3068,"tags":3069,"stars":3046,"repoUrl":3047,"updatedAt":3078},"multi-quarter-trend-analysis","analyze multi-quarter financial trends","Analyzes financial trends across multiple quarters by comparing P&L metrics over time. Use when the user wants to see trends, patterns, trajectories, or directional movement across 3 or more quarters. Also use for \"how are we trending\", \"show me the trend\", \"track performance over time\", \"quarter over quarter comparison across all quarters\", or any multi-period longitudinal analysis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3070,3071,3072,3075],{"name":3038,"slug":3039,"type":16},{"name":3044,"slug":3045,"type":16},{"name":3073,"slug":3074,"type":16},"Financial Statements","financial-statements",{"name":3076,"slug":3077,"type":16},"Variance Analysis","variance-analysis","2026-07-12T08:40:00.79141",{"slug":3080,"name":3080,"fn":3081,"description":3082,"org":3083,"tags":3084,"stars":3046,"repoUrl":3047,"updatedAt":3093},"pdf","process and manipulate PDF documents","Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text\u002Ftables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting\u002Fdecrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3085,3088,3091],{"name":3086,"slug":3087,"type":16},"Automation","automation",{"name":3089,"slug":3090,"type":16},"Documents","documents",{"name":3092,"slug":3080,"type":16},"PDF","2026-07-12T08:41:44.135656",{"slug":3095,"name":3095,"fn":3096,"description":3097,"org":3098,"tags":3099,"stars":3046,"repoUrl":3047,"updatedAt":3106},"quarterly-kpi-calculator","calculate quarterly financial KPIs","Calculates quarterly financial KPIs from P&L data. P&L figures can be provided directly by the user or fetched from the financial data MCP server. Use when the user wants KPI calculations such as Gross Margin %, EBITDA Margin %, Operating Expense Ratio, or Revenue Growth % QoQ. Also use for quarterly performance review, P&L analysis, or interpreting financial ratios against benchmarks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3100,3101,3102,3103],{"name":3035,"slug":3036,"type":16},{"name":14,"slug":15,"type":16},{"name":3044,"slug":3045,"type":16},{"name":3104,"slug":3105,"type":16},"KPI","kpi","2026-07-12T08:39:59.54971",150,{"items":3109,"total":3202},[3110,3128,3141,3155,3166,3179,3192],{"slug":3111,"name":3111,"fn":3112,"description":3113,"org":3114,"tags":3115,"stars":26,"repoUrl":27,"updatedAt":3127},"aws-genai-ml-architect","design AWS GenAI and ML architectures","Reasoning skill for designing AWS GenAI and ML architectures for healthcare and life sciences workloads. Use when the user asks to choose between SageMaker and Bedrock, design a RAG system over medical literature, architect clinical NLP or medical imaging inference, plan genomics or drug discovery pipelines on AWS, address HIPAA\u002FPHI compliance in ML systems, design MLOps for regulated clinical models, or optimize cost for HCLS ML workloads. Triggers include \"AWS architecture\", \"SageMaker vs Bedrock\", \"HIPAA ML\", \"clinical RAG\", \"medical imaging inference\", \"genomics on AWS\", \"PHI training\", \"MLOps healthcare\", \"Bedrock guardrails\", \"HealthLake\", \"HCLS cloud architecture\", \"BAA compliance\", \"SageMaker endpoint\", \"Bedrock knowledge base\", \"clinical NLP on AWS\", \"FDA SaMD on AWS\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3116,3119,3120,3123,3124],{"name":3117,"slug":3118,"type":16},"Architecture","architecture",{"name":2937,"slug":2938,"type":16},{"name":3121,"slug":3122,"type":16},"Healthcare","healthcare",{"name":18,"slug":19,"type":16},{"name":3125,"slug":3126,"type":16},"LLM","llm","2026-07-12T08:38:07.975937",{"slug":3129,"name":3129,"fn":3130,"description":3131,"org":3132,"tags":3133,"stars":26,"repoUrl":27,"updatedAt":3140},"biomarker-discovery","guide biomarker discovery and validation","Reason about biomarker discovery and validation in HCLS — classifying biomarker intent, choosing feature-selection and cross-validation strategies, avoiding leakage, and planning external replication. Use when the user asks to discover, develop, or validate a biomarker; select features from high-dimensional omics or clinical data; design a validation study; choose evaluation metrics; justify sample size; combine multi-omics signals; or assess clinical utility. Triggers include \"discover a biomarker\", \"validate biomarker\", \"prognostic vs predictive\", \"feature selection\", \"LASSO vs elastic net\", \"nested cross-validation\", \"data leakage\", \"C-index\", \"time-dependent AUC\", \"decision curve analysis\", \"external validation cohort\", \"events per variable\", \"optimism-corrected\", \"multi-omics integration\", \"clinical utility of a biomarker\", \"is this biomarker ready\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3134,3135,3136,3137],{"name":2937,"slug":2938,"type":16},{"name":21,"slug":22,"type":16},{"name":18,"slug":19,"type":16},{"name":3138,"slug":3139,"type":16},"Research","research","2026-07-12T08:37:49.295301",{"slug":3142,"name":3142,"fn":3143,"description":3144,"org":3145,"tags":3146,"stars":26,"repoUrl":27,"updatedAt":3154},"cdisc-compliance","reason about CDISC SDTM and ADaM implementation","Reason about CDISC SDTM and ADaM implementation for regulatory submissions. Use when the user asks about SDTM domain mapping, ADaM dataset design, controlled terminology versioning, define.xml completeness, FDA or PMDA submission requirements, query prioritization by clinical impact, SUPPQUAL usage, or CDISC compliance review. Triggers include \"SDTM mapping\", \"ADaM dataset\", \"CDISC compliance\", \"controlled terminology\", \"define.xml\", \"FDA submission data\", \"PMDA submission\", \"SDTM domain\", \"ADSL\", \"ADAE\", \"ADLB\", \"BDS structure\", \"SUPPQUAL\", \"RELREC\", \"value-level metadata\", \"CDISC CT\", \"regulatory submission data standards\", \"eCTD datasets\", \"SDTM 3.3\", \"ADaM 1.1\", \"query prioritization\", \"clinical data review\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3147,3150,3151],{"name":3148,"slug":3149,"type":16},"Clinical Trials","clinical-trials",{"name":18,"slug":19,"type":16},{"name":3152,"slug":3153,"type":16},"Regulatory Compliance","regulatory-compliance","2026-07-12T08:37:33.35594",{"slug":3156,"name":3156,"fn":3157,"description":3158,"org":3159,"tags":3160,"stars":26,"repoUrl":27,"updatedAt":3165},"cell-type-annotation","annotate single-cell RNA-seq clusters","Generate code to assign cell type labels to single-cell RNA-seq clusters using CellTypist, SingleR, marker-based annotation, or reference label transfer (scANVI\u002Fingest). Triggers on requests to \"annotate cell types\", \"label clusters\", \"run CellTypist\", \"SingleR annotation\", \"marker gene dotplot\", \"transfer labels from reference atlas\", \"cell identity\", \"automated annotation\", \"reference mapping\", \"scANVI label transfer\", \"canonical markers\", \"immune cell types\", \"hierarchical annotation\", \"majority voting CellTypist\", \"over-clustering annotation\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3161,3162,3163,3164],{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},{"name":18,"slug":19,"type":16},{"name":24,"slug":25,"type":16},"2026-07-12T08:38:05.443454",{"slug":3167,"name":3167,"fn":3168,"description":3169,"org":3170,"tags":3171,"stars":26,"repoUrl":27,"updatedAt":3178},"cheminformatics","calculate molecular properties with RDKit","Cheminformatics pipeline for small-molecule property calculation, filtering, and similarity analysis using RDKit. Use when the user asks to compute molecular descriptors, filter compounds by Lipinski or Veber rules, detect PAINS, calculate fingerprint similarity, run matched molecular pair analysis, generate ADMET descriptors, or process SMILES. Triggers include \"RDKit\", \"molecular descriptors\", \"Lipinski\", \"rule of five\", \"Veber\", \"PAINS\", \"pan-assay interference\", \"Morgan fingerprint\", \"Tanimoto\", \"fingerprint similarity\", \"matched molecular pair\", \"MMP\", \"mmpdb\", \"ADMET\", \"druglikeness\", \"SMILES\", \"cheminformatics\", \"compound filtering\", \"chemical similarity\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3172,3173,3176,3177],{"name":21,"slug":22,"type":16},{"name":3174,"slug":3175,"type":16},"Chemistry","chemistry",{"name":14,"slug":15,"type":16},{"name":3138,"slug":3139,"type":16},"2026-07-12T08:37:28.334619",{"slug":3180,"name":3180,"fn":3181,"description":3182,"org":3183,"tags":3184,"stars":26,"repoUrl":27,"updatedAt":3191},"claims-analytics","analyze and parse healthcare claims data","Pipeline skill for healthcare claims data parsing, analysis, and fraud detection. Use when the user asks to parse X12 837 or 835 claim files, manipulate ICD-10 CPT or HCPCS codes, detect billing pattern anomalies, profile providers against specialty peers, identify outlier billing behavior, validate NCCI edits programmatically, detect duplicate claims, run Benford's law analysis on charges, build claims data pipelines, or analyze E&M code distributions. Triggers include \"parse X12 837\", \"parse 835\", \"claims SQL\", \"ICD-10 manipulation\", \"CPT code analysis\", \"provider profiling\", \"billing outlier\", \"NCCI validation code\", \"duplicate claim detection\", \"Benford's law charges\", \"claims ETL\", \"E&M distribution analysis\", \"claims analytics pipeline\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3185,3186,3187,3190],{"name":14,"slug":15,"type":16},{"name":3121,"slug":3122,"type":16},{"name":3188,"slug":3189,"type":16},"Insurance","insurance",{"name":18,"slug":19,"type":16},"2026-07-12T08:37:34.815088",{"slug":3193,"name":3193,"fn":3194,"description":3195,"org":3196,"tags":3197,"stars":26,"repoUrl":27,"updatedAt":3201},"claims-billing-rules","analyze healthcare claims billing rules","Reasoning skill for healthcare claims billing rules and fraud detection logic. Use when the user asks about CMS billing rules, place of service codes, global surgery periods, modifier usage (25 59 76 77), NCCI edit logic, column 1 column 2 code pairs, mutually exclusive procedures, modifier indicators, fraud waste and abuse patterns, E&M upcoding, unbundling, phantom billing, impossible day detection, coding error versus fraud distinction, FWA investigation methodology, or claims audit logic. Triggers include \"CMS billing rules\", \"NCCI edits\", \"modifier 25\", \"modifier 59\", \"global surgery period\", \"upcoding\", \"unbundling\", \"phantom billing\", \"impossible day\", \"FWA\", \"fraud waste abuse\", \"coding error vs fraud\", \"claims audit\", \"billing compliance\", \"E&M level selection\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3198,3199,3200],{"name":3121,"slug":3122,"type":16},{"name":3188,"slug":3189,"type":16},{"name":3152,"slug":3153,"type":16},"2026-07-12T08:38:28.210856",40]