genbankr not working because rtracklayer does not install
0
0
Entering edit mode
dmontecino • 0
@dmontecino-20959
Last seen 4.9 years ago

Hi:

I tried to install genbankr but I had issues with the rtracklayer package:

this is what I did.

Could you please help me how to make it work.

Thanks for all the amazing resources provided

> library("genbankr")
Error: package or namespace load failed for ‘genbankr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘rtracklayer’
> if (!requireNamespace("BiocManager", quietly = TRUE))
+     install.packages("BiocManager")
> 
> BiocManager::install("rtracklayer")
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 (2019-04-26)
Installing package(s) 'rtracklayer'

  There is a binary version available but the source version is later:
            binary source needs_compilation
rtracklayer 1.43.3 1.44.0              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Y
installing the source package ‘rtracklayer’

trying URL 'https://bioconductor.org/packages/3.9/bioc/src/contrib/rtracklayer_1.44.0.tar.gz'
Content type 'application/x-gzip' length 1540317 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

* installing *source* package ‘rtracklayer’ ...
** using staged installation
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for OPENSSL... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl/1.0.2d_1/include  -DUSE_SSL -D_FILE_OFFSET_BITS=64 -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/S4Vectors/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/IRanges/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/XVector/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c S4Vectors_stubs.c -o S4Vectors_stubs.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from S4Vectors_stubs.c:1:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/S4Vectors/include/_S4Vectors_stubs.c:1:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/S4Vectors/include/S4Vectors_interface.h:12:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/S4Vectors/include/S4Vectors_defines.h:18:
In file included from /Library/Frameworks/R.framework/Resources/include/Rdefines.h:37:
/Library/Frameworks/R.framework/Resources/include/R_ext/RS.h:34:11: fatal error: 'string.h' file not found
# include <string.h>            /* for memcpy, memset */
          ^~~~~~~~~~
1 error generated.
make: *** [S4Vectors_stubs.o] Error 1
ERROR: compilation failed for package ‘rtracklayer’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rtracklayer’

The downloaded source packages are in
    ‘/private/var/folders/55/drdb0yv54yx3nljl3p44tl_c0000gn/T/Rtmp3e8E19/downloaded_packages’
Warning message:
In install.packages(pkgs = doing, lib = lib, repos = repos, ...) :
  installation of package ‘rtracklayer’ had non-zero exit status
> library("genbankr")
Error: package or namespace load failed for ‘genbankr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘rtracklayer’
genbankr rtracklayer • 1.3k views
ADD COMMENT
1
Entering edit mode

What happens if you select 'no' and let it install the binary version?

ADD REPLY
0
Entering edit mode

I had the same issue as dmontecino and entering n at the prompt "Do you want to install from sources the package which needs compilation? (Yes/no/cancel)" worked for me. Thanks, Mike!

ADD REPLY
0
Entering edit mode

Create directory RTRACKLAYER move to that directory and copy/paste all of the directories and files from GitHub rtracklayer into that directory. In R getwd() to make sure R is looking in the right place.

Load library(devtools) and library(roxygen2) and run document(rtracklayer) This will rebuild the R folder with the correct “namespace”. Load the new package library(rtracklayer) And you are off and running! It will not take me two days the next time.

ADD REPLY

Login before adding your answer.

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