Problem installing BSgenome packages with R 3.6.1
1
0
Entering edit mode
montag • 0
@montag-22545
Last seen 4.3 years ago

I'm very new to R and I'm running into the same problem over and over again. I tried already all solution suggestions I could find but nothing is working.

I try to install the BSgenome.Hsapiens:UCSC.hg19 using

BiocManager::install("BSgenome.Hsapiens.UCSC.hg19")

and I'll always get the same error warning.

BiocManager::install("BSgenome.Hsapiens.UCSC.hg19")
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.1 (2019-07-05)
Installing package(s) 'BSgenome.Hsapiens.UCSC.hg19'
installing the source package ‘BSgenome.Hsapiens.UCSC.hg19’

versuche URL 'https://bioconductor.org/packages/3.10/data/annotation/src/contrib/BSgenome.Hsapiens.UCSC.hg19_1.4.0.tar.gz'
Content type 'application/x-gzip' length 688190187 bytes (656.3 MB)
downloaded 656.3 MB

"\\"
CMD.EXE wurde mit dem oben angegebenen Pfad als aktuellem Verzeichnis gestartet.
UNC-Pfade werden nicht untersttzt.
Stattdessen wird das Windows-Verzeichnis als aktuelles Verzeichnis gesetzt.
* installing *source* package 'BSgenome.Hsapiens.UCSC.hg19' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Fehler in findpack(package, lib.loc) : 
  there is no package called 'BSgenome.Hsapiens.UCSC.hg19'
Ruft auf: <Anonymous> -> findpack
Ausführung angehalten
ERROR: lazy loading failed for package 'BSgenome.Hsapiens.UCSC.hg19'
* removing '\\'

The downloaded source packages are in
    ‘C:\Users\montag\AppData\Local\Temp\Rtmpo3Vm0w\downloaded_packages’
Installation path not writeable, unable to update packages: boot, foreign, KernSmooth, Matrix, mgcv, nlme, survival
Old packages: 'cli', 'plyr'
Update all/some/none? [a/s/n]: 
a

  There are binary versions available but the source versions are later:
     binary source needs_compilation
cli   1.1.0  2.0.0             FALSE
plyr  1.8.4  1.8.5              TRUE

  Binaries will be installed
versuche URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/plyr_1.8.4.zip'
Content type 'application/zip' length 1302229 bytes (1.2 MB)
downloaded 1.2 MB

package ‘plyr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\montag\AppData\Local\Temp\Rtmpo3Vm0w\downloaded_packages
installing the source package ‘cli’

versuche URL 'https://cran.rstudio.com/src/contrib/cli_2.0.0.tar.gz'
Content type 'application/x-gzip' length 111873 bytes (109 KB)
downloaded 109 KB

"\\"
CMD.EXE wurde mit dem oben angegebenen Pfad als aktuellem Verzeichnis gestartet.
UNC-Pfade werden nicht untersttzt.
Stattdessen wird das Windows-Verzeichnis als aktuelles Verzeichnis gesetzt.
* installing *source* package 'cli' ...
** Paket 'cli' erfolgreich entpackt und MD5 Summen überprüft
ERROR: cannot remove earlier installation, is it in use?
* removing '\\'
* restoring previous '\\'

The downloaded source packages are in
    ‘C:\Users\montag\AppData\Local\Temp\Rtmpo3Vm0w\downloaded_packages’
Warnmeldungen:
1: In install.packages(...) :
  installation of package ‘BSgenome.Hsapiens.UCSC.hg19’ had non-zero exit status
2: In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘cli’ had non-zero exit status

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

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

other attached packages:
[1] BSgenome_1.54.0      rtracklayer_1.46.0   Biostrings_2.54.0    XVector_0.26.0       GenomicRanges_1.38.0
[6] GenomeInfoDb_1.22.0  IRanges_2.20.1       S4Vectors_0.24.1     BiocGenerics_0.32.0 

loaded via a namespace (and not attached):
 [1] zlibbioc_1.32.0             GenomicAlignments_1.22.1    BiocParallel_1.20.0         lattice_0.20-38            
 [5] tools_3.6.1                 SummarizedExperiment_1.16.0 grid_3.6.1                  Biobase_2.46.0             
 [9] matrixStats_0.55.0          Matrix_1.2-17               GenomeInfoDbData_1.2.2      BiocManager_1.30.10        
[13] bitops_1.0-6                RCurl_1.95-4.12             DelayedArray_0.12.0         compiler_3.6.1             
[17] Rsamtools_2.2.1             XML_3.98-1.20

Please help me, I'm desperate at the moment

'BSgenome.Hsapiens.UCSC.hg19' • 1.6k views
ADD COMMENT
0
Entering edit mode

Hi,

I see "Installation path not writeable" in the error messages you're showing us so I wonder: Can you install any package at all? Try something like:

install.packages("mgcv")

If this fails then your problem does not have much to do with the BSgenome.Hsapiens.UCSC.hg19 package or with Bioconductor. It's about your R setup which seems broken and would need to be fixed first.

H.

ADD REPLY
0
Entering edit mode

No installation is not my general problem. I can install packages and load them. But everything related to Bioconductor seems to be the Problem. I also get the same error when trying to install Homo.sapiens

Update: I found a way to install both packages with the help of further research. See further down for details

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 17 hours ago
United States

R doesn't like having the library directory on a network drive, so you have to trick it. Google 'windows map network drive' and follow the instructions that come up. You may need to adjust your .libPaths to point to the newly mapped drive.

ADD COMMENT
0
Entering edit mode

R is not on a network. It is on the PC C:\Program Files\R\R-3.6.1 and my downloads are in my user folder in the same path

ADD REPLY
0
Entering edit mode

I didn't say anything about your R location, nor about where your downloads are. I said that R doesn't like having your library directory on a network share. A more correct statement would be to say that R is unable to install source packages on a network share, which is why you are able to install some packages but not others. The error you get is

CMD.EXE was started with the path given above as the current directory.
UNC paths are not supported.
Instead, the Windows directory is set as the current directory.

Where it is clearly saying that UNC paths are not supported. A UNC path is by definition a network share, and the fix for this is for you to listen to what I originally said and map your UNC path to a local dir, like D: or E: or whatever, which you can find out how to do by (again) following my original advice to Google 'windows map network drive' and do what they say.

ADD REPLY
0
Entering edit mode

Sorry but I'm really not a computer scientist. I'm learning this all by myself. I googled what you suggested but it did not understand it in any way. With your second answer it became much clearer what you meant. The problem with this whole network share and your solution is, that one needs to be admin to perform these changes. which I'm not, nor am I allowed to be on this computer...

But I found some other way to shift my library. I created a folder and every time I install a package I tell R where to install it by using the command

install.packages ("packagename", lib = "C:/Users/.../R/libs)

And when loading the library I tell R where to load it from. So far it is working for me.

ADD REPLY
0
Entering edit mode

See ?.libPaths for more information about how to make that permanent.

ADD REPLY

Login before adding your answer.

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