富集分析神包clusterProfiler集成了很多富集分析工具,如GO,KEGG,DO,GSEA,DAVID等。并且对于每种富集分析方法的结果,Y叔也写出了配套的可视化软件包:《enrichplot: 让你们对clusterProfiler系列包无法自拔》。关于这一系列包,Y叔在github上写成了一本书:https://yulab-smu.github.io/clusterProfiler-book/chapter12.html。最近enrichplot包更新了emapplot()
和cnetplot()
对compareCluster()
结果的支持,今天主要讲讲cnetplot
的更新。
1、安装clusterProfiler,DOSE,enrichplot
目前此功能只在github上更新,因此从github上安装这几个包。如果从Bioconductor上安装旧版本的包,就可能遇到本教程的某些function无法运行。(2020年4月28号出新版Bioconductor,到时候就不需要github版了,尝鲜才需要用github版)
if(!requireNamespace("devtools", quietly = TRUE))
install.packages("devtools")
devtools::install_github("YuLab-SMU/clusterProfiler")
devtools::install_github("YuLab-SMU/DOSE")
devtools::install_github("YuLab-SMU/enrichplot")
library(clusterProfiler)
library(DOSE)
library(enrichplot)
2、Gene-Concept Network
cnetplot
函数可以将基因与它们所富集到的 biological concepts(如GO terms和KEGG pathways等)之间的复杂联系用网络图清晰的展现出来。
以下图片是对单个基因集