【轉(zhuǎn)】Reading KEGG annotation online: fail to download KEGG data... Error in download.KEGG.Path(spe...

本文轉(zhuǎn)載自:http://www.360doc.com/content/22/0604/23/76149697_1034565139.shtml

最近在做KEGG富集分析時,碰到了一個問題,問題如下:

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老師!在此做一個記錄,僅供學(xué)習(xí)交流,如有侵權(quán),請聯(lián)系我,立馬撤掉。


Y叔的clusterProfiler包的下載協(xié)議是:

getOption("clusterProfiler.download .method")

[1]"libcurl"

下載函數(shù)(utils:.download.file和downloader:.download)使用默認(rèn)的方法,也就是 'auto’是可以去訪問的,

但是如果是"libcurl"的協(xié)議,就會失敗。

所以,最簡單的解決方案就是修改這個默認(rèn)的協(xié)議即可,解決方案:

install.packages("R.utils")

library(R.utils)

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

之后,再運行enrichKEGG就可以跑通了。


KEGG數(shù)據(jù)庫沒有倒閉,Y叔的clusterProfiler包也問題不大。僅僅是因為R語言里面的下載文件的函數(shù)的協(xié)議需要注意,這兩個函數(shù)兩個下載函數(shù)(utils:download.file和downloader:.download),都太底層了。初學(xué)者確實不容易找到問題所在。


道阻且長,行則將至 行而不輟,未來可期

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容