栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Go语言

R语言GO富集分析报错求助

Go语言 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

R语言GO富集分析报错求助

R studio运行别人共享的关于差异基因GO富集分析作图的代码,报错如图。检索网页后未找到解决办法,更新R包到最新版后依然报错。请前辈们支招,谢谢!

报错:

Error in has_pairsim(x) : 
  Term similarity matrix not available. Please use pairwise_termsim function to deal with the results of enrichment analysis.

出错部分:

> for(i in c("BP","CC","MF")){
+     #GO???????
+     kk=enrichGO(gene = gene,OrgDb = org.Hs.eg.db, pvalueCutoff =1, qvalueCutoff = 1, ont=i, readable =T)
+     GO=as.data.frame(kk)
+     GO=GO[(GO$pvalue +     write.table(GO,file=paste0(i,".txt"),sep="t",quote=F,row.names = F)                 #???渻????
+     showNum=30
+     if(nrow(GO)<30){
+         showNum=nrow(GO)
+     }
+     if(nrow(GO)!=0){
+         #?״ͼ
+         pdf(file=paste0(i,".barplot.pdf"),width = 11,height = 7)
+         bar=barplot(kk, drop = TRUE, showCategory =showNum,color = colorSel)
+         print(bar)
+         dev.off()
+         
+         #??ͼ
+         pdf(file=paste0(i,".bubble.pdf"),width = 11,height = 7)
+         bub=dotplot(kk,showCategory = showNum, orderBy = "GeneRatio", color = colorSel)
+         print(bub)
+         dev.off()
+         
+         #Ȧͼ
+         pdf(file=paste0(i,".circos.pdf"),width = 8,height = 5.5)
+         cnet=cnetplot(kk, foldChange=geneFC, circular = TRUE, colorEdge = TRUE)
+         print(cnet)
+         dev.off()
+         
+         #Enrichment Map
+         pdf(file=paste0(i,".emapplot.pdf"),width = 7,height = 6)
+         emap=emapplot(kk, showCategory = showNum, color = colorSel)
+         print(emap)
+         dev.off()
+     }
+ }
 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/945494.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号