主要采用clusterProfiler包来进行富集,首先贴一个官方说明clusterProfiler。
在推荐一个clusterProfiler的文章,各种参数都讲的很详细:搜狗搜索引擎 - 上网从搜狗开始..
富集可以有不同的参考基因组,Bioconductor - BiocViews这个网站可以查看有哪些物种的参考基因组,并有下载代码。
首先下载并加载几个R包:
source("http://bioconductor.org/biocLite.R")
biocLite("clusterProfiler")#包的名称换了就可以下载其他的包
library(GOplot)#绘图包
library(clusterProfiler)#采用该包进行富集
library(org.Bt.eg.db)#牛的参考基因组
载入包的时候发生报错(附解决方法):Error: package or namespace load failed for ‘clusterProfiler’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
不存在叫‘data.table’这个名字的程辑包