①No gene can be mapped
找到的相关链接处理办法如下:
用clusterProfiler包做KEGG富集分析遇到的问题
报错过程:
首先,我们知道进行KEGG分析之前需要转换基因名(SYMBOL->ENTREZ),更改后的基因部分如下所示:
![](https://i-blog.csdnimg.cn/blog_migrate/9441c5519d2bbc445b3f60981b29832a.png)
(以上可以排除基因不存在的错误因素)
出现错误
KEGG.res <- enrichKEGG(gene=sig.genes.id, organism='hsa')
--> No gene can be mapped....
--> Expected input gene ID:
--> return NULL...
NULL
究其原因
-
网络问题,可以等待之后再试一下(试过不是)
-
版本问题,重新安装一下clusterProfiler包
packageVersion('clusterProfiler')
[1] ‘4.2.0’
解决办法
重新安装R包
devtools::install_github("YuLab-SMU/clusterProfiler")
# 可能会报错说确实其他的包(因为我 不允许其更新其他的包),优先选择更新所有
![](https://i-blog.csdnimg.cn/blog_migrate/e11870c3554171362bcc3cf0e72f3740.png)
conda install -c conda-forge r-data.table
conda install -c conda-forge python-igraph
devtools::install_github("YuLab-SMU/clusterProfiler",force = TRUE)
packageVersion('clusterProfiler')
[1] ‘4.7.1.3’
成功
![](https://i-blog.csdnimg.cn/blog_migrate/f93a8b88948281bbc9275a47d6cf64ba.png)
②KEGG下载的网络问题——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'
原因
KEGG网络问题。有时候重试可以解决。
解决办法
设置‘自动’模式的下载方法。也可以解决~~
library(R.utils)
getOption("clusterProfiler.download.method")
R.utils::setOption("clusterProfiler.download.method","auto")