Errors installing RforProteomics and MSnbase packages
2
0
Entering edit mode
fgol ▴ 10
@fgol-19486
Last seen 4.0 years ago

Hello,

In installing "RforProteomics" package I faced with the below Error:

> source("http://www.bioconductor.org/biocLite.R")
> library("BiocInstaller")
> biocLite("RforProteomics", dependencies = TRUE)
The downloaded source packages are in
    ‘C:\Users\fsgh1d18\AppData\Local\Temp\RtmpEJpIkX\downloaded_packages’
Warning message:
In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘RforProteomics’ had non-zero exit status

> library("RforProteomics")
Loading required package: MSnbase
Error: package or namespace load failed for ‘MSnbase’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘colorspace’
Error: package ‘MSnbase’ could not be loaded

Then, I tried to install "MSnbase" package. Again, I faced another problem (you can see the below Error):

> biocLite("MSnbase", dependencies = TRUE)
> library("MSnbase")
Loading required package: BiocParallel
Error: package or namespace load failed for ‘MSnbase’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘colorspace’

I am also attaching the output from my sessionInfo():

> sessionInfo() 
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    
attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] BiocParallel_1.16.5  BiocInstaller_1.30.0 BiocManager_1.30.4   ProtGenerics_1.14.0 
[5] S4Vectors_0.20.1     mzR_2.16.1           Rcpp_1.0.0           Biobase_2.42.0      
[9] BiocGenerics_0.28.0 
loaded via a namespace (and not attached):
[1] codetools_0.2-16 grid_3.5.2       ncdf4_1.16       impute_1.56.0    tools_3.5.2     
[6] yaml_2.2.0       compiler_3.5.2

I am using a laptop which is connected to my university network. But, I have also the same problem with my own laptop (which in not connected to the university network) when I am trying to install these packages.

Would you please help me what is the problem for? and how can I solve it?

Thank you very much.

RforProteomics MSnbase • 3.6k views
ADD COMMENT
0
Entering edit mode

In addition to @SamGG's answer, you could also try to set up a different CRAN mirror. Using 0-Cloud [https] (the first option) with chooseCRANmirror() allows me to run BiocManager::install("colorspace") successfully.

ADD REPLY
0
Entering edit mode
shepherl 3.8k
@lshep
Last seen 4 minutes ago
United States

It seems you are missing the package colorspace . Please install that package first and then try the other two installation calls. It is worth noting that biocLite is deprecated , Please start installing Bioconductor packages through BiocManager.

install.packages("BiocManager")
BiocManager::install("colorspace", dependencies = TRUE)
BiocManager::install("RforProteomics", dependencies = TRUE)
BiocManager::install("MSnbase", dependencies = TRUE)

In might also be worth running the validity check to ensure all your packages are up-to-date for your R/Bioc versions

BiocManager::valid()
ADD COMMENT
0
Entering edit mode

Dear Shepherl,

Thank you so much for your advise. Now, both packages are working. Thanks

ADD REPLY
0
Entering edit mode
SamGG ▴ 330
@samgg-6428
Last seen 1 day ago
France/Marseille/Inserm

Hi, With R3.5.2, you should use the new installer delivered by the BiocManager package. More on that https://bioconductor.org/install/. The MSnbase is a dependency of RforProteomics, so no need to install it separately.

> BiocManager::install("RforProteomics")
Bioconductor version 3.8 (BiocManager 1.30.4), R 3.5.1 (2018-07-02)
Installing package(s) 'RforProteomics'
also installing the dependencies ‘ncdf4’, ‘mzR’, ‘ProtGenerics’, ‘pcaMethods’, ‘MALDIquant’, ‘mzID’, ‘MSnbase’, ‘biocViews’

The error you report misleads you in fact. When you load the MSnbase package (that seems correctly installed), the error tells that R can't load/find the colorspace package. This package should have been installed with RforProteomics, but sometimes things are getting weird. What you should do now is to install this CRAN package.

BiocManager::install("colorspace")

Right now, I encountered the following warning, but the installation succeeded because the installer switch to another repository.

Warning in install.packages :
  unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5:
  cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5/PACKAGES'

To verify colorspace installation, type the following. If no message, everything went fine.

library(colorspace)

Once correct, start again with MSnbase or RforProteomics. Important note: because you R session might have already loaded some libraries, it's better to restart the R session in order to start with no data and no library loaded. Loaded packages could no be reinstalled because they already reside in memory. R restart could be achieved in RStudio with Shift+Ctrl+F10.

HTH

ADD COMMENT
0
Entering edit mode

Dear SamGG,

Many thanks. Now, they are working fine with BiocManager. Thanks a lot.

ADD REPLY

Login before adding your answer.

Traffic: 691 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