成功安装WGCNA包后,调用时报错

参考本论坛上推荐的bioconductor方式下载了WGCNA包,然后进行了GO.db包的下载和一些更新,之后再次加载就报错了,似乎是解压出了问题?该如何解决,谢谢

> BiocManager::install("WGCNA")
Bioconductor version 3.8 (BiocManager 1.30.4), R 3.5.2 (2018-12-20)
Installing package(s) 'WGCNA'
also installing the dependency ‘GO.db’
trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.5/WGCNA_1.66.zip' Content type 'application/zip' length 3436551 bytes (3.3 MB) downloaded 3.3 MB
package ‘WGCNA’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\NY\AppData\Local\Temp\RtmpYrZpG5\downloaded_packages installing the source package ‘GO.db’
trying URL 'https://bioconductor.org/packages/3.8/data/annotation/src/contrib/GO.db_3.7.0.tar.gz' Content type 'application/x-gzip' length 31820876 bytes (30.3 MB) downloaded 30.3 MB
* installing *source* package 'GO.db' ... ** R ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices converting help for package 'GO.db' finding HTML links ... ºÃÁË GOBASE html GOBPANCESTOR html GOBPCHILDREN html GOBPOFFSPRING html GOBPPARENTS html GOCCANCESTOR html GOCCCHILDREN html GOCCOFFSPRING html GOCCPARENTS html GOMAPCOUNTS html GOMFANCESTOR html GOMFCHILDREN html GOMFOFFSPRING html GOMFPARENTS html GOOBSOLETE html GOSYNONYM html GOTERM html GO_dbconn html ** building package indices ** testing if installed package can be loaded *** arch - i386 *** arch - x64 * DONE (GO.db) In R CMD INSTALL
The downloaded source packages are in ‘C:\Users\NY\AppData\Local\Temp\RtmpYrZpG5\downloaded_packages’ installation path not writeable, unable to update packages: class, codetools, mgcv Update old packages: 'haven', 'maptools', 'VGAM' Update all/some/none? [a/s/n]: a
There are binary versions available but the source versions are later: binary source needs_compilation haven 2.0.0 2.1.0 TRUE maptools 0.9-4 0.9-5 TRUE VGAM 1.0-6 1.1-1 TRUE
Binaries will be installed trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.5/haven_2.0.0.zip' Content type 'application/zip' length 995210 bytes (971 KB) downloaded 971 KB
trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.5/maptools_0.9-4.zip' Content type 'application/zip' length 2142740 bytes (2.0 MB) downloaded 2.0 MB
trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.5/VGAM_1.0-6.zip' Content type 'application/zip' length 7789645 bytes (7.4 MB) downloaded 7.4 MB
package ‘haven’ successfully unpacked and MD5 sums checked package ‘maptools’ successfully unpacked and MD5 sums checked package ‘VGAM’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\NY\AppData\Local\Temp\RtmpYrZpG5\downloaded_packages > library("WGCNA") Error: package or namespace load failed for ‘WGCNA’ in runHook(".onLoad", env, package.lib, package): lazy-load database 'C:/Users/NY/Documents/R/win-library/3.5/GO.db/R/GO.db.rdb' is corrupt In addition: Warning message: In runHook(".onLoad", env, package.lib, package) : internal error -3 in R_decompress1 > library(WGCNA) Error: package or namespace load failed for ‘WGCNA’ in runHook(".onLoad", env, package.lib, package): lazy-load database 'C:/Users/NY/Documents/R/win-library/3.5/GO.db/R/GO.db.rdb' is corrupt In addition: Warning message: In runHook(".onLoad", env, package.lib, package) : internal error -3 in R_decompress1
请先 登录 后评论

最佳答案 2019-02-21 19:33

重新安装WGCNA,并且尽量选择不更新其他软件 :n    

attachments-2019-02-Ow8R0Sfa5c6ca8f24dfc5.jpg

请先 登录 后评论

其它 1 个回答

NeoNY

感谢@Daitoue的回答,现已解决。分享代码如下

> remove.packages("WGCNA", lib="~/R/win-library/3.5")
> BiocManager::install("WGCNA")
Bioconductor version 3.8 (BiocManager 1.30.4), R 3.5.2 (2018-12-20)
Installing package(s) 'WGCNA'
trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/3.5/WGCNA_1.66.zip'
Content type 'application/zip' length 3436551 bytes (3.3 MB)
downloaded 3.3 MB

package ‘WGCNA’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\NY\AppData\Local\Temp\RtmpE7oRi7\downloaded_packages
installation path not writeable, unable to update packages: class,
  codetools, mgcv
Update old packages: 'ggsignif', 'ggthemes', 'haven', 'maptools',
  'robCompositions', 'VGAM', 'xfun'
Update all/some/none? [a/s/n]: 
n
> library(WGCNA)
载入需要的程辑包:dynamicTreeCut
载入需要的程辑包:fastcluster

载入程辑包:‘fastcluster’

The following object is masked from ‘package:stats’:

    hclust


==========================================================================
*
*  Package WGCNA 1.66 loaded.
*
*    Important note: It appears that your system supports multi-threading,
*    but it is not enabled within WGCNA in R. 
*    To allow multi-threading within WGCNA with all available cores, use 
*
*          allowWGCNAThreads()
*
*    within R. Use disableWGCNAThreads() to disable threading if necessary.
*    Alternatively, set the following environment variable on your system:
*
*          ALLOW_WGCNA_THREADS=<number_of_processors>
*
*    for example 
*
*          ALLOW_WGCNA_THREADS=4
*
*    To set the environment variable in linux bash shell, type 
*
*           export ALLOW_WGCNA_THREADS=4
*
*     before running R. Other operating systems or shells will
*     have a similar command to achieve the same aim.
*
==========================================================================



载入程辑包:‘WGCNA’

The following object is masked from ‘package:stats’:

    cor

> 
请先 登录 后评论