Question: Cannot install snpStats packages
1
gravatar for zwang10
4.2 years ago by
zwang1010
United States
zwang1010 wrote:

I follow the instruction from https://www.bioconductor.org/install/. But I got error as following

> source("http://bioconductor.org/biocLite.R")
Warning in install.packages("BiocInstaller", repos = a["BioCsoft", "URL"]) :
  'lib = "/share/apps/R/3.1.1/intel/2013.0.028/lib64/R/library"' is not writable
Error in install.packages("BiocInstaller", repos = a["BioCsoft", "URL"]) : 
  unable to install packages
Calls: source ... eval.parent -> eval -> eval -> eval -> eval -> install.packages
Execution halted

Can someone help me here?

snpstats bioconductor R • 3.9k views
ADD COMMENTlink modified 4 months ago by UMen0 • written 4.2 years ago by zwang1010

Follow this:

#To install core packages:
source("https://bioconductor.org/biocLite.R")
biocLite()
#To install specific packages
source("https://bioconductor.org/biocLite.R")
biocLite("snpStats")
ADD REPLYlink modified 4.2 years ago • written 4.2 years ago by Pranavathiyani G310

Dear gemini,

sorry but that doesn't work for R 3.6.1

 if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
Installing package into ‘C:/Users/ugem/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository https://cran.uib.no/src/contrib:
  cannot open destfile 'C:\Users\ugem\AppData\Local\Temp\Rtmpmi2CkS\file641442e6cb5', reason 'No such file or directory'
Error in gzfile(file, mode) : cannot open the connection
In addition: Warning messages:
1: package ‘BiocManager’ is not available (for R version 3.6.1) 
2: In gzfile(file, mode) :
  cannot open compressed file 'C:\Users\uwemenze\AppData\Local\Temp\Rtmpmi2CkS/libloc_196_fd84b67.rds', probable reason 'No such file or directory'
ADD REPLYlink modified 4 months ago by zx87549.6k • written 4 months ago by UMen0

One thing you could try is getting used to conda. Conda lets you manage many different environments with different versions of R. Usually installing packages are as simply as conda install [package]'. When using a new package the first thing I do these days is to look and see if it is install-able with conda

https://anaconda.org/bioconda/bioconductor-snpstats

ADD REPLYlink written 4 months ago by curious440
3
gravatar for Guangchuang Yu
4.2 years ago by
Guangchuang Yu2.4k
China/Guangzhou/Southern Medical University
Guangchuang Yu2.4k wrote:

'lib = "/share/apps/R/3.1.1/intel/2013.0.028/lib64/R/library"' is not writable

Obviously, you don't have the permission to install package to the R library folder.

  1. add the following lines to ~/.Renviron: R_LIBS_USER='~/R/library'

  2. try again:

source("https://bioconductor.org/biocLite.R")
biocLite("snpStats")

You should be able to install any package you want.

ADD COMMENTlink modified 4.2 years ago • written 4.2 years ago by Guangchuang Yu2.4k

you may need to mkdir -p ~/R/library if it complained that the folder does not exists.

ADD REPLYlink modified 4.2 years ago • written 4.2 years ago by Guangchuang Yu2.4k
1
gravatar for gemini.venkat
10 months ago by
gemini.venkat20 wrote:

With the latest update you have to do the same but install BiocManager : This is done only for version R > 3.4

  if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install()

and then :

BiocManager::install(c("snpStats"))

works for now

ADD COMMENTlink modified 10 months ago by zx87549.6k • written 10 months ago by gemini.venkat20
0
gravatar for UMen
4 months ago by
UMen0
Sweden
UMen0 wrote:

Thanks for the answers, I found another solution by myself:

  1. download "snpStats_1.38.0.zip" from Bioconductor
  2. install.packages(file.choose(), repos = NULL, type="source") # choose zipfile downloaded
ADD COMMENTlink modified 4 months ago by zx87549.6k • written 4 months ago by UMen0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 851 users visited in the last hour