Learn R Programming

velocyto.R

RNA velocity estimation in R

System requirements

velocyto.R can be installed on unix-flavored systems, and requires the following key elements:

  • C++11
  • Open MP support
  • boost libaries
  • igraph library
  • hdf5c++ library (as required by the h5 R package to support loom files)

Installation

The easiest way to install velocyto.R is using devtools::install_github() from R:

library(devtools)
install_github("velocyto-team/velocyto.R")

You need to have boost (e.g. sudo apt-get install libboost-dev) and openmp libraries installed. You can see detailed installation commands in the dockers/debian9/Dockerfile.

Dockers

If you are having trouble installing the package on your system, you can build a docker instance that can be used on a wide range of systems and cloud environments. To install docker framework on your system see installation instruction. After installing the docker system, use the following commands to build a velocyto.R docker instance:

cd velocyto.R/dockers/debian9
docker build -t velocyto .
docker run --name velocyto -it velocyto

Tutorials

Chromaffin / SMART-seq2

The example shows how to annotate SMART-seq2 reads from bam file and estimate RNA velocity.

Dentate Gyrus / loom

The example shows how to load spliced/unspliced matrices from loom files prepared by velocyto.py CLI, use pagoda2 to cluster/embed cells, and then visualize RNA velocity on that embedding.

Mouse BM / dropEst

This example shows how to start analysis using dropEst count matrices, which can calculated from inDrop or 10x bam files using dropEst pipeline. It then uses pagoda2 to cluster/embed cells, and then visualize RNA velocity on that embedding.

Copy Link

Version

Version

0.6

License

GPL-3

Maintainer

Peter Kharchenko

Last Published

September 4th, 2020

Functions in velocyto.R (0.6)

armaCor

A slightly faster way of calculating column correlation matrix
read.smartseq2.bams

read.smartseq2.bams
read.loom.matrices

Read in loom matrices of spliced/unpsliced reads as prepared by velocyto.py CLI
ac

adjust colors, while keeping the vector names
filter.genes.by.cluster.expression

Filter genes by requirining minimum average expression within at least one of the provided cell clusters
find.ip.sites

identify positions of likely internal priming sites by looking for polyA/polyT stretches within annotated intronic regions
read.gene.mapping.info

read in detailed molecular mapping info from hdf5 file as written out by "-d" option of velocyto.py
pca.velocity.plot

PCA-based visualization of the velocities
velocyto.R-package

A short title line describing what the package does
global.velcoity.estimates

Structure-based gene velocity estimation
tSNE.velocity.plot

Joint t-SNE visualization of the velocities by joint t-SNE embedding of both current and extraploated cell positions
gene.relative.velocity.estimates

Estimate RNA velocity using gene-relative slopes
show.velocity.on.embedding.eu

Visualize RNA velocities on an existing embedding using Euclidean-based transition probability matrix within the kNN graph.
show.velocity.on.embedding.cor

Visualize RNA velocities on an existing embedding using correlation-based transition probability matrix within the kNN graph
read.strtc1.bams

Read in cell-specific bam files for STRT/C1