美文网首页
R坑一:installation of package ‘org

R坑一:installation of package ‘org

作者: scdzzdw | 来源:发表于2019-10-23 10:37 被阅读0次

    使用ChIPseeker做ChIP-Seq注释时,需安装“org.Mm.eg.db”,于是使用以下命令下载安装:

    
    BiocManager::install("org.Mm.eg.db")
    
    

    结果报错如下:

    
    Bioconductor version 3.8 (BiocManager 1.30.8), ?BiocManager::install for help
    
    Bioconductor version '3.8' is out-of-date; the current release version '3.9' is available with R version
    
      '3.6'; see https://bioconductor.org/install
    
    Bioconductor version 3.8 (BiocManager 1.30.8), R 3.5.1 (2018-07-02)
    
    Installing package(s) 'org.Mm.eg.db'
    
    installing the source package ‘org.Mm.eg.db’
    
    trying URL 'https://bioconductor.org/packages/3.8/data/annotation/src/contrib/org.Mm.eg.db_3.7.0.tar.gz'
    
    Content type 'application/x-gzip' length 69822781 bytes (66.6 MB)
    
    downloaded 66.6 MB
    
    * installing *source* package 'org.Mm.eg.db' ...
    
    ** R
    
    ** inst
    
    ** byte-compile and prepare package for lazy loading
    
    Error: package or namespace load failed for 'AnnotationDbi' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
    
     there is no package called 'RSQLite'
    
    Error : package 'AnnotationDbi' could not be loaded
    
    ERROR: lazy loading failed for package 'org.Mm.eg.db'
    
    * removing 'C:/Users/zhangdengwei/Documents/R/win-library/3.5/org.Mm.eg.db'
    
    In R CMD INSTALL
    
    The downloaded source packages are in
    
    ‘C:\Users\zhangdengwei\AppData\Local\Temp\RtmpIDBXB0\downloaded_packages’
    
    Installation path not writeable, unable to update packages: boot, class, cluster, codetools, foreign,
    
      KernSmooth, lattice, MASS, Matrix, mgcv, nlme, rpart, survival
    
    Old packages: 'digest'
    
    Update all/some/none? [a/s/n]: 
    
    a
    
      There is a binary version available but the source version is later:
    
           binary source needs_compilation
    
    digest 0.6.21 0.6.22              TRUE
    
      Binaries will be installed
    
    trying URL 'https://cran.csiro.au/bin/windows/contrib/3.5/digest_0.6.21.zip'
    
    Content type 'application/zip' length 237366 bytes (231 KB)
    
    downloaded 231 KB
    
    package ‘digest’ successfully unpacked and MD5 sums checked
    
    The downloaded binary packages are in
    
    C:\Users\zhangdengwei\AppData\Local\Temp\RtmpIDBXB0\downloaded_packages
    
    Warning message:
    
    In install.packages(...) :
    
      installation of package ‘org.Mm.eg.db’ had non-zero exit status
    
    

    后面去官网问了,有人建议说可能是缓存路径含有中文字符,确认了下不是这个问题,然后在网上查了下,决定使用已下载到本地的包进行安装,使用以下命令:

    
    install.packages("C:\\Users\\zhangdengwei\\AppData\\Local\\Temp\\RtmpIDBXB0\\downloaded_packages\\org.Mm.eg.db_3.7.0.tar.gz")
    
    

    还是报错....

    
    Installing package into ‘C:/Users/zhangdengwei/Documents/R/win-library/3.5’
    
    (as ‘lib’ is unspecified)
    
    Warning in install.packages :
    
      package ‘C:\Users\zhangdengwei\AppData\Local\Temp\RtmpIDBXB0\downloaded_packages\org.Mm.eg.db_3.7.0.tar.gz’ is not available (for R version 3.5.1)
    
    

    不死心,继续试,使用Rstudio菜单栏导入本地模块进行安装,如下

    image

    Tools中的 Install Packages,然后导入本地安装已下载的压缩包进行安装,继续报错...

    
    > install.packages("C:/Users/zhangdengwei/AppData/Local/Temp/RtmpIDBXB0/downloaded_packages/org.Mm.eg.db_3.7.0.tar.gz", repos = NULL, type = "source")
    
    Installing package into ‘C:/Users/zhangdengwei/Documents/R/win-library/3.5’
    
    (as ‘lib’ is unspecified)
    
    * installing *source* package 'org.Mm.eg.db' ...
    
    ** R
    
    ** inst
    
    ** byte-compile and prepare package for lazy loading
    
    Error: package or namespace load failed for 'AnnotationDbi' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
    
     there is no package called 'RSQLite'
    
    Error : package 'AnnotationDbi' could not be loaded
    
    ERROR: lazy loading failed for package 'org.Mm.eg.db'
    
    * removing 'C:/Users/zhangdengwei/Documents/R/win-library/3.5/org.Mm.eg.db'
    
    In R CMD INSTALL
    
    Warning in install.packages :
    
      installation of package ‘C:/Users/zhangdengwei/AppData/Local/Temp/RtmpIDBXB0/downloaded_packages/org.Mm.eg.db_3.7.0.tar.gz’ had non-zero exit status
    
    

    不过这次发现上述报错里提到没有RSQLite包,安装

    
    > BiocManager::install("RSQLite")
    
    Bioconductor version 3.8 (BiocManager 1.30.8), R 3.5.1 (2018-07-02)
    
    Installing package(s) 'RSQLite'
    
    trying URL 'https://cran.csiro.au/bin/windows/contrib/3.5/RSQLite_2.1.2.zip'
    
    Content type 'application/zip' length 2267199 bytes (2.2 MB)
    
    downloaded 2.2 MB
    
    package ‘RSQLite’ successfully unpacked and MD5 sums checked
    
    The downloaded binary packages are in
    
    C:\Users\zhangdengwei\AppData\Local\Temp\RtmpIDBXB0\downloaded_packages
    
    Installation path not writeable, unable to update packages: boot, class, cluster, codetools, foreign,
    
      KernSmooth, lattice, MASS, Matrix, mgcv, nlme, rpart, survival
    
    Old packages: 'digest'
    
    Update all/some/none? [a/s/n]: 
    
    a
    
      There is a binary version available but the source version is later:
    
           binary source needs_compilation
    
    digest 0.6.21 0.6.22              TRUE
    
      Binaries will be installed
    
    trying URL 'https://cran.csiro.au/bin/windows/contrib/3.5/digest_0.6.21.zip'
    
    Content type 'application/zip' length 237366 bytes (231 KB)
    
    downloaded 231 KB
    
    package ‘digest’ successfully unpacked and MD5 sums checked
    
    The downloaded binary packages are in
    
    C:\Users\zhangdengwei\AppData\Local\Temp\RtmpIDBXB0\downloaded_packages
    
    

    然后再安装

    
    > install.packages("C:/Users/zhangdengwei/AppData/Local/Temp/RtmpIDBXB0/downloaded_packages/org.Mm.eg.db_3.7.0.tar.gz", repos = NULL, type = "source")
    
    Installing package into ‘C:/Users/zhangdengwei/Documents/R/win-library/3.5’
    
    (as ‘lib’ is unspecified)
    
    * installing *source* package 'org.Mm.eg.db' ...
    
    ** R
    
    ** inst
    
    ** byte-compile and prepare package for lazy loading
    
    ** help
    
    *** installing help indices
    
      converting help for package 'org.Mm.eg.db'
    
        finding HTML links ... 好了
    
        org.Mm.egACCNUM                         html  
    
        org.Mm.egALIAS2EG                       html  
    
        org.Mm.egBASE                           html  
    
        org.Mm.egCHR                            html  
    
        org.Mm.egCHRLENGTHS                     html  
    
        org.Mm.egCHRLOC                         html  
    
        org.Mm.egENSEMBL                        html  
    
        org.Mm.egENSEMBLPROT                    html  
    
        org.Mm.egENSEMBLTRANS                   html  
    
        org.Mm.egENZYME                         html  
    
        org.Mm.egGENENAME                       html  
    
        org.Mm.egGO                             html  
    
        org.Mm.egMAPCOUNTS                      html  
    
        org.Mm.egMGI                            html  
    
        org.Mm.egORGANISM                       html  
    
        org.Mm.egPATH                           html  
    
        org.Mm.egPFAM                           html  
    
        org.Mm.egPMID                           html  
    
        org.Mm.egPROSITE                        html  
    
        org.Mm.egREFSEQ                         html  
    
        org.Mm.egSYMBOL                         html  
    
        org.Mm.egUNIGENE                        html  
    
        org.Mm.egUNIPROT                        html  
    
        org.Mm.eg_dbconn                        html  
    
    ** building package indices
    
    ** testing if installed package can be loaded
    
    * DONE (org.Mm.eg.db)
    
    In R CMD INSTALL
    
    

    ok,这下可以了。再回头看,发现最开始已经提示没有RSQLite包,哎,真是太菜了,还是要细心呀

    相关文章

      网友评论

          本文标题:R坑一:installation of package ‘org

          本文链接:https://www.haomeiwen.com/subject/bnvhvctx.html