Not able to re-install DESeq2 after R quit
2
0
Entering edit mode
carman1979 • 0
@carman1979-9353
Last seen 8.3 years ago
Denmark

Hi,

Veterinarian learning microbiome analysis in R. Please be patient! :-) Windows computer, using R v3.2.2, R studio.

I was happily working with DESeq2 when R got stuck at:

>idx<-identify(res$baseMean, res$log2FoldChange)  #to identify the genes in plotMA...

So I quit R (I actually had to go to the task manager to do it). Start R again. Try the original installation code:

>install.packages("DESeq2")
>library(DESeq2)

Doesn't work. So I try:

>source("https://bioconductor.org/biocLite.R")  #aiming to continue with: >biocLite("DESeq2") and >library("DESeq2")

But I stop here when I get: "Bioconductor version 3.1 (BiocInstaller 1.18.5), ?biocLite for help A newer version of Bioconductor is available for this version of R, ?BiocUpgrade for help"

So I obey and upgrade bioconductor:

>biocLite("BiocUpgrade")

Upgrade all packages to Bioconductor version 3.2? [y/n]: 
y

>biocLite("DESeq2")

Update all/some/none? [a/s/n]: 
a

Then I get this funny message with library (first words in Danish - I haven't figured out how to install R error messages in full English being Windows Danish...... but that is another story):

>library("DESeq2") 

Indlæser krævet pakke: SummarizedExperiment
Error: package ‘GenomicRanges’ 1.20.8 is loaded, but >= 1.22.1 is required by ‘SummarizedExperiment’

Part of the reason that this is funny is because it is just one of the versions of all the different error messages I got trying again and again. Before I had other messages such as:

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  der er ingen pakke med navn ‘stringi’
Error: indlæsning af pakke eller navnerum fejlede for ‘DESeq2’

(Which translates like there is not such package called stringi / loading the package or namespace failed for 'DESeq2)

I also got the message about the RcppArmadillo (which has disappeared now) that is when I unsuccessfully tried what is discussed here: DESeq2 installation error although the armadillo message is gone now.

I am stuck, I would appreciate suggestions :-)

THANK YOU!

Also note messages at the end of my sessioninfo:

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Danish_Denmark.1252  LC_CTYPE=Danish_Denmark.1252   
[3] LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C                   
[5] LC_TIME=Danish_Denmark.1252    

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

other attached packages:
[1] BiocInstaller_1.20.1      RcppArmadillo_0.6.100.0.0
[3] Rcpp_0.12.1               GenomicRanges_1.20.8     
[5] GenomeInfoDb_1.4.3        IRanges_2.2.9            
[7] S4Vectors_0.6.6           BiocGenerics_0.14.0      

loaded via a namespace (and not attached):
Error in x[["Version"]] : subscript out of bounds
In addition: Warning messages:
1: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'XVector' is missing or broken
2: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'Biobase' is missing or broken

deseq2 installation • 5.3k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 31 minutes ago
United States

When you upgrade you should ensure that you don't already have Bioconductor packages loaded, because that can cause problems. This is what the error message is trying to tell you; it is trying to upgrade SummarizedExperiment, but it cannot because you have an outdated version of GenomicRanges loaded. If GenomicRanges weren't loaded, it would have been upgraded as well, and you would not have had problems.
 

ADD COMMENT
0
Entering edit mode

Thank you James! I tried to fix it below :-)

ADD REPLY
0
Entering edit mode
carman1979 • 0
@carman1979-9353
Last seen 8.3 years ago
Denmark

Thank you James!

OK, I quit R, then tried to upgrade again but got:

> source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.2 (BiocInstaller 1.20.1), ?biocLite for help
> biocLite("BiocUpgrade")
Error: Bioconductor version 3.2 cannot be upgraded with R version 3.2.2

Nevertheless, I go on :-) and seems like GenomicRanges and Co get updated now:

> biocLite("DESeq2")

> library("DESeq2")

And here I get a long message, like plenty of packages are missing (I wonder how I managed to install it the first time and if this is going to happen every time I quit R... haha):

Indlæser krævet pakke: S4Vectors
Indlæser krævet pakke: stats4
Indlæser krævet pakke: BiocGenerics
Indlæser krævet pakke: parallel

Vedhæfter pakke: ‘BiocGenerics’

De følgende objekter er maskerede fra ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply,
    parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB

De følgende objekter er maskerede fra ‘package:stats’:

    IQR, mad, xtabs

De følgende objekter er maskerede fra ‘package:base’:

    anyDuplicated, append, as.data.frame, as.vector, cbind,
    colnames, do.call, duplicated, eval, evalq, Filter, Find,
    get, grep, grepl, intersect, is.unsorted, lapply,
    lengths, Map, mapply, match, mget, order, paste, pmax,
    pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce,
    rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unlist, unsplit

Indlæser krævet pakke: IRanges
Indlæser krævet pakke: GenomicRanges
Indlæser krævet pakke: GenomeInfoDb
Indlæser krævet pakke: SummarizedExperiment
Indlæser krævet pakke: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages
    'citation("pkgname")'.

Indlæser krævet pakke: Rcpp
Indlæser krævet pakke: RcppArmadillo
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  der er ingen pakke med navn ‘stringi’
Error: indlæsning af pakke eller navnerum fejlede for ‘DESeq2’

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Danish_Denmark.1252  LC_CTYPE=Danish_Denmark.1252   
[3] LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C                   
[5] LC_TIME=Danish_Denmark.1252    

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

other attached packages:
 [1] RcppArmadillo_0.6.300.2.0  Rcpp_0.12.2               
 [3] SummarizedExperiment_1.0.1 Biobase_2.30.0            
 [5] GenomicRanges_1.22.1       GenomeInfoDb_1.6.1        
 [7] IRanges_2.4.5              S4Vectors_0.8.4           
 [9] BiocGenerics_0.16.1        BiocInstaller_1.20.1      

loaded via a namespace (and not attached):
 [1] XVector_0.10.0       zlibbioc_1.16.0      BiocParallel_1.4.0  
 [4] plyr_1.8.3           tools_3.2.2          grid_3.2.2          
 [7] gtable_0.1.2         lambda.r_1.1.7       futile.logger_1.4.1 
[10] digest_0.6.8         futile.options_1.0.0 proto_0.3-10   

 

ADD COMMENT
1
Entering edit mode

Two things. First, don't respond to an answer by using the 'Add your answer' box, because you aren't adding an answer. Instead, click on the 'ADD COMMENT' link at the bottom of the post you want to respond to, and then type in the box that is presented.

Second, you are about halfway through upgrading. You have the updated BiocInstaller package, but you haven't upgraded all your packages. You can check that by

library(BiocInstaller)
biocValid()

which will then list all the packages that need to be upgraded. Or you can skip that step (do you really care which packages need to be upgraded?) and simply do

biocLite()

which will Just Fix Things™

ADD REPLY
0
Entering edit mode

Thank you James!

Sorry for that :-) I'm glad to say this is my first post in one year that I have been playing with R!

I am afraid this doesn't make a lot of sense to me a.k.a. I don't understand:

> biocLite()
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.2 (BiocInstaller 1.20.1), R 3.2.2 (2015-08-14).
> library(BiocInstaller)
> biocValid()
[1] TRUE

>biocValid("DESeq2")

[1] TRUE

That TRUE means all is supposed to be upgraded? How didn't I have all these problems when I installed it the first time?

Thanks a lot for help!

ADD REPLY
1
Entering edit mode

Google translate tells me the only problem in your previous post is that you don't have the stringi package installed, right? It seems like you have things sort of borked up, so you may need to fix things by hand.

biocLite("stringi")

library(DESeq2)

if this errors because you are missing other packages, use biocLite() to get those, rinse and repeat.

If things are really off, you might just nuke your R install, re-install and then re-install Bioconductor packages.

ADD REPLY
0
Entering edit mode

Installing stringi manually worked. Wow...

Thanks a lot for your help! Now I have to remember what I was doing before the mess! I shall never quit R again! ;-)

ADD REPLY
2
Entering edit mode

For completness, your problem wasn't that you quit R. It's because you are a veterinarian using R ;-D

Seriously though, you made two mistakes, and quitting R wasn't one of them. The first mistake was to use install.packages(). If you are using Bioconductor packages you should NEVER use install.packages() unless you really know what you are doing. Instead, always use biocLite(), even if you are installing CRAN packages.

The second mistake was to attempt an upgrade when you already had packages loaded. If you are going to upgrade, which implies installing lots of packages, you need to be running R with as few packages loaded as possible, so you don't have problems trying to upgrade packages that are already loaded.

Oh wait, there's a third thing. Once you have a package installed, you don't need to install it again, like ever. You just load it using library(<package name goes here>). You might need to upgrade it (which technically is re-installing), but you don't need to install the same version again.

ADD REPLY
0
Entering edit mode

Very helpful! Thanks again! :-)

ADD REPLY

Login before adding your answer.

Traffic: 714 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6