注释和富集

clusterProfiler包做KEGG富集分析报错的解决办法

2022-09-15  本文已影响0人  Z_bioinfo

Y叔的clusterProfiler包大家都知道,enrichKEGG 函数做KEGG富集分析的时候会报如下错误:

MedBioInfoCloud: eKEGG <- enrichKEGG(d2e1$ENTREZID, organism = "mmu", pvalueCutoff=0.01)
Reading KEGG annotation online:

fail to download KEGG data...
Error in download.KEGG.Path(species) : 
  'species' should be one of organisms listed in 'http://www.genome.jp/kegg/catalog/org_list.html'...
In addition: Warning message:
In utils::download.file(url, quiet = TRUE, method = method, ...) :
  URL 'https://rest.kegg.jp/link/mmu/pathway': status was 'Failure when receiving data from the peer'[图片上传中...(3778506505572ec90651b9e902f337dd.png-aceb49-1663243900180-0)]

3778506505572ec90651b9e902f337dd.png

解决办法:

install.packages('R.utils')
R.utils::setOption( "clusterProfiler.download.method",'auto' )

然后再运行enrichKEGG()函数
如果pathview函数报错,那就先执行下面代码:

# library(R.utils)
R.utils::setOption( "download.file.method",'wininet' )
#之后pathview()函数就可以正常运行得到kegg通路的图片了
上一篇 下一篇

猜你喜欢

热点阅读