scRNAtoolVis包使用:UMAP, featureplot,heatmap美化
参考原文链接:
https://mp.weixin.qq.com/s/K8FHv0dxriaGxKI0efRN5g
https://mp.weixin.qq.com/s/gtnYWJcUubNKT4SIldk9uQ
1.安装
devtools::install_github('junjunlab/scRNAtoolVis') library(scRNAtoolVis) #过程报错,需要首先安装依赖包:magick install.packages("magick") #再次报错,需要先安装magick依赖的imagemagick $conda install conda-forge::imagemagick
2.使用
#test data library(scRNAtoolVis) # load test data test <- system.file("extdata", "seuratTest.RDS", package = "scRNAtoolVis") tmp <- readRDS(test)
具体见最开始参考教程。自己使用的一个示例:
library(scRNAtoolVis) png(paste0("featureplot-main_marker.png"), width = 18, height = 6, res = 400, units = "in") # given a range to plot p1 <- FeatureCornerAxes(object = MERGE,reduction = 'umap', groupFacet = NULL, relLength = 0.5, relDist = 0.1, features =c("CX3CR1","CLDN5","GFAP","PCDH15","MBP"), # aspect.ratio = 1, # themebg = 'bwCorner',#增加方框 minExp = 0,maxExp = 5,#设置最大和最小显示值 show.legend=F #是否显示图例 ) p2 <- FeatureCornerAxes(object = MERGE,reduction = 'umap', groupFacet = NULL, relLength = 0.5, relDist = 0.1, features = c("SATB2", "SLC17A7","CAMK2A","GAD1","GAD2"), # aspect.ratio = 1, # themebg = 'bwCorner' # show.legend=T #是否显示图例 minExp = 0,maxExp = 5#设置表达量最小和最大显示值 ) # combine cowplot::plot_grid(p1,p2,ncol = 1,align = 'hv') #上下两行 # cowplot::plot_grid(p1,p2,ncol=2,align='hv') #两列 dev.off() png(paste0("featureplot-neruon.png"), width = 9, height = 3, res = 400, units = "in") # given a range to plot FeatureCornerAxes(object = MERGE,reduction = 'umap', groupFacet = NULL, relLength = 0.5, relDist = 0.1, features =c("SNAP25", "STMN2", "RBFOX3"), # aspect.ratio = 1, # themebg = 'bwCorner' ) dev.off()
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了