搜索
查看: 6723|回复: 0

[software] GOsim计算GO terms之间的功能相似性和GO富集分析

[复制链接]

7

主题

12

帖子

225

积分

中级会员

Rank: 3Rank: 3

积分
225
QQ
发表于 2017-6-26 20:24:54 | 显示全部楼层 |阅读模式
本帖最后由 hfliu 于 2017-6-26 20:24 编辑

GOsim 用于计算GO terms之间的功能相似性,还可以进行GO富集分析
R教程    文献
[AppleScript] 纯文本查看 复制代码
#导入包
library(GOSim)
#Resnik方法计算相似性
getTermSim(c("GO:0007166","GO:0007267","GO:0007584","GO:0007165","GO:0007186"),method="Resnik",verbose=FALSE)
#导入人类所有的关于生物过程(biological process)的GO Terms,同理ICsMFhumanall and ICsCChumanall是关于分子功能和细胞组分
data("ICsBPhumanall")
IC[c("GO:0007166","GO:0007267","GO:0007584","GO:0007165","GO:0007186")]
#Jiang and Conrath’s pairwise similarity between GO terms
getTermSim(c("GO:0007166","GO:0007267","GO:0007584","GO:0007165","GO:0007186"),verbose=FALSE)
#Lin’s pairwise similarity between GO terms
getTermSim(c("GO:0007166","GO:0007267","GO:0007584","GO:0007165","GO:0007186"),method="Lin",verbose=FALSE)
library(igraph)
G = getGOGraph(c("GO:0007166","GO:0007267"))
G2 = igraph.from.graphNEL(G)
plot(G2, vertex.label=V(G2)$name)
#Minimum Subsumer
getMinimumSubsumer("GO:0007166","GO:0007267")
# set of disjunctive common ancestors consists of the minimum subsumer
getDisjCommAnc("GO:0007166","GO:0007267")
# CoutoResnik pairwise similarity between GO terms
getTermSim(c("GO:0007166","GO:0007267"),method="CoutoResnik",verbose=FALSE)
setEnrichmentFactors(alpha=0.5,beta=0.3)
# CoutoEnriched pairwise similarity between GO terms 
getTermSim(c("GO:0007166","GO:0007267"),method="CoutoEnriched",verbose=FALSE)
getGOInfo(c("8614","2852"))
#the optimal assignment of GO terms associated to the gene having fewer annotation to the GO terms of the other gene.
getGeneSim(c("8614","2852"),similarity="OA",similarityTerm="Lin",avg=FALSE, verbose=FALSE)
#the maximum similarity between any two GO terms
getGeneSim(c("8614","2852"),similarity="max",similarityTerm="Lin",verbose=FALSE)
# based on the average of best matching GO terms
getGeneSim(c("8614","2852"),similarity="funSimMax",similarityTerm="Lin",verbose=FALSE)
#Hausdorff distance between two sets
getGeneSim(c("8614","2852"),similarity="hausdorff",similarityTerm="Lin",verbose=FALSE)
#还有其他一些相似性计算的方法,可以看帮助
library(org.Hs.eg.db)
library(topGO)
#suppose these are all genes
allgenes = union(c("8614", "9518", "780", "2852"), sample(keys(org.Hs.egGO), 1000)) 
# print out what cluster 1 is about
#用法GOenrichment(genesOfInterest, allgenes, cutoff=0.01, method="elim"),其中genesOfInterest要是allgenes中的子集
GOenrichment(c("8614", "9518", "780", "2852"), allgenes) 




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|生信技能树 ( 粤ICP备15016384号-2  

GMT+8, 2023-5-28 06:55 , Processed in 0.186107 second(s), 36 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.