最近用来做功能注释的方法非常多,走过多个坑之后,对功能注释做一个总结。
我们常用的功能注释也就是GO,KEGG,和Reactom,MSigDB数据库都有提供其gmt文件,对于熟悉注释富集的、需要一定专业度或者特定需求的,可以直接下载其.gmt文件对自己的基因集进行注释。
MSigDB网址:https://www.gsea-msigdb.org/gsea/msigdb/index.jsp

最简单的方法是使用网页进行分析
一、网页
(1)gprofiler
gprofiler是作者用过相对好用的一个网页进行注释的方法,它的用法很简洁,最最主要的是,它输出的图的配色都是很好看的。所以这里主要介绍一下这个怎么用!
g:Profiler:https://biit.cs.ut.ee/gprofiler/gost


gprofiler也提供.gmt文件的下载,而且其数据格式更加规范。因为MsigDB给定的term name都是大写,不方便看。(不过KEGG的gmt文件由于版权不可以下载,但是直接使用gprofiler可以进行KEGG通路的富集。)
输入geneset后富集到的结果


而且,gprofiler是有其R包可用的,可以方便批量的处理数据。
library(gprofiler2)
gostres <- gost(query = gene.list,organism = "hsapiens",
user_threshold = 0.05,correction_method = "fdr",sources = NULL)
#source设置为NULL的情况下,会富集所有数据库中的term,可选GO (GO:BP, GO:MF, GO:CC to select a particular GO branch), KEGG, REAC, TF, MIRNA, CORUM, HP, HPA, WP
enrichment_result<-gostres$result
#也可以再结果中选择需要的数据库的term
bp_result<-enrichment_result[which(enrichment_result$source=="GO:BP"),]#BP
kegg_result<-enrichment_result[which(enrichment_result$source=="KEGG"),]#KEGG
二、R包
使用R包进行功能注释的话,另外一个比较推荐的R包是ClusterProfier
1.ClusterProfier用法介绍.R
#注释
#'我们首先以MsigGB数据库进行reactome注释
#'自定义输入gmt文件,至下载MsigGB数据库
reactome.gmt<-readGMT(file = "reactom.gmt",num = 2)#自己写的读取gmt文件的函数
result <- enricher(gene,TERM2GENE=reactome.gmt[,c(1,3)],TERM2NAME = reactome.gmt[,c(1,2)],pvalueCutoff = 0.05,pAdjustMethod = "BH")
三、cytoscape
cytoscape是用来画网络图的,但是它的一些包,对可视化通路富集的结果非常友好。
1.ClueGO
clueGO可以直接输入需要富集的基因集合或者已经提前处理好的注释term。它内部采取的ontologies或pathway都是比较新的,并且可以根据使用者自己更新。
关于ClueGO的使用方法,推荐bilibili上的视频介绍
已经非常详细:https://www.bilibili.com/video/BV1TK411W7TM?from=search&seid=15782532823298096980

2.enrichmentMap
另外一个比较经典且强大的包,肯定就是enrichmentMap了。使用方法可以查看enrichmentMap给的教程。

网友评论