velociraptor || Bioconductor框架下的RNA速率分析工具

針對基因和細胞,單細胞轉錄組兩個高級分析分別是:scenic和velocyto。這兩個都是R和python都支持的,同時R的實現都不是十分完美。特別是velocyto,在R裏面雖然有velocyto.R(win 10 似乎安裝不上還) 但是限於計算平臺和效率等,也往往使研究者困在第一步。針對這種情況,生物學家開發了velociraptor ,velociraptor 提供了Bioconductor的單細胞 SingleCellExperiment數據結構和用於RNA速度計算的Python 包 scvelo之間的輕量級接口。該接口可與許多其他SingleCellExperiment兼容,允許用戶將RNA速度整合到現有的Bioconductor分析框架之中。

velociraptor 內部是調用scvelo,所以在運行的時候會爲您配置相應的python環境。所以可以想象,並沒有理想的那麼好用,且不說velocyto的輸出是loom文件,既然在R裏面調用python庫爲什麼不直接用python分析呢?感興趣的小夥伴可以嘗試一下啦。

一般有了教程之後,其實主要的工作是在做數據格式的轉化,一波操作之後,發現velociraptor做出來的方向很是一致啊:

這個顯然是和數據有關係的,例如作者給的示例文件:

library("velociraptor")
library(scuttle)
library(scater)
sce1 <- mockSCE()
sce2 <- mockSCE()

spliced <- counts(sce1)
spliced[1:4,1:4]
          Cell_001 Cell_002 Cell_003 Cell_004
Gene_0001      406       97      119       14
Gene_0002      270      225      470     1080
Gene_0003       94       35      498       26
Gene_0004      187      578       29        0
> unspliced <- counts(sce2)
> unspliced[1:4,1:4]
          Cell_001 Cell_002 Cell_003 Cell_004
Gene_0001       32       73      285      233
Gene_0002        0        0        5       66
Gene_0003      455       27        6        0
Gene_0004      200      812      453      749




out2 <- scvelo(list(X=spliced, spliced=spliced, unspliced=unspliced))
sce <- SingleCellExperiment(assays = list(counts = (spliced)))
sce <- scater::logNormCounts(sce)
sce <- scater::runPCA(sce)
sce <- runTSNE(sce, dimred="PCA")
sce$velocity_pseudotime <- out2$velocity_pseudotime
plotTSNE(sce, colour_by="velocity_pseudotime")

embedded <- embedVelocity(reducedDim(sce, "TSNE"), out2)
grid.df <- gridVectors(reducedDim(sce, "TSNE"), embedded)
library(ggplot2)
plotTSNE(sce, colour_by="velocity_pseudotime") +
  geom_segment(data=grid.df, mapping=aes(x=start.1, y=start.2, 
                                         xend=end.1, yend=end.2), arrow=arrow(length=unit(0.05, "inches"))) + theme_bw()

https://kevinrue.github.io/velociraptor/index.html
單細胞轉錄組數據分析|| scVelo 教程:RNA速率分析工具
velocyto||sc-RNA速率:一種細胞軌跡推斷方法

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章