#install
devtools::install_local("yourpath/CytoTRACE_0.3.3.tar.gz")
#load
library(CytoTRACE)
sva/ccaPP/HiClimR/ncdf4這幾個包沒有的用BiocManager安裝一下芜繁,安裝HiClimR/ncdf4的時候可能會報錯(dependency ‘ncdf4’ is not available for package ‘HiClimR’),在linux終端安裝netcdf就好了绒极。
sudo apt-get install libnetcdf-dev
- 推斷擬時序起點骏令,可視化結(jié)果儲存在本地
####提取表型文件
table(sc$celltype)
phe <- sc$celltype
phe = as.character(phe)
names(phe) <- rownames(sc@meta.data)
####提取表達矩陣
mat <- as.matrix(sc@assays$RNA@counts)
mat[1:4,1:4]
results <- CytoTRACE(mat = mat)
#可視化
plotCytoGenes(results, numOfGenes = 10)
plotCytoTRACE(results, phenotype = phe)