enrichplot—简而美的富集结果可视化

enrichplot实现了多种可视化方法来解释富集结果。支持从DOSE (Yu et al. 2015)、clusterProfiler (Yu et al.2012)、ReactomePA (Yu and He 2016)和meshes获得的富集结果进行可视化。同时支持过表达分析(ORA)和基因集富集分析(GSEA)。今天我们来展示enrichplot神奇的绘图功能。

准备工作
if (!requireNamespace("BiocManager", quietly = TRUE))    install.packages("BiocManager")BiocManager::install("enrichplot")library(enrichplot);browseVignettes("enrichplot")
library(DOSE)library(dplyr)library(clusterProfiler)
##输入基因集合DEG##及每个基因的倍数变换值fc
edo <- enrichDGN(DEG)#entrez gene ID#除了DisGeNET,包括GO、KEGG、DO、wikiPathways、MSigDb

绘图函数
01
goplot()
还记得%>%这个管道符吗?
enrichGO(DEG,'org.Hs.eg.db') %>% goplot()
#这里我只富集到一个GO term,报错了。

02
barplot() & dotplot()

条形图、泡泡图是最常用的富集可视化方法,用条形高度、点大小和颜色来描述富集分数(例如p值)和基因数或比例。

barplot(edo, showCategory=50)
dotplot(edo, showCategory=50)

03
cnetplot()
直观展示通路和基因的联系。
setReadable(edo, 'org.Hs.eg.db', 'ENTREZID') %>% cnetplot(, showCategory = 20,#展示富集条目数量,默认5  foldChange = fc,#倍数值  colorEdge = TRUE,categorySize='pvalue',# 中心点大小, or 'geneNum'  circular = TRUE,#圆形排列  node_label = "all")

这里有个坑,但我不说,大家自己动手画图试试吧。感谢Erqiang Hu(enrichplot,DOSE作者之一)伸出援手。
04
emapplot()

构建网络,其边连接重叠的基因集。这样一来,有重叠的基因集聚在一起,便于识别功能模块。

emapplot(  edo,  showCategory = 30,  color = "p.adjust",#设置颜色,也可以用pvalue, qvalue  layout = "sphere",##布局  pie_scale = 1,#点大小  line_scale = 1#线条粗细)

05
heatplot()
类似于cnetplot,展示为一个热图。适用于基因多,heatplot可以简化结果,更容易识别表达模式。
setReadable(edo, 'org.Hs.eg.db', 'ENTREZID') %>% heatplot(,foldChange=fc)

06
pmcplot()

根据PubMed Central的查询结果绘制出版物数量/比例趋势图。

pmcplot(edo$Description[1:5], 2015:2020)

小编总结
只用一行代码也能画出美观又有创意的富集分析图形,快去试试吧~
if (!requireNamespace("BiocManager", quietly = TRUE))    install.packages("BiocManager")BiocManager::install("enrichplot")library(enrichplot);library(DOSE);library(dplyr);library(clusterProfiler)
##输入基因集合DEG及每个基因的倍数变换值fc
edo <- enrichDGN(DEG)
#golpotenrichGO(DEG,'org.Hs.eg.db') %>% goplot()
#barplotbarplot(edo, showCategory=50)
#dotplotdotplot(edo, showCategory=50)
#cnetplotsetReadable(edo, 'org.Hs.eg.db', 'ENTREZID') %>% cnetplot(,showCategory = 20,foldChange = fc,colorEdge = TRUE,categorySize='pvalue',circular = TRUE,node_label = "all")
#emapplotemapplot(edo,showCategory = 30,color = "p.adjust",layout = "sphere",pie_scale = 1,line_scale = 1)
#heatplotsetReadable(edo,'org.Hs.eg.db') %>% heatplot(,foldChange=fc)
#pmcplotpmcplot(edo$Description[1:5], 2015:2020)
统计与绘图

ComplexHeatmap绘制全基因组突变景观图

2020-8-28 4:59:24

统计与绘图

GenVisR绘制全基因组突变景观图

2020-8-28 5:02:19

声明 本网站部分文章源于互联网,出于传递更多信息和学习之目的转载,并不保证内容正确或赞同其观点。
如转载稿涉及失效、版权等问题,请立即联系管理员;我们会予以修改、删除相关文章,请留言反馈
Notice: When your legal rights are being violated, please send an email to: [email protected].
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索