Agent skill
rna-velocity-agent
Install this agent skill to your Project
npx add-skill https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills/tree/main/skills/rna-velocity-agent
SKILL.md
name: 'rna-velocity-agent' description: 'AI-powered RNA velocity analysis for predicting cellular state transitions, differentiation trajectories, and dynamic gene regulation from single-cell RNA sequencing data.' measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:
- read_file
- run_shell_command
RNA Velocity Agent
The RNA Velocity Agent analyzes RNA velocity from single-cell RNA sequencing to predict cellular state transitions, differentiation trajectories, and dynamic transcriptional regulation. It implements velocyto, scVelo, and deep learning approaches for trajectory inference.
When to Use This Skill
- When inferring cell fate decisions and differentiation trajectories from scRNA-seq.
- To identify driver genes of cellular transitions.
- For predicting future cell states from current transcriptional profiles.
- When analyzing developmental processes or disease progression dynamics.
- To study cell cycle dynamics and quiescence transitions.
Core Capabilities
-
Splicing-Based Velocity: Calculate RNA velocity from spliced/unspliced transcript ratios.
-
Dynamic Modeling: Deep learning models (scVelo dynamical mode) for accurate velocity estimation.
-
Trajectory Inference: Project velocity vectors onto UMAP/PCA for differentiation flow visualization.
-
Driver Gene Identification: Identify genes driving cell state transitions.
-
Latent Time Estimation: Reconstruct cellular pseudotime from velocity fields.
-
Multi-Modal Velocity: Integrate protein (CITE-seq) or chromatin (ATAC) velocity.
RNA Velocity Fundamentals
Transcription → Unspliced RNA → Splicing → Spliced (mature) mRNA → Degradation
Velocity = d[spliced]/dt = β[unspliced] - γ[spliced]
- Positive velocity: Gene upregulating
- Negative velocity: Gene downregulating
- Zero velocity: Steady state
Workflow
-
Input: scRNA-seq data with spliced/unspliced counts (from STARsolo, velocyto, kallisto-bustools).
-
Quality Control: Filter genes by splice detection rates and expression levels.
-
Velocity Computation: Calculate velocity using steady-state or dynamical models.
-
Embedding Projection: Project velocity onto low-dimensional representations.
-
Trajectory Analysis: Identify root cells, terminal states, and differentiation paths.
-
Driver Analysis: Rank genes by velocity-based contribution to transitions.
-
Output: Velocity vectors, trajectory plots, driver genes, latent time estimates.
Example Usage
User: "Analyze RNA velocity in this hematopoiesis scRNA-seq dataset to map differentiation trajectories."
Agent Action:
python3 Skills/Genomics/RNA_Velocity_Agent/velocity_analyzer.py \
--adata hematopoiesis.h5ad \
--spliced_layer spliced \
--unspliced_layer unspliced \
--model dynamical \
--n_top_genes 2000 \
--identify_roots true \
--output velocity_results/
Model Comparison
| Model | Method | Best For | Limitations |
|---|---|---|---|
| velocyto (steady-state) | Linear regression | Quick overview | Assumes equilibrium |
| scVelo stochastic | Moment-based | General use | Limited dynamics |
| scVelo dynamical | Likelihood-based | Complex trajectories | Computationally intensive |
| UniTVelo | Deep learning | Multi-lineage | Training requirements |
| veloVI | Variational inference | Uncertainty quantification | Complex |
Key Analyses
1. Root Cell Identification
- Cells with high unspliced fractions
- Beginning of differentiation trajectories
- Stem/progenitor populations
2. Terminal State Detection
- Cells approaching steady state
- End of velocity streams
- Differentiated cell types
3. Driver Gene Analysis
- Genes with high velocity contributions
- Transition-specific regulators
- Transcription factors driving fate decisions
4. Latent Time
- Continuous measure of differentiation progress
- Aligns with biological time
- Enables dynamic gene expression modeling
Quality Control Metrics
| Metric | Threshold | Interpretation |
|---|---|---|
| Fraction unspliced | >10% of reads | Adequate capture |
| Genes with velocity | >1000 genes | Sufficient coverage |
| Velocity confidence | >0.8 | Reliable estimates |
| Coherence score | >0.3 | Consistent trajectories |
Advanced Applications
Cell Cycle Analysis:
- Separate velocity due to cell cycle from differentiation
- Identify cycling vs quiescent populations
Perturbation Effects:
- Compare velocity between conditions
- Identify acceleration/deceleration of differentiation
Disease Dynamics:
- Track progression in tumor samples
- Identify aberrant differentiation paths
Prerequisites
- Python 3.10+
- scVelo, velocyto
- Scanpy for preprocessing
- GPU recommended for deep learning models
Related Skills
- Single_Cell - For general scRNA-seq analysis
- Single_Cell_Foundation_Models - For cell annotation
- Spatial_Transcriptomics - For spatial velocity
Output Visualizations
- Velocity Stream Plot: Arrows on UMAP showing differentiation flow
- Phase Portraits: Spliced vs unspliced for individual genes
- Latent Time Coloring: Cells colored by differentiation progress
- Driver Gene Heatmaps: Top genes driving each transition
Author
AI Group - Biomedical AI Platform
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
vcf-annotator
Annotate VCF variants with VEP, ClinVar, gnomAD frequencies, and ancestry-aware context. Generates prioritised variant reports.
chemist-analyst
Analyzes events through chemistry lens using molecular structure, reaction mechanisms, thermodynamics, kinetics, and analytical techniques (spectroscopy, chromatography, mass spectrometry). Provides insights on chemical processes, material properties, reaction pathways, synthesis, and analytical methods. Use when: Chemical reactions, material analysis, synthesis planning, process optimization, environmental chemistry. Evaluates: Molecular structure, reaction mechanisms, yield, selectivity, safety, environmental impact.
bio-alignment-io
Read, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO. Supports Clustal, PHYLIP, Stockholm, FASTA, Nexus, and other alignment formats for phylogenetics and conservation analysis. Use when reading, writing, or converting alignment file formats.
sleep-analyzer
分析睡眠数据、识别睡眠模式、评估睡眠质量,并提供个性化睡眠改善建议。支持与其他健康数据的关联分析。
metabolomics-workbench-database
Access NIH Metabolomics Workbench via REST API (4,200+ studies). Query metabolites, RefMet nomenclature, MS/NMR data, m/z searches, study metadata, for metabolomics and biomarker discovery.
bio-hi-c-analysis-matrix-operations
Balance, normalize, and transform Hi-C contact matrices using cooler and cooltools. Apply iterative correction (ICE), compute expected values, and generate observed/expected matrices. Use when normalizing or transforming Hi-C matrices.
Didn't find tool you were looking for?