freedomintelligence/openclaw-medical-skills/scvelo
Claude Code and agent skill by freedomintelligence/openclaw-medical-skills
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install freedomintelligence/openclaw-medical-skills/scveloSKILL.md
The same SKILL.md was published earlier as freedomintelligence/openclaw-medical-skills/scvelo.
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:
- STARsolo or kallisto|bustools with
lamannomode - velocyto CLI:
velocyto run10x/velocyto run - 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
2. Preprocessing
3. Velocity Estimation — Stochastic Model
The stochastic model is fast and suitable for exploratory analysis:
4. Velocity Estimation — Dynamical Model (Recommended)
The dynamical model fits the full splicing kinetics and is more accurate:
5. Latent Time
The dynamical model enables computation of a shared latent time (pseudotime):
6. Driver Gene Analysis
7. Velocity Arrows and Pseudotime
8. PAGA Trajectory Graph
Complete Workflow Script
Key Output Fields in AnnData
After running the workflow, the following fields are added:
| Location | Key | Description | |
|---|---|---|---|
adata.layers | velocity | RNA velocity per gene per cell | |
adata.layers | fit_t | Fitted latent time per gene per cell | |
adata.obsm | velocity_umap | 2D velocity vectors on UMAP | |
adata.obs | velocity_pseudotime | Pseudotime from velocity | |
adata.obs | latent_time | Latent time from dynamical model | |
adata.obs | velocity_length | Speed of each cell | |
adata.obs | velocity_confidence | Confidence score per cell | |
adata.var | fit_likelihood | Gene-level model fit quality | |
adata.var | fit_alpha | Transcription rate | |
adata.var | fit_beta | Splicing rate | |
adata.var | fit_gamma | Degradation rate | |
adata.uns | velocity_graph | Cell-cell transition probability matrix |
Velocity Models Comparison
| Model | Speed | Accuracy | When to Use | |
|---|---|---|---|---|
stochastic | Fast | Moderate | Exploratory; large datasets | |
deterministic | Medium | Moderate | Simple linear kinetics | |
dynamical | Slow | High | Publication-quality; identifies driver genes |
Best Practices
- Start with stochastic mode for exploration; switch to dynamical for final analysis
- Need good coverage of unspliced reads: Short reads (< 100 bp) may miss intron coverage
- Minimum 2,000 cells: RNA velocity is noisy with fewer cells
- Velocity should be coherent: Arrows should follow known biology; randomness indicates issues
- k-NN bandwidth matters: Too few neighbors → noisy velocity; too many → oversmoothed
- Sanity check: Root cells (progenitors) should have high unspliced/spliced ratios for marker genes
- Dynamical model requires distinct kinetic states: Works best for clear differentiation processes
Troubleshooting
| Problem | Solution | |
|---|---|---|
| Missing unspliced layer | Re-run velocyto or use STARsolo with --soloFeatures Gene Velocyto | |
| Very few velocity genes | Lower min_shared_counts; check sequencing depth | |
| Random-looking arrows | Try different n_neighbors or velocity model | |
| Memory error with dynamical | Set n_jobs=1; reduce n_top_genes | |
| Negative velocity everywhere | Check that spliced/unspliced layers are not swapped |
Additional Resources
- scVelo documentation: https://scvelo.readthedocs.io/
- Tutorial notebooks: https://scvelo.readthedocs.io/tutorials/
- GitHub: https://github.com/theislab/scvelo
- Paper: Bergen V et al. (2020) Nature Biotechnology. PMID: 32747759
- velocyto (preprocessing): http://velocyto.org/
- CellRank (fate prediction, extends scVelo): https://cellrank.readthedocs.io/
- dynamo (metabolic labeling alternative): https://dynamo-release.readthedocs.io/
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/scvelo/SKILL.md
Popularity
- Repository stars
- 2,777
- Repository forks
- 386
- 7-day trend score
- 40
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/freedomintelligence/openclaw-medical-skills/scvelo)