Skip to content

Latest commit

 

History

History
97 lines (78 loc) · 3.49 KB

velocity.md

File metadata and controls

97 lines (78 loc) · 3.49 KB

RNA Velocity analysis is a trajectory analysis based on spliced/unspliced RNA ratio.

It is quite popular https://www.nature.com/articles/s41586-018-0414-6,
however, the original pipeline is not well supported: https://github.com/velocyto-team/velocyto.R/issues

There is a new one from kallisto team: https://bustools.github.io/BUS_notebooks_R/velocity.html

1. Install R4.0 (development version) on O2

2. Install velocyto.R with R3.6.3 (Fedora 30 example)

bash:

sudo dnf update R
sudo dnf install boost boost-devel hdf5 hdf5-devel
git clone https://github.com/velocyto-team/velocyto.R

rstudio/R:

BiocManager::install("pcaMethods")
setwd("/where/you/cloned/velocyto.R")
devtools::install_local("velocyto.R")

3. Generate reference files

cDNA_introns.fa
cDNA_tx_to_capture.txt
introns_tx_to_capture.txt
tr2g.tsv

4. Index reference

This step takes ~1-2h and 100G or RAM:
sbatch 02_kallisto_index.sh

5. Split reads by sample with barcode_splitter

barcode_splitter --bcfile samples.tsv Undetermined_S0_L001_R1.fastq Undetermined_S0_L001_R2.fastq Undetermined_S0_L001_R3.fastq Undetermined_S0_L001_R4.fastq --idxread 3 --suffix .fq

kallisto bus counting procedure works on per sample basis, so we need to split samples to separate fastq files, and merge samples across lanes.

6. Count spliced and unspliced transcripts

spliced.barcodes.txt
spliced.genes.txt
spliced.mtx
unspliced.barcodes.txt
unspliced.genes.txt
unspliced.mtx

7. Create Seurat objects for every sample

8. Merge seurat objects

9. Velocity analysis

10. Plot velocity picture

11. Repeat marker analysis

11. References

Velocity analysis in Python: