# Scvelo

RNA velocity analysis with scVelo.

- Repository: https://github.com/LeonChaoX/qinyan-academic-skills (996 stars)
- Category: Engineering
- License: BSD-3-Clause
- Last updated: 2026-07-20
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add LeonChaoX/qinyan-academic-skills --skill scvelo -g -a claude-code -y`
Codex: `npx skills add LeonChaoX/qinyan-academic-skills --skill scvelo -g -a codex -y`
Cursor: `npx skills add LeonChaoX/qinyan-academic-skills --skill scvelo -g -a cursor -y`
Gemini CLI: `npx skills add LeonChaoX/qinyan-academic-skills --skill scvelo -g -a gemini-cli -y`

## Description

RNA velocity analysis with scVelo. Estimate cell state transitions from unspliced/spliced mRNA dynamics, infer trajectory directions, compute latent time, and identify driver genes in single-cell RNA-seq data. Complements Scanpy/scVI-tools for trajectory inference.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# scVelo, RNA Velocity Analysis

## Overview

scVelo 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.

**Installation:** `pip install scvelo`

**Key resources:**
- Documentation: https://scvelo.readthedocs.io/
- GitHub: https://github.com/theislab/scvelo
- Paper: Bergen et al. (2020) Nature Biotechnology. PMID: 32747759

## When to Use This Skill

Use scVelo when:

- **Trajectory inference from snapshot data**: Determine which direction cells are differentiating
- **Cell fate prediction**: Identify progenitor cells and their downstream fates
- **Driver gene identification**: Find genes whose dynamics best explain observed trajectories
- **Developmental biology**: Model hematopoiesis, neurogenesis, epithelial-to-mesenchymal transitions
- **Latent time estimation**: Order cells along a pseudotime derived from splicing dynamics
- **Complement to Scanpy**: Add directional information to UMAP embeddings

## Prerequisites

scVelo requires count matrices for both **unspliced** and **spliced** RNA. These are generated by:
1. **STARsolo** or **kallisto|bustools** with `lamanno` mode
2. **velocyto** CLI: `velocyto run10x` / `velocyto run`
3. **alevin-fry** / **simpleaf** with spliced/unspliced output

Data is stored in an `AnnData` object with `layers["spliced"]` and `layers["unspliced"]`.

## Standard RNA Velocity Workflow

### 1. Setup and Data Loading

```python
import scvelo as scv
import scanpy as sc
import numpy as np
import matplotlib.pyplot as plt

The rest: https://github.com/LeonChaoX/qinyan-academic-skills/blob/HEAD/skills/05-生物信息与基因组学/scvelo/SKILL.md
