本文轉(zhuǎn)載自:http://www.360doc.com/content/22/0604/23/76149697_1034565139.shtml
最近在做KEGG富集分析時(shí)艘策,碰到了一個(gè)問題,問題如下:
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/hsa/pathway': status was 'Failure when receiving data from the peer'
通過學(xué)習(xí)Jimmy老師的文章渊季,http://www.360doc.com/content/22/0604/23/76149697_1034565139.shtml朋蔫,問題已解決,非常感謝Jimmy老師却汉!在此做一個(gè)記錄驯妄,僅供學(xué)習(xí)交流,如有侵權(quán)合砂,請(qǐng)聯(lián)系我富玷,立馬撤掉。
Y叔的clusterProfiler包的下載協(xié)議是:
getOption("clusterProfiler.download .method")
[1]"libcurl"
下載函數(shù)(utils:.download.file和downloader:.download)使用默認(rèn)的方法既穆,也就是 'auto’是可以去訪問的,
但是如果是"libcurl"的協(xié)議幻工,就會(huì)失敗励两。
所以,最簡單的解決方案就是修改這個(gè)默認(rèn)的協(xié)議即可当悔,解決方案:
install.packages("R.utils")
library(R.utils)
R.utils::setOption("clusterProfiler.download.method","auto")
之后,再運(yùn)行enrichKEGG就可以跑通了嗅骄。
KEGG數(shù)據(jù)庫沒有倒閉溺森,Y叔的clusterProfiler包也問題不大屏积。僅僅是因?yàn)镽語言里面的下載文件的函數(shù)的協(xié)議需要注意僧叉,這兩個(gè)函數(shù)兩個(gè)下載函數(shù)(utils:download.file和downloader:.download)题画,都太底層了。初學(xué)者確實(shí)不容易找到問題所在德频。
道阻且長,行則將至 行而不輟,未來可期