MSstats installation error hwang2  2022-08-08
 

I'm trying to install MSstats tool. I installed R-3.6.1 in Documents\R\R-3.6.1, then added the tool of MSstats, it automatically installed R-4.1.2 in Documents\R\R-4.1.2, then it installed some files and stopped with error message of "Unknown Error installing packages. Output logged to the immediate Window".

Immediate Window:
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Error in loadNamespace(x) : there is no package called 'BiocManager'
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted

It looks like "BiocManager" is missing. Could you help?

Thanks,

 
 
Nick Shulman responded:  2022-08-08
The current version of the MSstats External Tool in the Skyline Tools Store uses R version 4.1.2.

I was able to install it successfully on my computer when I just tried.
I am attaching the output that I saw in the Immediate Window in Skyline in case you want to compare it to what you are seeing.

Could you maybe copy all of the output from your Immediate Window in Skyline and send it to us? We might be able to figure out what is going wrong if we saw all of the output.
-- Nick
 
hwang2 responded:  2022-08-09
Hi Nick,

thank you for quick response! It looks like R.4.1.2 misses the required package of 'BiocManager'. Here are what I did this morning:

1. uninstalled all R-versions (including rTools, R-studio) from control panel
2. deleted R-folder in documents
3. Skyline (version: 21.2.0536)-->tools-->Tool store-->MSstats
4. computer tried to install R-4.1.2 with warning of "A full R installation requires administrative privileges, and it appears that those are not available. if you continue with this installation, you will not be able to associate R with .RData files. Installation must be made to a directory where you have write permission".
5. So I cancelled the installation and installed R.4.1.2 as administrator
6.R.4.1.2 was successfully installed
7. back to Skyline -->tools---> tool store-->MSstats
8. it run for a few seconds and stopped with error message (see attached screenshot) and message below:

on error message (more information) panel:
System.Reflection.TargetInvocationException: Unknown Error installing packages. Output logged to the Immediate Window. ---> pwiz.Skyline.Model.Tools.ToolExecutionException: Unknown Error installing packages. Output logged to the Immediate Window.
   at pwiz.Skyline.ToolsUI.RInstaller.InstallPackages() in C:\proj\skyline_21_2\pwiz_tools\Skyline\ToolsUI\RInstaller.cs:line 254
   at pwiz.Skyline.Controls.LongWaitDlg.RunWork(Action`1 performWork) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Controls\LongWaitDlg.cs:line 254
   --- End of inner exception stack trace ---
   at pwiz.Skyline.Util.Helpers.WrapAndThrowException(Exception x) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Util\Util.cs:line 1941
   at pwiz.Skyline.Controls.LongWaitDlg.PerformWork(Control parent, Int32 delayMillis, Action`1 performWork) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Controls\LongWaitDlg.cs:line 202
   at pwiz.Skyline.ToolsUI.RInstaller.GetPackages() in C:\proj\skyline_21_2\pwiz_tools\Skyline\ToolsUI\RInstaller.cs:line 205

In Immediate Window:
package 'BiocManager' is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Error in loadNamespace(x) : there is no package called 'BiocManager'
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted

honghui
 
hwang2 responded:  2022-08-09
sorry. I did not copy all the messages in Immediate Window in previous response: here are the all messages:

Warning: unable to access index for repository http://cran.us.r-project.org/src/contrib:
  cannot open URL 'http://cran.us.r-project.org/src/contrib/PACKAGES'
Warning: unable to access index for repository http://cran.us.r-project.org/bin/windows/contrib/4.1:
  cannot open URL 'http://cran.us.r-project.org/bin/windows/contrib/4.1/PACKAGES'
Warning message:
packages 'gplots', 'lme4', 'reshape', 'reshape2', 'ggplot2', 'ggrepel', 'data.table', 'dplyr', 'tidyr', 'survival', 'doSNOW', 'snow', 'foreach', 'stringr', 'randomForest', 'minpack.lm', 'optparse' are not available for this version of R

Versions of these packages for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning: unable to access index for repository http://cran.us.r-project.org/src/contrib:
  cannot open URL 'http://cran.us.r-project.org/src/contrib/PACKAGES'
Warning: unable to access index for repository http://cran.us.r-project.org/bin/windows/contrib/4.1:
  cannot open URL 'http://cran.us.r-project.org/bin/windows/contrib/4.1/PACKAGES'
Warning message:
package 'BiocManager' is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Error in loadNamespace(x) : there is no package called 'BiocManager'
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
 
Nick Shulman responded:  2022-08-09
I think maybe the important error that you are seeing is:
  cannot open URL 'http://cran.us.r-project.org/src/contrib/PACKAGES'
Is there some reason that your computer might be unable to access that site?

When Skyline is installing the MSstats External Tool, Skyline ends up running the attached R script ("InstallPackages.r") in order to install the packages the the tool needs. You can try running that script yourself and see whether you get better error information.

I am also attaching a new version of the MSstats external tool ("MSstatsUsingRVersion4.2.1.zip").
You can save that zip file somewhere on your computer, and then in Skyline you can install it using the menu item:
Tools > External Tools
and then push the "Add > From File" button in the External Tools dialog and point Skyline at that zip file.

I don't think this new zip file will fix your problem. It looks like the problem is that your R cannot reach the repository it is supposed to.

I am not much of an expert on installing packages in R.
Let me know if there is something we could change about the "install.packages" statement in "InstallPackages.r".
Should we maybe be specifying something different for the "repos" function argument?
-- Nick
 
hwang2 responded:  2022-08-09
I'm able to install most of the packages using install.packages ("packagename") except following five packages:
1. reshape2
2. limma
3. preprocessCore
4. marray
5. MSstats

is it possible we need different version of R?

the Warning message for installing these packages is same:

> install.packages("MSstats")
Warning message:
package ‘MSstats’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
 
hwang2 responded:  2022-08-09
using script in R4.1.2
 
install.packages("BiocManager", repos='http://cran.us.r-project.org')
BiocManager::install("MSstats")

it installed all remaining 4 packages except "reshape2".

then redo the installation of reshape2, it works

install.packages ("reshape2")

Skyline-->tools-->tool store-->MSstats
success! MSstats appears in Tools.

by the way, using zip file did not work.