simplifyEnrichment可以将GO富集分析的结果简化,让用户能够得到最重要的信息!
###通过github安装simplifyEnrichment包library(devtools)install_github("jokergoo/simplifyEnrichment")library(simplifyEnrichment)library(GOSemSimlibrary(simplifyEnrichment)set.seed(888)go_id = random_GO(500)
mat = GO_similarity(go_id)
df = simplifyGO(mat)
在热图的右侧,有词云注释,用关键字总结了每个 GO cluster中的功能。
返回的变量 df 是一个带有 go id、GO terms和cluster标签的数据框:
head(df)## id term cluster## 1 GO:0003283 atrial septum development 1## 2 GO:0022018 lateral ganglionic eminence cell proliferation 1## 3 GO:0030032 lamellipodium assembly 2## 4 GO:0061508 CDP phosphorylation 3## 5 GO:1901222 regulation of NIK/NF-kappaB signaling 4## 6 GO:0060164 regulation of timing of neuron differentiation 1
在simpleEnrichment 包中,还有比较不同方法的聚类结果的函数。这里仍然使用先前生成的变量 mat。使用compare_clustering_methods() 函数即可进行各种聚类结果的比较。
结果包括:①、将不同聚类作为行注释的相似性矩阵的热图。
②、聚类结果一致性的热图
③、每种方法的差异分数的条形图
④、聚类数
⑤、相同聚类中的terms的平均相似度
compare_clustering_methods(mat)## Cluster 500 terms by 'binary_cut'... 43 clusters, used 0.8137581 secs.## Cluster 500 terms by 'kmeans'... 16 clusters, used 3.310741 secs.## Cluster 500 terms by 'dynamicTreeCut'... 58 clusters, used 0.1416259 secs.## Cluster 500 terms by 'apcluster'... 39 clusters, used 0.5024211 secs.## Cluster 500 terms by 'hdbscan'... 13 clusters, used 0.1711211 secs.## Cluster 500 terms by 'fast_greedy'... 29 clusters, used 0.1007149 secs.## Cluster 500 terms by 'leading_eigen'... 30 clusters, used 0.220422 secs.## Cluster 500 terms by 'louvain'... 29 clusters, used 0.06802702 secs.## Cluster 500 terms by 'walktrap'... 26 clusters, used 0.2167759 secs.## Cluster 500 terms by 'MCL'... 28 clusters, used 2.415706 secs.
如果 plot_type 参数设置为heatmap,会展示不同聚类方法下的相似度矩阵热图。 最后是一个包含cluster数量的表格。
compare_clustering_methods(mat, plot_type = "heatmap")
如果有多个 GO 富集结果列表(比如来自多组基因),并且想要比较不同列表之间的显著项。simplifyEnrichment包中有一个函数simpleGOFromMultipleLists() 可以进行这种类型的分析。
library(cola)data(golub_cola)res = golub_cola["ATC:skmeans"]library(hu6800.db)x = hu6800ENTREZIDmapped_probes = mappedkeys(x)id_mapping = unlist(as.list(x[mapped_probes]))lt = functional_enrichment(res, k = 3, id_mapping = id_mappinghead(lt[[1]][, 1:7])## ID Description GeneRatio BgRatio## GO:0033993 GO:0033993 response to lipid 50/344 909/18866## GO:0019725 GO:0019725 cellular homeostasis 47/344 971/18866## GO:0023061 GO:0023061 signal release 33/344 564/18866## GO:0055082 GO:0055082 cellular chemical homeostasis 41/344 827/18866## GO:0051046 GO:0051046 regulation of secretion 37/344 702/18866## GO:0009725 GO:0009725 response to hormone 43/344 905/18866## pvalue p.adjust qvalue## GO:0033993 2.639457e-12 1.157402e-08 9.193646e-09## GO:0019725 9.377891e-10 2.056103e-06 1.633234e-06## GO:0023061 4.079967e-09 5.516571e-06 4.382004e-06## GO:0055082 6.279164e-09 5.516571e-06 4.382004e-06## GO:0051046 7.429653e-09 5.516571e-06 4.382004e-06## GO:0009725 9.083416e-09 5.516571e-06 4.382004e-06simplifyGOFromMultipleLists(lt, padj_cutoff = 0.001)
不感兴趣
看过了
取消
人点赞
人收藏
打赏
不感兴趣
看过了
取消
打赏金额
认可我就打赏我~
1元 5元 10元 20元 50元 其它
打赏作者
认可我就打赏我~
扫描二维码
立即打赏给Ta吧!
温馨提示:仅支持微信支付!