[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6QFZ5FVHMNJSW4N0QW4P5CJ":3,"skill-same:01M6QFZ5FVHMNJSW4N0QW4P5CJ":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":14,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M6QFZ5FVHMNJSW4N0QW4P5CJ","scvelo",null,"Performs RNA velocity analysis with scVelo on single-cell RNA-seq AnnData objects that have spliced and unspliced layers (from velocyto, STARsolo, kallisto|bustools, or alevin-fry). Covers stochastic and dynamical velocity models, velocity graphs and embedding arrows, latent time, PAGA trajectory graphs, and driver gene ranking. Use when inferring differentiation direction from snapshot data, estimating latent time from splicing kinetics, finding driver genes of a trajectory, or adding velocity arrows to a Scanpy UMAP. Not for fate probability modeling (use CellRank) or datasets without unspliced counts.","Tashima-Tarsh\u002FDisha6.6","Tashima-Tarsh","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F269906498?v=4","01M6PBH98X03XERH0HFT4PFB1P","NITISH KUMAR","01M6PBH9DA0M6KM3Z12P848F0K",0,"BSD-3-Clause","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-scvelo\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"gene","python","for","verified","layers","trajectories","transcriptomics","direction","ranking","umap","graphs","RNA","time","numpy","objects","datasets","models","use","snapshot","2026-11-10 10:12:30",false,"---\nname: scvelo\ndescription: Performs RNA velocity analysis with scVelo on single-cell RNA-seq AnnData objects that have spliced and unspliced layers (from velocyto, STARsolo, kallisto|bustools, or alevin-fry). Covers stochastic and dynamical velocity models, velocity graphs and embedding arrows, latent time, PAGA trajectory graphs, and driver gene ranking. Use when inferring differentiation direction from snapshot data, estimating latent time from splicing kinetics, finding driver genes of a trajectory, or adding velocity arrows to a Scanpy UMAP. Not for fate probability modeling (use CellRank) or datasets without unspliced counts.\nlicense: BSD-3-Clause\ncompatibility: Requires Python 3.10+ with scvelo, scanpy, and anndata. Verified against scvelo 0.3.4, whose dynamical model and pl.scatter need pandas\u003C3 and whose stochastic estimator needs numpy\u003C2; the deterministic estimator works on current releases.\nmetadata:\n  version: '1.2'\n  category: life-sciences\n  maintainer: Kalaris Labs\n  contributor: Kuan-lin Huang\n  tags: RNA velocity, single-cell, cell trajectories, transcriptomics\n---\n\n# scVelo — RNA Velocity Analysis\n\n## Overview\n\nscVelo is the leading Python package for RNA velocity analysis in single-cell RNA-seq data. It infers cell state transitions by modeling the kinetics of mRNA splicing — using the ratio of unspliced (pre-mRNA) to spliced (mature mRNA) abundances to determine whether a gene is being upregulated or downregulated in each cell. This allows reconstruction of developmental trajectories and identification of cell fate decisions without requiring time-course data.\n\n**Installation:** `uv pip install scvelo`\n\n**Key resources:**\n- Documentation: https:\u002F\u002Fscvelo.readthedocs.io\u002F\n- GitHub: https:\u002F\u002Fgithub.com\u002Ftheislab\u002Fscvelo\n- Paper: Bergen et al. (2020) Nature Biotechnology. PMID: 32747759\n\n## When to Use This Skill\n\nUse scVelo when:\n\n- **Trajectory inference from snapshot data**: Determine which direction cells are differentiating\n- **Cell fate prediction**: Identify progenitor cells and their downstream fates\n- **Driver gene identification**: Find genes whose dynamics best explain observed trajectories\n- **Developmental biology**: Model hematopoiesis, neurogenesis, epithelial-to-mesenchymal transitions\n- **Latent time estimation**: Order cells along a pseudotime derived from splicing dynamics\n- **Complement to Scanpy**: Add directional information to UMAP embeddings\n\n## Prerequisites\n\nscVelo requires count matrices for both **unspliced** and **spliced** RNA. These are generated by:\n1. **STARsolo** or **kallisto|bustools** with `lamanno` mode\n2. **velocyto** CLI: `velocyto run10x` \u002F `velocyto run`\n3. **alevin-fry** \u002F **simpleaf** with spliced\u002Funspliced output\n\nData is stored in an `AnnData` object with `layers[\"spliced\"]` and `layers[\"unspliced\"]`.\n\n## Standard RNA Velocity Workflow\n\n### 1. Setup and Data Loading\n\n```python\nimport scvelo as scv\nimport scanpy as sc\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Configure settings\nscv.settings.verbosity = 3       # Show computation steps\nscv.settings.presenter_view = True\nscv.settings.set_figure_params('scvelo')\n\n# Load data (AnnData with spliced\u002Funspliced layers)\n# Option A: Load from loom (velocyto output)\nadata = scv.read(\"cellranger_output.loom\", cache=True)\n\n# Option B: Merge velocyto loom with Scanpy-processed AnnData\nadata_processed = sc.read_h5ad(\"processed.h5ad\")  # Has UMAP, clusters\nadata_velocity = scv.read(\"velocyto.loom\")\nadata = scv.utils.merge(adata_processed, adata_velocity)\n\n# Verify layers\nprint(adata)\n# obs × var: N × G\n# layers: 'spliced', 'unspliced' (required)\n# obsm['X_umap'] (required for visualization)\n```\n\n### 2. Preprocessing\n\n```python\n# Filter and normalize. As of scVelo 0.3, filter_and_normalize() only filters\n# genes and normalizes per cell -- it no longer takes n_top_genes and no longer\n# log-transforms, so the log step and HVG selection come from Scanpy.\nscv.pp.filter_and_normalize(\n    adata,\n    min_shared_counts=20    # Minimum counts in spliced+unspliced\n)\nsc.pp.log1p(adata)\nsc.pp.highly_variable_genes(adata, n_top_genes=2000, subset=True)\n\n# Compute first and second order moments (means and variances)\n# knn_connectivities must be computed first\nsc.pp.neighbors(adata, n_neighbors=30, n_pcs=30)\nscv.pp.moments(\n    adata,\n    n_pcs=30,\n    n_neighbors=30\n)\n```\n\n### 3. Velocity Estimation — Stochastic Model\n\nThe stochastic model is fast and suitable for exploratory analysis:\n\n```python\n# Stochastic velocity (faster, less accurate)\nscv.tl.velocity(adata, mode='stochastic')\nscv.tl.velocity_graph(adata)\n\n# Visualize\nscv.pl.velocity_embedding_stream(\n    adata,\n    basis='umap',\n    color='leiden',\n    title=\"RNA Velocity (Stochastic)\"\n)\n```\n\n### 4. Velocity Estimation — Dynamical Model (Recommended)\n\nThe dynamical model fits the full splicing kinetics and is more accurate:\n\n```python\n# Recover dynamics (computationally intensive; ~10-30 min for 10K cells)\nscv.tl.recover_dynamics(adata, n_jobs=4)\n\n# Compute velocity from dynamical model\nscv.tl.velocity(adata, mode='dynamical')\nscv.tl.velocity_graph(adata)\n```\n\n### 5. Latent Time\n\nThe dynamical model enables computation of a shared latent time (pseudotime):\n\n```python\n# Compute latent time\nscv.tl.latent_time(adata)\n\n# Visualize latent time on UMAP\nscv.pl.scatter(\n    adata,\n    color='latent_time',\n    color_map='gnuplot',\n    size=80,\n    title='Latent time'\n)\n\n# Identify top genes ordered by latent time\ntop_genes = adata.var['fit_likelihood'].sort_values(ascending=False).index[:300]\nscv.pl.heatmap(\n    adata,\n    var_names=top_genes,\n    sortby='latent_time',\n    col_color='leiden',\n    n_convolve=100\n)\n```\n\n### 6. Driver Gene Analysis\n\n```python\n# Identify genes with highest velocity fit\nscv.tl.rank_velocity_genes(adata, groupby='leiden', min_corr=0.3)\ndf = scv.DataFrame(adata.uns['rank_velocity_genes']['names'])\nprint(df.head(10))\n\n# Speed and coherence\nscv.tl.velocity_confidence(adata)\nscv.pl.scatter(\n    adata,\n    c=['velocity_length', 'velocity_confidence'],\n    cmap='coolwarm',\n    perc=[5, 95]\n)\n\n# Phase portraits for specific genes\nscv.pl.velocity(adata, ['Cpe', 'Gnao1', 'Ins2'],\n               ncols=3, figsize=(16, 4))\n```\n\n### 7. Velocity Arrows and Pseudotime\n\n```python\n# Arrow plot on UMAP\nscv.pl.velocity_embedding(\n    adata,\n    arrow_length=3,\n    arrow_size=2,\n    color='leiden',\n    basis='umap'\n)\n\n# Stream plot (cleaner visualization)\nscv.pl.velocity_embedding_stream(\n    adata,\n    basis='umap',\n    color='leiden',\n    smooth=0.8,\n    min_mass=4\n)\n\n# Velocity pseudotime (alternative to latent time)\nscv.tl.velocity_pseudotime(adata)\nscv.pl.scatter(adata, color='velocity_pseudotime', cmap='gnuplot')\n```\n\n### 8. PAGA Trajectory Graph\n\n```python\n# PAGA graph with velocity-informed transitions\nscv.tl.paga(adata, groups='leiden')\ndf = scv.get_df(adata, 'paga\u002Ftransitions_confidence', precision=2).T\ndf.style.background_gradient(cmap='Blues').format('{:.2g}')\n\n# Plot PAGA with velocity\nscv.pl.paga(\n    adata,\n    basis='umap',\n    size=50,\n    alpha=0.1,\n    min_edge_width=2,\n    node_size_scale=1.5\n)\n```\n\n## Complete Workflow Script\n\n```python\nimport scvelo as scv\nimport scanpy as sc\n\ndef run_rna_velocity(adata, n_top_genes=2000, mode='dynamical', n_jobs=4):\n    \"\"\"\n    Complete RNA velocity workflow.\n\n    Args:\n        adata: AnnData with 'spliced' and 'unspliced' layers, UMAP in obsm\n        n_top_genes: Number of top HVGs for velocity\n        mode: 'stochastic' (fast) or 'dynamical' (accurate)\n        n_jobs: Parallel jobs for dynamical model\n\n    Returns:\n        Processed AnnData with velocity information\n    \"\"\"\n    scv.settings.verbosity = 2\n\n    # 1. Preprocessing (scVelo 0.3 dropped log\u002FHVG from filter_and_normalize)\n    scv.pp.filter_and_normalize(adata, min_shared_counts=20)\n    sc.pp.log1p(adata)\n    sc.pp.highly_variable_genes(adata, n_top_genes=n_top_genes, subset=True)\n\n    if 'neighbors' not in adata.uns:\n        sc.pp.neighbors(adata, n_neighbors=30)\n\n    scv.pp.moments(adata, n_pcs=30, n_neighbors=30)\n\n    # 2. Velocity estimation\n    if mode == 'dynamical':\n        scv.tl.recover_dynamics(adata, n_jobs=n_jobs)\n\n    scv.tl.velocity(adata, mode=mode)\n    scv.tl.velocity_graph(adata)\n\n    # 3. Downstream analyses\n    if mode == 'dynamical':\n        scv.tl.latent_time(adata)\n        scv.tl.rank_velocity_genes(adata, groupby='leiden', min_corr=0.3)\n\n    scv.tl.velocity_confidence(adata)\n    scv.tl.velocity_pseudotime(adata)\n\n    return adata\n```\n\n## Key Output Fields in AnnData\n\nAfter running the workflow, the following fields are added:\n\n| Location | Key | Description |\n|----------|-----|-------------|\n| `adata.layers` | `velocity` | RNA velocity per gene per cell |\n| `adata.layers` | `fit_t` | Fitted latent time per gene per cell |\n| `adata.obsm` | `velocity_umap` | 2D velocity vectors on UMAP |\n| `adata.obs` | `velocity_pseudotime` | Pseudotime from velocity |\n| `adata.obs` | `latent_time` | Latent time from dynamical model |\n| `adata.obs` | `velocity_length` | Speed of each cell |\n| `adata.obs` | `velocity_confidence` | Confidence score per cell |\n| `adata.var` | `fit_likelihood` | Gene-level model fit quality |\n| `adata.var` | `fit_alpha` | Transcription rate |\n| `adata.var` | `fit_beta` | Splicing rate |\n| `adata.var` | `fit_gamma` | Degradation rate |\n| `adata.uns` | `velocity_graph` | Cell-cell transition probability matrix |\n\n## Velocity Models Comparison\n\n| Model | Speed | Accuracy | When to Use |\n|-------|-------|----------|-------------|\n| `stochastic` | Fast | Moderate | Exploratory; large datasets |\n| `deterministic` | Medium | Moderate | Simple linear kinetics |\n| `dynamical` | Slow | High | Publication-quality; identifies driver genes |\n\n## Best Practices\n\n- **Start with stochastic mode** for exploration; switch to dynamical for final analysis\n- **Need good coverage of unspliced reads**: Short reads (\u003C 100 bp) may miss intron coverage\n- **Minimum 2,000 cells**: RNA velocity is noisy with fewer cells\n- **Velocity should be coherent**: Arrows should follow known biology; randomness indicates issues\n- **k-NN bandwidth matters**: Too few neighbors → noisy velocity; too many → oversmoothed\n- **Sanity check**: Root cells (progenitors) should have high unspliced\u002Fspliced ratios for marker genes\n- **Dynamical model requires distinct kinetic states**: Works best for clear differentiation processes\n\n## Troubleshooting\n\n| Problem | Solution |\n|---------|---------|\n| Missing unspliced layer | Re-run velocyto or use STARsolo with `--soloFeatures Gene Velocyto` |\n| Very few velocity genes | Lower `min_shared_counts`; check sequencing depth |\n| Random-looking arrows | Try different `n_neighbors` or velocity model |\n| Memory error with dynamical | Set `n_jobs=1`; reduce `n_top_genes` |\n| Negative velocity everywhere | Check that spliced\u002Funspliced layers are not swapped |\n\n## Additional Resources\n\n- **scVelo documentation**: https:\u002F\u002Fscvelo.readthedocs.io\u002F\n- **Tutorial notebooks**: https:\u002F\u002Fscvelo.readthedocs.io\u002Ftutorials\u002F\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Ftheislab\u002Fscvelo\n- **Paper**: Bergen V et al. (2020) Nature Biotechnology. PMID: 32747759\n- **velocyto** (preprocessing): http:\u002F\u002Fvelocyto.org\u002F\n- **CellRank** (fate prediction, extends scVelo): https:\u002F\u002Fcellrank.readthedocs.io\u002F\n- **dynamo** (metabolic labeling alternative): https:\u002F\u002Fdynamo-release.readthedocs.io\u002F\n\n## Related skills\n\n- `scanpy`: Standard single-cell RNA-seq analysis pipeline.\n- `openpiv`: Particle Image Velocimetry (PIV) analysis with OpenPIV.\n","# scVelo — RNA Velocity Analysis\n\n## Overview\n\nscVelo is the leading Python package for RNA velocity analysis in single-cell RNA-seq data. It infers cell state transitions by modeling the kinetics of mRNA splicing — using the ratio of unspliced (pre-mRNA) to spliced (mature mRNA) abundances to determine whether a gene is being upregulated or downregulated in each cell. This allows reconstruction of developmental trajectories and identification of cell fate decisions without requiring time-course data.\n\n**Installation:** `uv pip install scvelo`\n\n**Key resources:**\n- Documentation: https:\u002F\u002Fscvelo.readthedocs.io\u002F\n- GitHub: https:\u002F\u002Fgithub.com\u002Ftheislab\u002Fscvelo\n- Paper: Bergen et al. (2020) Nature Biotechnology. PMID: 32747759\n\n## When to Use This Skill\n\nUse scVelo when:\n\n- **Trajectory inference from snapshot data**: Determine which direction cells are differentiating\n- **Cell fate prediction**: Identify progenitor cells and their downstream fates\n- **Driver gene identification**: Find genes whose dynamics best explain observed trajectories\n- **Developmental biology**: Model hematopoiesis, neurogenesis, epithelial-to-mesenchymal transitions\n- **Latent time estimation**: Order cells along a pseudotime derived from splicing dynamics\n- **Complement to Scanpy**: Add directional information to UMAP embeddings\n\n## Prerequisites\n\nscVelo requires count matrices for both **unspliced** and **spliced** RNA. These are generated by:\n1. **STARsolo** or **kallisto|bustools** with `lamanno` mode\n2. **velocyto** CLI: `velocyto run10x` \u002F `velocyto run`\n3. **alevin-fry** \u002F **simpleaf** with spliced\u002Funspliced output\n\nData is stored in an `AnnData` object with `layers[\"spliced\"]` and `layers[\"unspliced\"]`.\n\n## Standard RNA Velocity Workflow\n\n### 1. Setup and Data Loading\n\n```python\nimport scvelo as scv\nimport scanpy as sc\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Configure settings\nscv.settings.verbosity = 3       # Show computation steps\nscv.settings.presenter_view = True\nscv.settings.set_figure_params('scvelo')\n\n# Load data (AnnData with spliced\u002Funspliced layers)\n# Option A: Load from loom (velocyto output)\nadata = scv.read(\"cellranger_output.loom\", cache=True)\n\n# Option B: Merge velocyto loom with Scanpy-processed AnnData\nadata_processed = sc.read_h5ad(\"processed.h5ad\")  # Has UMAP, clusters\nadata_velocity = scv.read(\"velocyto.loom\")\nadata = scv.utils.merge(adata_processed, adata_velocity)\n\n# Verify layers\nprint(adata)\n# obs × var: N × G\n# layers: 'spliced', 'unspliced' (required)\n# obsm['X_umap'] (required for visualization)\n```\n\n### 2. Preprocessing\n\n```python\n# Filter and normalize. As of scVelo 0.3, filter_and_normalize() only filters\n# genes and normalizes per cell -- it no longer takes n_top_genes and no longer\n# log-transforms, so the log step and HVG selection come from Scanpy.\nscv.pp.filter_and_normalize(\n    adata,\n    min_shared_counts=20    # Minimum counts in spliced+unspliced\n)\nsc.pp.log1p(adata)\nsc.pp.highly_variable_genes(adata, n_top_genes=2000, subset=True)\n\n# Compute first and second order moments (means and variances)\n# knn_connectivities must be computed first\nsc.pp.neighbors(adata, n_neighbors=30, n_pcs=30)\nscv.pp.moments(\n    adata,\n    n_pcs=30,\n    n_neighbors=30\n)\n```\n\n### 3. Velocity Estimation — Stochastic Model\n\nThe stochastic model is fast and suitable for exploratory analysis:\n\n```python\n# Stochastic velocity (faster, less accurate)\nscv.tl.velocity(adata, mode='stochastic')\nscv.tl.velocity_graph(adata)\n\n# Visualize\nscv.pl.velocity_embedding_stream(\n    adata,\n    basis='umap',\n    color='leiden',\n    title=\"RNA Velocity (Stochastic)\"\n)\n```\n\n### 4. Velocity Estimation — Dynamical Model (Recommended)\n\nThe dynamical model fits the full splicing kinetics and is more accurate:\n\n```python\n# Recover dynamics (computationally intensive; ~10-30 min for 10K cells)\nscv.tl.recover_dynamics(adata, n_jobs=4)\n\n# Compute velocity from dynamical model\nscv.tl.velocity(adata, mode='dynamical')\nscv.tl.velocity_graph(adata)\n```\n\n### 5. Latent Time\n\nThe dynamical model enables computation of a shared latent time (pseudotime):\n\n```python\n# Compute latent time\nscv.tl.latent_time(adata)\n\n# Visualize latent time on UMAP\nscv.pl.scatter(\n    adata,\n    color='latent_time',\n    color_map='gnuplot',\n    size=80,\n    title='Latent time'\n)\n\n# Identify top genes ordered by latent time\ntop_genes = adata.var['fit_likelihood'].sort_values(ascending=False).index[:300]\nscv.pl.heatmap(\n    adata,\n    var_names=top_genes,\n    sortby='latent_time',\n    col_color='leiden',\n    n_convolve=100\n)\n```\n\n### 6. Driver Gene Analysis\n\n```python\n# Identify genes with highest velocity fit\nscv.tl.rank_velocity_genes(adata, groupby='leiden', min_corr=0.3)\ndf = scv.DataFrame(adata.uns['rank_velocity_genes']['names'])\nprint(df.head(10))\n\n# Speed and coherence\nscv.tl.velocity_confidence(adata)\nscv.pl.scatter(\n    adata,\n    c=['velocity_length', 'velocity_confidence'],\n    cmap='coolwarm',\n    perc=[5, 95]\n)\n\n# Phase portraits for specific genes\nscv.pl.velocity(adata, ['Cpe', 'Gnao1', 'Ins2'],\n               ncols=3, figsize=(16, 4))\n```\n\n### 7. Velocity Arrows and Pseudotime\n\n```python\n# Arrow plot on UMAP\nscv.pl.velocity_embedding(\n    adata,\n    arrow_length=3,\n    arrow_size=2,\n    color='leiden',\n    basis='umap'\n)\n\n# Stream plot (cleaner visualization)\nscv.pl.velocity_embedding_stream(\n    adata,\n    basis='umap',\n    color='leiden',\n    smooth=0.8,\n    min_mass=4\n)\n\n# Velocity pseudotime (alternative to latent time)\nscv.tl.velocity_pseudotime(adata)\nscv.pl.scatter(adata, color='velocity_pseudotime', cmap='gnuplot')\n```\n\n### 8. PAGA Trajectory Graph\n\n```python\n# PAGA graph with velocity-informed transitions\nscv.tl.paga(adata, groups='leiden')\ndf = scv.get_df(adata, 'paga\u002Ftransitions_confidence', precision=2).T\ndf.style.background_gradient(cmap='Blues').format('{:.2g}')\n\n# Plot PAGA with velocity\nscv.pl.paga(\n    adata,\n    basis='umap',\n    size=50,\n    alpha=0.1,\n    min_edge_width=2,\n    node_size_scale=1.5\n)\n```\n\n## Complete Workflow Script\n\n```python\nimport scvelo as scv\nimport scanpy as sc\n\ndef run_rna_velocity(adata, n_top_genes=2000, mode='dynamical', n_jobs=4):\n    \"\"\"\n    Complete RNA velocity workflow.\n\n    Args:\n        adata: AnnData with 'spliced' and 'unspliced' layers, UMAP in obsm\n        n_top_genes: Number of top HVGs for velocity\n        mode: 'stochastic' (fast) or 'dynamical' (accurate)\n        n_jobs: Parallel jobs for dynamical model\n\n    Returns:\n        Processed AnnData with velocity information\n    \"\"\"\n    scv.settings.verbosity = 2\n\n    # 1. Preprocessing (scVelo 0.3 dropped log\u002FHVG from filter_and_normalize)\n    scv.pp.filter_and_normalize(adata, min_shared_counts=20)\n    sc.pp.log1p(adata)\n    sc.pp.highly_variable_genes(adata, n_top_genes=n_top_genes, subset=True)\n\n    if 'neighbors' not in adata.uns:\n        sc.pp.neighbors(adata, n_neighbors=30)\n\n    scv.pp.moments(adata, n_pcs=30, n_neighbors=30)\n\n    # 2. Velocity estimation\n    if mode == 'dynamical':\n        scv.tl.recover_dynamics(adata, n_jobs=n_jobs)\n\n    scv.tl.velocity(adata, mode=mode)\n    scv.tl.velocity_graph(adata)\n\n    # 3. Downstream analyses\n    if mode == 'dynamical':\n        scv.tl.latent_time(adata)\n        scv.tl.rank_velocity_genes(adata, groupby='leiden', min_corr=0.3)\n\n    scv.tl.velocity_confidence(adata)\n    scv.tl.velocity_pseudotime(adata)\n\n    return adata\n```\n\n## Key Output Fields in AnnData\n\nAfter running the workflow, the following fields are added:\n\n| Location | Key | Description |\n|----------|-----|-------------|\n| `adata.layers` | `velocity` | RNA velocity per gene per cell |\n| `adata.layers` | `fit_t` | Fitted latent time per gene per cell |\n| `adata.obsm` | `velocity_umap` | 2D velocity vectors on UMAP |\n| `adata.obs` | `velocity_pseudotime` | Pseudotime from velocity |\n| `adata.obs` | `latent_time` | Latent time from dynamical model |\n| `adata.obs` | `velocity_length` | Speed of each cell |\n| `adata.obs` | `velocity_confidence` | Confidence score per cell |\n| `adata.var` | `fit_likelihood` | Gene-level model fit quality |\n| `adata.var` | `fit_alpha` | Transcription rate |\n| `adata.var` | `fit_beta` | Splicing rate |\n| `adata.var` | `fit_gamma` | Degradation rate |\n| `adata.uns` | `velocity_graph` | Cell-cell transition probability matrix |\n\n## Velocity Models Comparison\n\n| Model | Speed | Accuracy | When to Use |\n|-------|-------|----------|-------------|\n| `stochastic` | Fast | Moderate | Exploratory; large datasets |\n| `deterministic` | Medium | Moderate | Simple linear kinetics |\n| `dynamical` | Slow | High | Publication-quality; identifies driver genes |\n\n## Best Practices\n\n- **Start with stochastic mode** for exploration; switch to dynamical for final analysis\n- **Need good coverage of unspliced reads**: Short reads (\u003C 100 bp) may miss intron coverage\n- **Minimum 2,000 cells**: RNA velocity is noisy with fewer cells\n- **Velocity should be coherent**: Arrows should follow known biology; randomness indicates issues\n- **k-NN bandwidth matters**: Too few neighbors → noisy velocity; too many → oversmoothed\n- **Sanity check**: Root cells (progenitors) should have high unspliced\u002Fspliced ratios for marker genes\n- **Dynamical model requires distinct kinetic states**: Works best for clear differentiation processes\n\n## Troubleshooting\n\n| Problem | Solution |\n|---------|---------|\n| Missing unspliced layer | Re-run velocyto or use STARsolo with `--soloFeatures Gene Velocyto` |\n| Very few velocity genes | Lower `min_shared_counts`; check sequencing depth |\n| Random-looking arrows | Try different `n_neighbors` or velocity model |\n| Memory error with dynamical | Set `n_jobs=1`; reduce `n_top_genes` |\n| Negative velocity everywhere | Check that spliced\u002Funspliced layers are not swapped |\n\n## Additional Resources\n\n- **scVelo documentation**: https:\u002F\u002Fscvelo.readthedocs.io\u002F\n- **Tutorial notebooks**: https:\u002F\u002Fscvelo.readthedocs.io\u002Ftutorials\u002F\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Ftheislab\u002Fscvelo\n- **Paper**: Bergen V et al. (2020) Nature Biotechnology. PMID: 32747759\n- **velocyto** (preprocessing): http:\u002F\u002Fvelocyto.org\u002F\n- **CellRank** (fate prediction, extends scVelo): https:\u002F\u002Fcellrank.readthedocs.io\u002F\n- **dynamo** (metabolic labeling alternative): https:\u002F\u002Fdynamo-release.readthedocs.io\u002F\n\n## Related skills\n\n- `scanpy`: Standard single-cell RNA-seq analysis pipeline.\n- `openpiv`: Particle Image Velocimetry (PIV) analysis with OpenPIV.\n",{"name":5,"license":15,"metadata":43,"description":7,"compatibility":49},{"tags":44,"version":45,"category":46,"maintainer":47,"contributor":48},"RNA velocity, single-cell, cell trajectories, transcriptomics","1.2","life-sciences","Kalaris Labs","Kuan-lin Huang","Requires Python 3.10+ with scvelo, scanpy, and anndata. Verified against scvelo 0.3.4, whose dynamical model and pl.scatter need pandas\u003C3 and whose stochastic estimator needs numpy\u003C2; the deterministic estimator works on current releases.","main","0da4485785ee599388900be50db1635489d53056",".agents\u002Fskills\u002Fkal-scvelo","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6","https:\u002F\u002Fdisha6.6.thenitishkr.in\u002F","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh","www.thenitishkr","thenitishkr | AI • Cyber-security • Research\r\n","2026-11-08 03:33:25",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add Tashima-Tarsh\u002FDisha6.6 --skill scvelo",{"tool":65,"command":66},"bunx","bunx skills add Tashima-Tarsh\u002FDisha6.6 --skill scvelo",{"tool":68,"command":69},"pnpm","pnpm dlx skills add Tashima-Tarsh\u002FDisha6.6 --skill scvelo","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-scvelo\u002FSKILL.md",true,[73,79],{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fvelocity_models.md","REFERENCE","参考文档",5010,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-scvelo\u002Freferences\u002Fvelocity_models.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Frna_velocity_workflow.py","SCRIPT","脚本",8676,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-scvelo\u002Fscripts\u002Frna_velocity_workflow.py",[86,118,142,169,194,218],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":98,"publishedAt":38},"01M6QRD07D4TGNDK6VJ4EHF8BV","youtube-full","Use when the user needs YouTube transcripts, video search, channel browsing, playlist extraction, or content monitoring. Trigger phrases: 'get the transcript for', 'search YouTube for', 'what are the latest videos on', 'list this playlist', 'monitor this channel', or any request involving a YouTube URL, video ID, or @handle. Do NOT use for downloading video or audio files, YouTube engagement data (likes, comments), or private\u002Fage-restricted videos.","MIT","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fyoutube-full\u002FSKILL.md",[93],{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,21,115,116,117],"youtube full","youtube","full","transcript","search","monitoring","data","Video","Audio","list","files","do","get","age","trigger","URL","browsing","request","youtube transcripts",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":38},"01M6QRCJ3112VYPA97YG7KGMC2","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[125,126,127,128,103,129,130,131,132,133,134,135,136,137,36,138,139,140,141,21],"twitter","x twitter growth","growth","research","content","engineering","plan","web search","competitors","analyze","engine","write","strategy","platform","grow","posting","competitive",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":151,"publishedAt":38},"01M6QRBN3EHQNJY42RERP7A149","write-a-skill","Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, build, or author a new skill.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[148],{"categoryNo":149,"categoryName":150,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000023","Skill与智能体开发",[152,136,153,154,155,156,157,158,36,159,160,50,161,162,163,164,165,166,167,168],"write a skill","github","create","https","productivity","matt pocock","direct","example","build","new skill","structure","new agent","resources","with","tree","progressive disclosure","author",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":38},"01M6QRB6G8P33PNGAF9Y69EJ9T","wrap-up","Close out a launched Claude Managed Agent — recap every primitive the founder now owns, regenerate the single-file overview page, and suggest the next 1-2 upgrades. Use when the user says \"wrap up\", \"close this out\", \"what do I own now\", \"give me the summary\", \"recap the agent\", or when the orchestrator routes phase=wrap-up. primitives_inventory.py tables everything owned (agent, environment, session, memory, outcome, deployment); overview_page.py regenerates a self-contained .\u002Fmy-agent\u002Fagent-overview.html; upgrade_suggester.py ranks the next moves from recorded deferrals plus standing hardening steps. Companion to run-without-you; the last stop before phase=done.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrap-up\u002FSKILL.md",[],[176,177,178,179,180,181,182,183,184,36,185,110,186,187,188,189,190,191,192,193],"wrap up","up","wrap","gemini","deployment","run","file","hardening","closeout","stop","upgrade","founder","close","companion","you","tables","directions","phase",{"skillNo":195,"name":196,"nameZh":6,"description":197,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":198,"categories":199,"keywords":201,"publishedAt":38},"01M6QRA5AYC1RBFZ39GTWGS3N8","workflow-builder","Design and write deterministic multi-agent workflow scripts (.js files in .claude\u002Fworkflows\u002F) for Claude Code's Workflow tool. Use when a user wants to build, create, author, scaffold, or run a custom Claude Code workflow, orchestrate sub-agents (fan-out, pipeline, loop, judge-panel), or automate a repeatable multi-step task across fresh-context agents.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkflow-builder\u002FSKILL.md",[200],{"categoryNo":149,"categoryName":150,"taxonomyType":96,"taxonomyTypeDesc":97},[202,203,204,205,206,154,181,207,208,209,210,211,136,212,109,213,214,215,216,217],"workflow","workflow builder","builder","design","workflows","code","orchestrate","pipeline","loop","multi-agent","context","across","fresh","scripts","judge","claude code workflow",{"skillNo":219,"name":220,"nameZh":6,"description":221,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":222,"categories":223,"keywords":224,"publishedAt":38},"01M6QR7QMCZESKQA0ERW1E657M","weekly-review","Use when someone wants to run a weekly review, close open loops, audit stalled projects and commitments, get their system back to trusted, restart a lapsed review habit, or says \"\u002Fcs:weekly-review\". Walks David Allen's three-phase loop — GET CLEAR, GET CURRENT, GET CREATIVE — with deterministic scripts that inventory open loops, gate the checklist with named gaps, and score commitment health 0-100.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fweekly-review\u002FSKILL.md",[],[225,226,227,228,229,230,231,232,233,210,234,235,236,237,238,239,111,240,241,193],"review","weekly review","weekly","deterministic scripts","reflect","feeds","inventory","open","team","projects","project-management","scanner","conversation","back","project","sprint","cadence"]