【问题记录1:R-ClusterProfiler相关包安装失败】

在我以为ClusterProfiler已经安装好的时候,又遇到了一些问题。
后遂记录一下这些问题和解决方法。

报错1:

BiocManager::install(“org.Hs.eg.db”)

Warning messages:
1: In file.copy(savedcopy, lib, recursive = TRUE) :
拷贝C:\Users\xyf\Documents\R\win-library\4.0\00LOCK\graphlayouts\libs\x64\graphlayouts.dll到C:\Users\xyf\Documents\R\win-library\4.0\graphlayouts\libs\x64\graphlayouts.dll时出了问题:Permission denied
2: In file.copy(savedcopy, lib, recursive = TRUE) :
拷贝C:\Users\xyf\Documents\R\win-library\4.0\00LOCK\igraph\libs\x64\igraph.dll到C:\Users\xyf\Documents\R\win-library\4.0\igraph\libs\x64\igraph.dll时出了问题:Permission denied

在下载这个人类基因注释库的时候报错了。

解决:

我去查了一下,有人说是要到C:\Users\xyf\Documents\R\win-library\4.0\ 下,把graphlayouts\,igraph\ 都删掉
参考下面这篇文章:
R包安装Permission denied 问题解决
发现需要把R关掉,才能删,再打开R,再次下载这个包。

发现又报错了:

报错2:

Warning message:
package(s) not installed when version(s) same as current; use force = TRUE to re-install: ‘org.Hs.eg.db’

解决:

按照它的提示, 把那句话加到命令里边:

BiocManager::install("org.Hs.eg.db",force =TRUE)
the downloaded binary packages are in
	C:\Users\xyf\AppData\Local\Temp\RtmpgVEIZE\downloaded_packages
org.Hs.eg.db
OrgDb object:
| DBSCHEMAVERSION: 2.1
| Db type: OrgDb
| Supporting package: AnnotationDbi
| DBSCHEMA: HUMAN_DB
| ORGANISM: Homo sapiens
| SPECIES: Human
| EGSOURCEDATE: 2020-Sep23
| EGSOURCENAME: Entrez Gene
| EGSOURCEURL: ftp://ftp.ncbi.nlm.nih.gov/gene/DATA
| CENTRALID: EG
| TAXID: 9606
| GOSOURCENAME: Gene Ontology
| GOSOURCEURL: http://current.geneontology.org/ontology/go-basic.obo
| GOSOURCEDATE: 2020-09-10
| GOEGSOURCEDATE: 2020-Sep23
| GOEGSOURCENAME: Entrez Gene
| GOEGSOURCEURL: ftp://ftp.ncbi.nlm.nih.gov/gene/DATA
| KEGGSOURCENAME: KEGG GENOME
| KEGGSOURCEURL: ftp://ftp.genome.jp/pub/kegg/genomes
| KEGGSOURCEDATE: 2011-Mar15
| GPSOURCENAME: UCSC Genome Bioinformatics (Homo sapiens)
| GPSOURCEURL: 
| GPSOURCEDATE: 2020-Aug27
| ENSOURCEDATE: 2020-Aug18
| ENSOURCENAME: Ensembl
| ENSOURCEURL: ftp://ftp.ensembl.org/pub/current_fasta
| UPSOURCENAME: Uniprot
| UPSOURCEURL: http://www.UniProt.org/
| UPSOURCEDATE: Mon Oct  5 00:18:02 2020
Please see: help('select') for usage information
#成功啦

由于在下载注释包的时候,移除了两个包:igraph 和graphlayouts。之后载入clusterprofiler的时候就出问题了。

报错3:

> library(clusterProfiler)
错误: package or namespace load failed for ‘clusterProfiler’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 不存在叫‘igraph’这个名字的程辑包

library(clusterProfiler)
错误: package or namespace load failed for ‘clusterProfiler’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
不存在叫‘igraph’这个名字的程辑包

尝试了两种安装方法都没用:
biocmanager::install 找不到这个包。
然后:

> install.packages("igragh")
Installing package into ‘C:/Users/xyf/Documents/R/win-library/4.0(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘igragh’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

发现也不行。

解决:

遂上网搜索答案,有人说是因为源,可以换一些镜像源,才能找到那个包。参考下面这篇:
解决Package is not available (for R version XXX)
于是:

install.packages('igraph',repos='http://cran.us.r-project.org')
install.packages('graphlayouts',repos='http://cran.us.r-project.org')

这两个在之前删掉的包就又下载好了。
Yes!!!

你可能感兴趣的:(生物信息学,r语言,visual,studio,开发语言)