More Bioconductor Package Installation Problems
1
0
Entering edit mode
jose ▴ 10
@2f84d272
Last seen 2.6 years ago
United States

Dear Colleagues,

I am back because my problems with Bioconductor package installations continue. I would like some feedback on the potential solutions I describe at the end.

These problems arose because I cannot install the Bioconductor packages I need to work on my RStudio Project BG's workspace objects. Unfortunately, I tried what Marcel suggested (update my R version and reinstall my packages) and that did not work. Notably, most of my projects are stored in one DropBox directory so I can work on projects at different physical locations with my laptop. This has worked fine for years.

After trying Marcel's suggestions, I experimented by installing the Bioconductor packages with the Base R GUI. All the packages I wanted installed without a hitch outside of Dropbox. Digging into this more, I learned the location of my different RStudio project's package directories and along the way a lot about Packrat, work directories, .RProfile files, package installation directories, etc. All my R packages are stored ...

Inside Dropbox

  • Directory 1: Dropbox/.... /packrat/lib/x86_64-apple-darwin17.0/4.1.3" Dropbox/.... /packrat/lib-ext/x86_64-apple-darwin17.0/4.1.3" Dropbox/.... /packrat/lib-R/x86_64-apple-darwin17.0/4.1.3"

Outside Dropbox

  • Directory 2: /var/folders/58/7p64y9zj067d9sj5md9s1v6h0000gp/T//RtmpcMQLpg/downloaded_packages
  • Directory 3:
    /Library/Frameworks/R.framework/Versions/4.1/Resources/library/base

Evidently, most of my various project's packages in either in directory 1 or 3, but also in directory combinations (e.g. 1 & 3). The BG project's packages were all "Inside Dropbox" (Directory 1) and lacked the needed packages. In contrast, the Base R GUI installations were all "Outside Dropbox" (Directory 3) and had all the needed packages. I continued experimenting and got some weird results...


> if (interactive()) {
+     BiocManager::valid()
+ }
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

[1] TRUE

> BiocManager::version()
[1] ‘3.14’

Apparently, there is an issue with the Bioconductor repositories when installing on Dropbox.

> BiocManager::available()
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

 > BiocManager::repositories(version="3.14")
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

           "https://bioconductor.org/packages/3.14/bioc"        BioCsoft    
"https://bioconductor.org/packages/3.14/data/annotation"    BioCann      
"https://bioconductor.org/packages/3.14/data/experiment"    BioCexp      
      "https://bioconductor.org/packages/3.14/workflows"    BioCworkflows   
          "https://bioconductor.org/packages/3.14/books"        BioCbooks 
                                                    CRAN 
                             "https://cran.rstudio.com/" 
                                                 rstudio 
                              "https://cran.rstudio.com"

Most frequently, the error messages have been versions of this...

> BiocManager::install("pathview",site_repository = "http://www.bioconductor.org") 
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Warning: unable to access index for repository http://www.bioconductor.org/bin/macosx/contrib/4.1:
  Found continuation line starting '    <script type="te ...' at begin of record.
Warning: unable to access index for repository https://bioconductor.org/packages/3.14/data/annotation/bin/macosx/contrib/4.1:
  Found continuation line starting '    <script type="te ...' at begin of record.
Warning: unable to access index for repository https://bioconductor.org/packages/3.14/data/experiment/bin/macosx/contrib/4.1:
  Found continuation line starting '    <script type="te ...' at begin of record.
Warning: unable to access index for repository https://bioconductor.org/packages/3.14/workflows/bin/macosx/contrib/4.1:
  Found continuation line starting '    <script type="te ...' at begin of record.
Warning: unable to access index for repository https://bioconductor.org/packages/3.14/books/bin/macosx/contrib/4.1:
  Found continuation line starting '    <script type="te ...' at begin of record.
Bioconductor version 3.14 (BiocManager 1.30.16), R 4.1.3 (2022-03-10)
Installing package(s) 'pathview'

# repeats

Warning messages:
1: In .inet_warning(msg) :
  unable to access index for repository http://www.bioconductor.org/bin/macosx/contrib/4.1:
  Found continuation line starting '    <script type="te ...' at begin of record.
2: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.14/data/annotation/bin/macosx/contrib/4.1:
  Found continuation line starting '    <script type="te ...' at begin of record.
3: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.14/data/experiment/bin/macosx/contrib/4.1:
  Found continuation line starting '    <script type="te ...' at begin of record.
4: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.14/workflows/bin/macosx/contrib/4.1:
  Found continuation line starting '    <script type="te ...' at begin of record.
5: In .inet_warning(msg) :
  unable to access index for repository https://bioconductor.org/packages/3.14/books/bin/macosx/contrib/4.1:
  Found continuation line starting '    <script type="te ...' at begin of record.
6: In .inet_warning(msg) :
  package ‘pathview’ is not available as a binary package for Bioconductor version '3.14'

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`

Then I started getting this error message...

Warning message:
In file.symlink(from, to) :
  cannot symlink '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/base' to '/Users/JoseFMo/Dropbox.../packrat/lib-R/base', reason 'File exists'
[Workspace loaded from ~/Dropbox.../.RData]

Summary:

There are problems with the Bioconductor repositories, associated with installation failure inside Dropbox but not outside of Dropbox, that might be related to symlinks from one installation directory to another.

Proposed Solutions:

In order for the BG workspace objects to be accessible by the needed packages, I had some ideas. I would very much appreciate any feedback on these ideas.

  1. Objects --> packages.... I can save and move the BG workspace objects to the Base R GUI directory, but I won't have the remote access which I need. Quickest approach.

  2. Objects <-- packages... I can learn how to make symlinks from the directories "Outside Dropbox" to directories "Inside Dropbox". This way, all needed packages are usable, I'd have remote access, but I don't know if it's possible or how difficult it is. Possibly the hardest approach.

  3. Objects <--> packages...I can save the old BG workspace, create a new BG project, then add the old BG workspace to the new BG workspace. Then I can a) learn how to direct package installation and reinstall or b) use the symlink method. Potentially the most successful long-term approach.

Thanks again, everyone! José

package symlinks directories installation Dropbox • 2.4k views
ADD COMMENT
0
Entering edit mode
@herve-pages-1542
Last seen 23 hours ago
Seattle, WA, United States

These are warnings not errors. You get them because you're specifying an invalid repository (http://www.bioconductor.org) via the site_repository argument. Why are you doing this?

ADD COMMENT
0
Entering edit mode

Well Hervé, what I want to do is work on my BG project with the packages I need in different physical locations. Unfortunately, like I said above..."... I cannot install the Bioconductor packages I need to work on my RStudio Project BG's workspace objects." I've been trying to figure out why and a workaround.

However, honestly, the more I deal with this issue, the more I see that I'm not understanding how things work. Let me start with what I think I know for sure. R has a default package installation location

"desktop/Macintosh HD/Library/Frameworks/R. framework/Resources/library/"

That's consistent with what I observed above regarding directories that packages are installed into. Then, because I have wanted to work on the same project in different physical locations, I created an R project with RStudio on Dropbox. That way, at least I thought that my workspace and my packages would be accessible either on the desktop or the laptop. That has worked for years. In the current project of interest, the packages I'm using get loaded here as determined by .libPaths()....

[1]"/Users/josemorales/Dropbox/.../packrat/lib/x86_64-apple-darwin17.0/4.1.3"    
[2] "/Users/josemorales/Dropbox/.../packrat/lib-ext/x86_64-apple-darwin17.0/4.1.3"
[3] "/Users/josemorales/Dropbox/.../packrat/lib-R/x86_64-apple-darwin17.0/4.1.3"

OK, another thing I THINK I know is that when you update R, the package directory is changed to be consistent with the version of R you've installed. I see on Dropbox another directory listed as ...

"/Users/josemorales/Dropbox/.../packrat/lib-R/x86_64-apple-darwin17.0/4.1.2"

Now, I also THINK I know that each project can have different packages installed into its respective project directory on Dropbox AND sometimes into the default R package directory as seen below.

[1] "/Users/josemorales/Dropbox/.../packrat/lib/x86_64-apple-darwin17.0/4.1.3"
[2] "/Users/josemorales/Dropbox/.../packrat/lib-ext"                          
[3] "/Library/Frameworks/R.framework/Versions/4.1/Resources/library"

This can have a weird outcome as seen in the screenshotRStudio package panel Honestly, I'm not sure what's going on here... Maybe something with symlinks??

I thought that whatever you installed in the default directory, just stays there. Now, I see that something is happening as you do things in R to change what packages are installed ... damn problem is that I don't know what those "things" are! I thought I had installed a bunch of packages in the default directory....Now, they're not there!! Why? I don't know!!

Any help (explanations, links, etc) with how these R features work would be greatly appreciated!

Jose

ADD REPLY
0
Entering edit mode

Can you load Biobase with library(Biobase))? If you can then it seems that Rstudio is not properly displaying the status of the package and that's something that you would need to report to the Rstudio folks.

For the sake of narrowing down the problem we should remove Rstudio from the equation. Can you open a terminal, start R in it, and load Biobase with library(Biobase)?

If yes, then the problem is related to your Rstudio setup e.g. make sure Rstudio is using the same R as in terminal mode and that the .libPaths() are the same in Rstudio vs in terminal mode.

If not then try to install the package with BiocManager::install("Biobase") (make sure to do this in the R session you started in the terminal). If you get an error, please show it to us.

If the problem is that you were simply _assuming_ that Biobase should already be installed because at some point in the past you had it installed somewhere, then it's hard for us to help with that. We don't know what happened to your system since the last time you installed Biobase. Did you upgrade R from 4.1.2 to R 4.1.3? Note that when you do this, packages installed in the default folder (/Library/Frameworks/R.framework/Versions/4.1/Resources/library on Mac) are usually kept (e.g. if you use the installer with the default settings) but it all depends on how you upgraded R exactly. Not all upgrading methods will preserve the installed packages.

H.

ADD REPLY

Login before adding your answer.

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