Question: Package installation error
0
gravatar for mmalek
2.9 years ago by
mmalek0
Canada
mmalek0 wrote:

I'd like to install the package, but after loading I get the error of "S4Vectors 0.10.1" cannot be unloaded.

The problem is that IRange package requires S4Vectors of 0.11.2 version or higher.

I'd appreciate it if you help me fix this.

Here's my sessionInfo():

R version 3.3.0 (2016-05-03)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C               LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8     LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8    LC_PAPER=en_CA.UTF-8      
 [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] BiocGenerics_0.18.0  rafalib_1.0.0        qvalue_2.4.2         genefilter_1.54.2    BiocInstaller_1.22.2 downloader_0.4       GSE5859Subset_1.0    devtools_1.11.1     

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.5          RColorBrewer_1.1-2   git2r_0.15.0         plyr_1.8.4           tools_3.3.0          digest_0.6.9         jsonlite_0.9.21      annotate_1.50.0      RSQLite_1.0.0       
[10] memoise_1.0.0        gtable_0.2.0         lattice_0.20-33      Matrix_1.2-6         DBI_0.4-1            curl_0.9.7           withr_1.0.1          httr_1.1.0           stringr_1.0.0       
[19] S4Vectors_0.11.5     IRanges_2.7.6        grid_3.3.0           Biobase_2.32.0       R6_2.1.2             AnnotationDbi_1.34.3 XML_3.98-1.1         survival_2.39-4      ggplot2_2.1.0       
[28] reshape2_1.4.1       magrittr_1.5         scales_0.4.0         splines_3.3.0        xtable_1.8-2         colorspace_1.2-6     stringi_1.1.1        munsell_0.4.3     

library(parathyroidSE) ##available from Bioconductor
Loading required package: SummarizedExperiment
Loading required package: GenomicRanges
Loading required package: S4Vectors
Error in unloadNamespace(package) :
  namespace ‘S4Vectors’ is imported by ‘AnnotationDbi’, ‘IRanges’, ‘genefilter’ so cannot be unloaded
Error in library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc,  :
  Package ‘S4Vectors’ version 0.10.1 cannot be unloaded

 

ADD COMMENTlink modified 2.9 years ago by Hervé Pagès ♦♦ 13k • written 2.9 years ago by mmalek0

So R says in sessionInfo() that S4Vectors 0.11.5 is installed and loaded, but in the error message it says that it is trying to unload version 0.10.1! From the formatting it seems that the two parts fo the message are not verbatim from an R session, so it's a little hard to know the actual order of events here. My guess is that there are versions of S4Vectors installed in different locations, e.g., I have

> .libPaths()
[1] "/home/mtmorgan/R/x86_64-pc-linux-gnu-library/3.3-Bioc-3.3"
[2] "/home/mtmorgan/bin/R-3-3-branch/library"   

so potentially two locations for S4Vectors. There are several scenarios where this might come up, e.g., making [2] not writable after installing S4Vectors into  it. Even so, it's not clear when R would try to load two S4Vectors in the same session. But I think the best solution would be to locate all installed copies of S4Vectors and remove them, either with remove.packages("S4Vectors") repeatedly (confirming that this actually removes the packages -- I believe R is ambiguous about why it fails to remove a package that it cannot) or by using system commands to remove the package from the installed location.

Of course this breaks any packages that depend on S4Vectors, and you'd want to re-install a single version via biocLite().

And then whatever scenario lead to the S4Vectors situation might well affect other packages, and I'd quickly find myself losing patience and starting with a clean installation.

ADD REPLYlink written 2.9 years ago by Martin Morgan ♦♦ 23k
Answer: Package installation error
0
gravatar for Michael Love
2.9 years ago by
Michael Love23k
United States
Michael Love23k wrote:

You have a mix of devel and release Bioconductor packages (I can tell from the odd y digits in the x.y.z package versions, which indicates devel branch). So this will lead to lots of headaches. The easiest thing would be to get rid of all packages and start again using only biocLite().

How have you been installing your Bioconductor packages? Using biocLite?

ADD COMMENTlink written 2.9 years ago by Michael Love23k

I tried biocLite, but since some packages were old, I had to install them manually (from devel branch).

ADD REPLYlink modified 2.9 years ago • written 2.9 years ago by mmalek0

The easiest way to proceed is to remove all packages and start again, only using biocLite(). If you need the devel branch, you need to have *all* Bioconductor packages from devel branch, not a mix, or you will encounter errors. See the help information on the website about installing devel branch.

ADD REPLYlink written 2.9 years ago by Michael Love23k
Yes, but there was a reason that I installed a devel branch in first place.
In download.file(url, destfile, method, mode = "wb", ...) :
  URL 'https://bioconductor.org/packages/3.3/bioc/src/contrib/IRanges_2.6.0.tar.gz': status was '404 Not Found'
ADD REPLYlink written 2.9 years ago by mmalek0

Sorry, you'll have to provide more context. What was it you were trying to do, what code did you run that generated this error?

ADD REPLYlink written 2.9 years ago by Michael Love23k

It's biocLite("IRanges").
I tried installing parathyroidSE using bicLite, but I got the following errors, that's why I ended up installing dependencies separately.

biocLite("parathyroidSE")

BioC_mirror: https://bioconductor.org
Using Bioconductor 3.3 (BiocInstaller 1.22.2), R 3.3.0 (2016-05-03).
Installing package(s) ‘parathyroidSE’
trying URL 'https://bioconductor.org/packages/3.3/data/experiment/src/contrib/parathyroidSE_1.10.0.tar.gz'
Content type 'unknown' length 22233982 bytes (21.2 MB)
==================================================
downloaded 21.2 MB

* installing *source* package ‘parathyroidSE’ ...
** data
** inst
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error : package ‘GenomicRanges’ required by ‘SummarizedExperiment’ could not be found
Error: loading failed
Execution halted
ERROR: loading failed
ADD REPLYlink modified 2.9 years ago • written 2.9 years ago by mmalek0

I think this is saying that SummarizedExperiment is installed, but its dependency GenomicRanges is not. 'Normal' installation via biocLite() or via install.packages() would not lead to this situation, because at the end of the installation R is 'testing if installed package can be loaded'. If while trying to install SummarizedExperiment it failed to install it's dependency GenomicRanges, then this test would have failed and SummarizedExperiment would not have been installed.

The most likely scenario is that SummarizedExperiment was once installed correctly, including its dependency GenomicRanges, but then somehow GenomicRanges was removed, e.g., by directly deleting the GenomicRanges folder from the library directory, or using remove.packages("GenomicRanges"), or by changing R_LIBS_USER or .libPaths() to exclude the library path where GenomicRanges is installed.

It's tempting at this point to try and satisfy the dependency

biocLite("GenomicRanges")

then check that SummarizedExperiment can be loaded

library(SummarizedExperiment)

but probably that is treating the symptom, and there are perhaps other unsatisfied dependencies. BiocInstaller::biocValid() might tell you about mixes between release and devel versions, but it doesn't check on the status of packages that are not installed.

ADD REPLYlink written 2.9 years ago by Martin Morgan ♦♦ 23k

At any one point in time, there is only one package tarball available for a particular release -- for the 3.3 release IRanges_2.6.0.tar.gz existed for some period, but then was replaced by IRanges_2.6.1.tar.gz . There are two parts to the repository, a PACKAGES file that provides a summary of the package versions available, and the tar balls themselves. Updating our repository is not an atomic operation, so it is possible that the PACKAGES file briefly advertises a tarball that is no longer or not yet available. The length of 'briefly' could be considerable, maybe a full day, if there were a catastrophic failure in the sync process; I'd say an extended delay would be unlikely but not impossible. For me and if I recall correctly when this post first came to my attention, I saw

> biocLite("IRanges")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.3 (BiocInstaller 1.22.2), R 3.3.0 Patched (2016-06-09
  r70752).
Installing package(s) 'IRanges'
trying URL 'https://bioconductor.org/packages/3.3/bioc/src/contrib/IRanges_2.6.1.tar.gz'
Content type 'application/x-gzip' length 475440 bytes (464 KB)
==================================================
downloaded 464 KB

Bioconductor version 3.3 (BiocInstaller 1.22.2), ?biocLite for help
* installing *source* package 'IRanges' ...

Is that what you see now?

ADD REPLYlink written 2.9 years ago by Martin Morgan ♦♦ 23k
Answer: Package installation error
0
gravatar for Hervé Pagès
2.9 years ago by
Hervé Pagès ♦♦ 13k
United States
Hervé Pagès ♦♦ 13k wrote:

Hi,

Downloading and installing packages manually as you did almost always ends up in tears. As Michael pointed out, and as explained almost anywhere you look on our website, you should always use biocLite() to install Bioconductor packages.

You say "I tried biocLite, but since some packages were old, I had to install them manually (from devel branch)". Not sure what you mean by "some packages were old", but biocLite() will automatically take care of updating any old version to the newest version that is available for your version of Bioconductor. For example if you are using the current version of Bioconductor (BioC 3.3), biocLite() will offer to update your packages to the latest version available in BioC 3.3. There might be even newer versions of the packages in BioC devel but, if you are using the current release, they are not for you, because they are not compatible with your installation. So please never try to install devel packages by hand if you are using the current release! If you want to use BioC devel, you need to switch your entire installation with BiocInstaller::useDevel(). That will update all your packages to the devel versions. Note that this is for developers or advanced users only. Most users should never need this.

You should be able to fix your broken installation by running BiocInstaller::biocValid() and by following the instructions that come out of it.

Cheers,

H.

ADD COMMENTlink modified 2.9 years ago • written 2.9 years ago by Hervé Pagès ♦♦ 13k

Thanks for the comment, but I'm a developer and I know what I'm doing :-)

ADD REPLYlink written 2.9 years ago by mmalek0

If you knew what you were doing, you wouldn't break your installation by mixing release and devel packages. It's good to show some pride but it's a little bit too late :-)

ADD REPLYlink written 2.9 years ago by Hervé Pagès ♦♦ 13k

Impressive!

ADD REPLYlink written 2.9 years ago by mmalek0
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 16.09
Traffic: 259 users visited in the last hour