Rna velocity agent

From swaruplab/operon · View interactive version

Rna velocity agent is an AI agent skill from the GitHub repository swaruplab/operon. AI-powered RNA velocity analysis for predicting cellular state transitions, differentiation trajectories, and dynamic gene regulation from single-cell RNA sequencing data.

How to use this skill

Skill file

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

Core Capabilities

  1. Splicing-Based Velocity: Calculate RNA velocity from spliced/unspliced transcript ratios.
  1. Dynamic Modeling: Deep learning models (scVelo dynamical mode) for accurate velocity estimation.
  1. Trajectory Inference: Project velocity vectors onto UMAP/PCA for differentiation flow visualization.
  1. Driver Gene Identification: Identify genes driving cell state transitions.
  1. Latent Time Estimation: Reconstruct cellular pseudotime from velocity fields.
  1. 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

  1. Input: scRNA-seq data with spliced/unspliced counts (from STARsolo, velocyto, kallisto-bustools).
  1. Quality Control: Filter genes by splice detection rates and expression levels.
  1. Velocity Computation: Calculate velocity using steady-state or dynamical models.
  1. Embedding Projection: Project velocity onto low-dimensional representations.
  1. Trajectory Analysis: Identify root cells, terminal states, and differentiation paths.
  1. Driver Analysis: Rank genes by velocity-based contribution to transitions.
  1. 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

2. Terminal State Detection

3. Driver Gene Analysis

4. Latent Time

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:

Perturbation Effects:

Disease Dynamics:

Prerequisites

Related Skills

Output Visualizations

  1. Velocity Stream Plot: Arrows on UMAP showing differentiation flow
  2. Phase Portraits: Spliced vs unspliced for individual genes
  3. Latent Time Coloring: Cells colored by differentiation progress
  4. Driver Gene Heatmaps: Top genes driving each transition
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.