Question: Rsamtools v 1.99.6 installation error
0
gravatar for kubovcij
7 months ago by
kubovcij0
kubovcij0 wrote:

Hello everyone, i have troubles installing Rsamtools on R 3.6.0 (Bioc 3.9) on ubuntu via both BiocManager::install() and source package (v1.99.6). No problem with Rsamtools in previous R version, local instalation of Rsamtools from source package v1.34.1 also worked fine in R 3.6.0. Already tried this old post and changed RHOME/etc/Makeconf flags, but didn't help. Other packages install just fine. Any hint?

> BiocManager::install('Rsamtools')
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 (2019-04-26)
Installing package(s) 'Rsamtools'
trying URL 'https://bioconductor.org/packages/3.9/bioc/src/contrib/Rsamtools_1.99.6.tar.gz'
Content type 'application/x-gzip' length 3032600 bytes (2.9 MB)
==================================================
downloaded 2.9 MB

* installing *source* package ‘Rsamtools’ ...

...compilation...

installing to /home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-Rsamtools/00new/Rsamtools/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘Rsamtools’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-Rsamtools/00new/Rsamtools/libs/Rsamtools.so':
  /home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-Rsamtools/00new/Rsamtools/libs/Rsamtools.so: undefined symbol: faidx_fetch_seq2
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rsamtools’
* restoring previous ‘/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rsamtools’

The downloaded source packages are in
    ‘/tmp/Rtmpazaaxg/downloaded_packages’

...

> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 19

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=cs_CZ.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=cs_CZ.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=cs_CZ.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] BiocManager_1.30.4 compiler_3.6.0     tools_3.6.0
ADD COMMENTlink modified 7 months ago by Hervé Pagès ♦♦ 14k • written 7 months ago by kubovcij0

Do you have the correct version of Rhtslib? I think that's where faidx_fetch_seq2 is defined. (Based on this commit, you might need version >= 1.13.2). Rsamtools 1.34 didn't require that package, but 1.99.6 does, so if you're upgrading this may be the source of the error.

Might be worth doing BiocManager::install('Rhtslib') and then retrying Rsamtools.

ADD REPLYlink modified 7 months ago • written 7 months ago by Mike Smith4.0k

thanks for reply, my Rhtslib is 1.15.6. I have run BiocManager::install('Rhtslib') just to be sure but with no success, got same error when reinstalling Rsamtools. I checked https://bioconductor.org/help/faq/ where same error example is explained as system configuration issue, but i don't know where to check since all was fine in previous version of R.

ADD REPLYlink written 7 months ago by kubovcij0

Can you show more of the compilation, of both Rhtslib and Rsamtools? In particular I see (looking for compilation of faidx.c, and generation of libraries)

> BiocManager::install("Rhtslib")
...
gcc -g -Wall -O2 -I.  -c -o faidx.o faidx.c
...
ar -rc libhts.a kfunc.o knetfile.o kstring.o bcf_sr_sort.o bgzf.o errmod.o faidx.o hfile.o hfile_net.o hts.o hts_os.o md5.o multipart.o probaln.o realn.o regidx.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o textutils.o thread_pool.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_external.o cram/cram_index.o cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o cram/files.o cram/mFILE.o cram/open_trace_file.o cram/pooled_alloc.o cram/rANS_static.o cram/sam_header.o cram/string_alloc.o
ranlib libhts.a
gcc -dynamiclib -install_name /usr/local/lib/libhts.2.dylib -current_version 1.7 -compatibility_version 2  -o libhts.dylib kfunc.o knetfile.o kstring.o bcf_sr_sort.o bgzf.o errmod.o faidx.o hfile.o hfile_net.o hts.o hts_os.o md5.o multipart.o probaln.o realn.o regidx.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o textutils.o thread_pool.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_external.o cram/cram_index.o cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o cram/files.o cram/mFILE.o cram/open_trace_file.o cram/pooled_alloc.o cram/rANS_static.o cram/sam_header.o cram/string_alloc.o -lz -lm -lbz2 -llzma
ln -sf libhts.dylib libhts.2.dylib

and then (looking for compilation of src/fafile.c, and linking to libhts

> BiocManager::install("Rsamtools")
...
gcc -I"/Users/ma38727/bin/R-3-6-branch/include" -DNDEBUG  -I"/Users/ma38727/Library/R/3.6/Bioc/3.9/Rhtslib/include" -I"/Users/ma38727/Library/R/3.6/Bioc/3.9/S4Vectors/include" -I"/Users/ma38727/Library/R/3.6/Bioc/3.9/IRanges/include" -I"/Users/ma38727/Library/R/3.6/Bioc/3.9/XVector/include" -I"/Users/ma38727/Library/R/3.6/Bioc/3.9/Biostrings/include" -I/usr/local/include  -fPIC  -O0 -g -Wall -pedantic -c fafile.c -o fafile.o
...
g++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Users/ma38727/bin/R-3-6-branch/lib -L/usr/local/lib -o Rsamtools.so Biostrings_stubs.o COMPAT_bcf_hdr_read.o IRanges_stubs.o PileupBuffer.o PosCacheColl.o R_init_Rsamtools.o ResultManager.o S4Vectors_stubs.o XVector_stubs.o as_bam.o bam.o bam_data.o bam_mate_iter.o bam_plbuf.o bam_sort.o bambuffer.o bamfile.o bcffile.o encode.o fafile.o idxstats.o io_sam.o pbuffer_wrapper.o pileup.o pileupbam.o sam.o sam_opts.o sam_utils.o samtools_patch.o scan_bam_data.o tabixfile.o tagfilter.o utilities.o zip_compression.o /Users/ma38727/Library/R/3.6/Bioc/3.9/Rhtslib/usrlib/libhts.a -L/Users/ma38727/bin/R-3-6-branch/lib -lR -Wl,-framework -Wl,CoreFoundation
ADD REPLYlink written 7 months ago by Martin Morgan ♦♦ 24k

Having the same issue, just did the suggested ubuntu upgrade, with included a base R upgrade to 3.6.0.

HTSlib version: 1.15.6

Here is the end of the install output with the final error. The whole output is over the character limit, and while there are a couple of warnings in there I suspect that's not where the trouble is.

> BiocManager::install("Rsamtools")
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 (2019-04-26)
Installing package(s) 'Rsamtools'


g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o Rsamtools.so Biostrings_stubs.o COMPAT_bcf_hdr_read.o IRanges_stubs.o PileupBuffer.o PosCacheColl.o R_init_Rsamtools.o ResultManager.o S4Vectors_stubs.o XVector_stubs.o as_bam.o bam.o bam_data.o bam_mate_iter.o bam_plbuf.o bam_sort.o bambuffer.o bamfile.o bcffile.o encode.o fafile.o idxstats.o io_sam.o pbuffer_wrapper.o pileup.o pileupbam.o sam.o sam_opts.o sam_utils.o samtools_patch.o scan_bam_data.o tabixfile.o tagfilter.o utilities.o zip_compression.o -L/home/ka/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/usrlib -Wl,-rpath,/home/ka/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/usrlib -lhts -lz -lm -lbz2 -llzma -lpthread -L/usr/lib/R/lib -lR
installing to /home/ka/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-Rsamtools/00new/Rsamtools/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘Rsamtools’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/ka/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-Rsamtools/00new/Rsamtools/libs/Rsamtools.so':
  /home/ka/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-Rsamtools/00new/Rsamtools/libs/Rsamtools.so: undefined symbol: faidx_fetch_seq2
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/ka/R/x86_64-pc-linux-gnu-library/3.6/Rsamtools’

The downloaded source packages are in
        ‘/tmp/Rtmp877zmv/downloaded_packages’
installation path not writeable, unable to update packages: boot, class, cluster, codetools, foreign, KernSmooth, lattice, MASS, Matrix,
  mgcv, nlme, nnet, spatial, survival
Warning message:
In install.packages(pkgs = doing, lib = lib, repos = repos, ...) :
  installation of package ‘Rsamtools’ had non-zero exit status
ADD REPLYlink modified 7 months ago • written 7 months ago by kallen8310

Can you try the following. This should identify if faidx_fetch_seq2 really is missing from your version of Rhtslib.

so_file <- file.path(installed.packages()['Rhtslib','LibPath'], 
                     'Rhtslib', 'usrlib', 'libhts.so.2')
grep(pattern = "faidx_fetch_seq2", 
     x = system2("nm", so_file, stdout = TRUE), 
     value = TRUE )

On my machine (which doesn't produced the error you're seeing) I get:

[1] "0000000000021380 T faidx_fetch_seq2"
ADD REPLYlink modified 7 months ago • written 7 months ago by Mike Smith4.0k

Having the same issue.

> BiocManager::install("Rsamtools")
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 (2019-04-26)

... (some warnings but should be fine)

installing to /home/rad/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-Rsamtools/00new/Rsamtools/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘Rsamtools’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/rad/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-Rsamtools/00new/Rsamtools/libs/Rsamtools.so':
  /home/rad/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-Rsamtools/00new/Rsamtools/libs/Rsamtools.so: undefined symbol: faidx_fetch_seq2
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/rad/R/x86_64-pc-linux-gnu-library/3.6/Rsamtools’

The suggested grep for faidxfetchseq2 gives me:

[1] "0000000000021380 T faidx_fetch_seq2"
ADD REPLYlink written 7 months ago by Nik dAK10

not a huge help, but getting the same error on 3.6.0.

and the grep gives me the same

"0000000000021380 T faidxfetchseq2"

ADD REPLYlink modified 7 months ago • written 7 months ago by ben_cossins0

tried your commands, got same output as others:

> so_file <- file.path(installed.packages()['Rhtslib','LibPath'], 
+                      'Rhtslib', 'usrlib', 'libhts.so.2')
> grep(pattern = "faidx_fetch_seq2", 
+      x = system2("nm", so_file, stdout = TRUE), 
+      value = TRUE ) 
[1] "0000000000021310 T faidx_fetch_seq2"

... and the compilation ...

> BiocManager::install("Rhtslib")
...
gcc -std=gnu99 -g -Wall -O2 -I.  -c -o faidx.o faidx.c
...
ar -rc libhts.a kfunc.o knetfile.o kstring.o bcf_sr_sort.o bgzf.o errmod.o faidx.o hfile.o hfile_net.o hts.o hts_os.o md5.o multipart.o probaln.o realn.o regidx.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o textutils.o thread_pool.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_external.o cram/cram_index.o cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o cram/files.o cram/mFILE.o cram/open_trace_file.o cram/pooled_alloc.o cram/rANS_static.o cram/sam_header.o cram/string_alloc.o
ranlib libhts.a
...
gcc -std=gnu99 -shared -Wl,-soname,libhts.so.2  -o libhts.so kfunc.pico knetfile.pico kstring.pico bcf_sr_sort.pico bgzf.pico errmod.pico faidx.pico hfile.pico hfile_net.pico hts.pico hts_os.pico md5.pico multipart.pico probaln.pico realn.pico regidx.pico sam.pico synced_bcf_reader.pico vcf_sweep.pico tbx.pico textutils.pico thread_pool.pico vcf.pico vcfutils.pico cram/cram_codecs.pico cram/cram_decode.pico cram/cram_encode.pico cram/cram_external.pico cram/cram_index.pico cram/cram_io.pico cram/cram_samtools.pico cram/cram_stats.pico cram/files.pico cram/mFILE.pico cram/open_trace_file.pico cram/pooled_alloc.pico cram/rANS_static.pico cram/sam_header.pico cram/string_alloc.pico -lz -lm -lbz2 -llzma -lpthread
ln -sf libhts.so libhts.so.2
make[1]: Leaving directory '/tmp/RtmpTyRI7m/R.INSTALL34162962d7a8/Rhtslib/src/htslib-1.7'
mkdir -p "/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/include/htslib"
cd "htslib-1.7/htslib" && cp * "/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/include/htslib" && cd .. && cp textutils_internal.h hts_internal.h "/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/include"
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I"/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/include" -I"/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/zlibbioc/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-VAQCff/r-base-3.6.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -Dinline="" -c R_init_Rhtslib.c -o R_init_Rhtslib.o
mkdir -p "/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/usrlib"
cd "htslib-1.7" && cp libhts.so libhts.a "/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/usrlib"
cd "/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/usrlib" && ln -s libhts.so libhts.so.2
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o Rhtslib.so R_init_Rhtslib.o -L/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/usrlib -Wl,-rpath,/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/usrlib -lhts -lz -lm -lbz2 -llzma -lpthread -L/usr/lib/R/lib -lR
mkdir -p "/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/testdata/tabix"
cd "htslib-1.7/test" && (cp *.sam *.bam *.vcf *.bcf *.cram *.fa *.fa.fai *.gff *.bed "/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/testdata" 2>/dev/null || true) && cd tabix && (cp *.sam *.bam *.vcf *.bcf *.cram *.fa *.fa.fai *.gff *.bed "/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/testdata/tabix" 2>/dev/null || true)
installing to /home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/libs
...
* DONE (Rhtslib)

... and the Rsamtools - searched for 'libhts' but seems missing...

 BiocManager::install("Rsamtools") ... gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG  -I"/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/include" -I"/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/S4Vectors/include" -I"/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/IRanges/include" -I"/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/XVector/include" -I"/home/kubovcij/R/x86_64-pc-linux-gnu-library/3.6/Biostrings/include"
 -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-VAQCff/r-base-3.6.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -Dinline="" -c fafile.c -o fafile.o

...character limit, perhaps e-mail?...

ADD REPLYlink written 7 months ago by kubovcij0

To find references to libhts in the installation of Rsamtools you probably need to look for -lhts. This is slightly different from what Martin showed and is due to differences between static and dynamic linking, which is probably a Mac vs Linux thing in this example.

Since multiple people are probably interested in getting to the bottom of this email is a bit hard to keep track of, but you can post complete logs to something like https://www.pastebin.com and then provide the link to that.

ADD REPLYlink written 7 months ago by Mike Smith4.0k

you can find my full logs here: https://pastebin.com/fNw41s80

ADD REPLYlink written 7 months ago by Nik dAK10

likewise here are mine https://pastebin.com/vmpAcLzE

ADD REPLYlink written 7 months ago by ben_cossins0

all but one of the warnings are for unused return values, except for this one when it's building tabixfile using htslib as an included library:

gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG  -I"/home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/include" -I"/home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/S4Vectors/include" -I"/home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/IRanges/include" -I"/home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/XVector/include" -I"/home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/Biostrings/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-VAQCff/r-base-3.6.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c tabixfile.c -o tabixfile.o
tabixfile.c: In function ‘index_tabix’:
tabixfile.c:190:5: warning: ‘bgzf_is_bgzf’ is deprecated: Use bgzf_compression() or hts_detect_format() instead [-Wdeprecated-declarations]
     if (bgzf_is_bgzf(fn) != 1)
     ^~
In file included from tabixfile.c:3:0:
/home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/include/htslib/bgzf.h:243:9: note: declared here
     int bgzf_is_bgzf(const char *fn) HTS_DEPRECATED("Use bgzf_compression() or hts_detect_format() instead");
         ^~~~~~~~~~~~
ADD REPLYlink written 7 months ago by kallen8310

Can you install scPipe? This package is also linked to Rhtslib but doesn't depend on Rsamtools and doesn't call faidx_fetch_seq2. Make sure to install with BiocManager::install("scPipe").

But before trying to install any new packages, make sure that BiocManager::valid() reports a clean installation.

H.

ADD REPLYlink written 7 months ago by Hervé Pagès ♦♦ 14k

after fixing the packages the valid check flagged, the scPipe install died like this:

g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o testthat.so init.o reassign.o test-catch.o test-example.o test-runner.o -L/usr/lib/R/lib -lR
installing to /home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-testthat/00new/testthat/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (testthat)
ERROR: dependencies ‘Rsamtools’, ‘GenomicAlignments’ are not available for package ‘rtracklayer’
* removing ‘/home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/rtracklayer’
ERROR: dependency ‘rtracklayer’ is not available for package ‘scPipe’
* removing ‘/home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/scPipe’

The downloaded source packages are in
    ‘/tmp/Rtmp877zmv/downloaded_packages’
installation path not writeable, unable to update packages: boot, class, cluster, codetools, foreign, KernSmooth, lattice, MASS, Matrix,
  mgcv, nlme, nnet, spatial, survival
Warning messages:
1: In install.packages(pkgs = doing, lib = lib, repos = repos, ...) :
  installation of package ‘Rsamtools’ had non-zero exit status
2: In install.packages(pkgs = doing, lib = lib, repos = repos, ...) :
  installation of package ‘GenomicAlignments’ had non-zero exit status
3: In install.packages(pkgs = doing, lib = lib, repos = repos, ...) :
  installation of package ‘rtracklayer’ had non-zero exit status
4: In install.packages(pkgs = doing, lib = lib, repos = repos, ...) :
  installation of package ‘scPipe’ had non-zero exit status
ADD REPLYlink written 7 months ago by kallen8310

looks like it depends on a couple of things that depend on Rsamtools. As you would expect from the error message, BiocManager::install("GenomicAlignments") fails when it can't find Rsamtools

ADD REPLYlink written 7 months ago by kallen8310

Right, scPipe depends on rtracklayer and I forgot that rtracklayer depends on Rsamtools. Sorry for that.

However it seems that, despite rtracklayer being listed in scPipe's Imports field, nothing is imported from rtracklayer. So you should be able to get rid of that dep, at least for the compilation/installation purpose. Can I ask you to try the following:

git clone https://git.bioconductor.org/packages/scPipe

Then edit scPipe/DESCRIPTION to remove rtracklayer. Save. Then:

R CMD INSTALL scPipe

Let us know how that goes.

Thanks, H.

ADD REPLYlink modified 7 months ago • written 7 months ago by Hervé Pagès ♦♦ 14k

The command to clone is

git clone https://git.bioconductor.org/packages/scPipe

sorry. (Now corrected in my previous comment.)

ADD REPLYlink modified 7 months ago • written 7 months ago by Hervé Pagès ♦♦ 14k

ok, went in and deleted rtracklayer from the description file and it installed without a whimper. And then saying library(scPipe) also worked fine.

ADD REPLYlink written 7 months ago by kallen8310

Puzzling!

Let's try something else. Clone Rsamtools:

git clone https://git.bioconductor.org/packages/Rsamtools

Try to install it:

R CMD INSTALL Rsamtools

It should fail at the very end with the usual error. Now:

cd Rsamtools/src

Then show us the output of:

ldd Rsamtools.so

This is what it gives for me:

hpages@spectre:~/Rsamtools/src$ ldd Rsamtools.so
    linux-vdso.so.1 =>  (0x00007fffafbf3000)
    libhts.so.2 => /home/hpages/R/R-3.6.r76385/library/Rhtslib/usrlib/libhts.so.2 (0x00007f0aab686000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0aab46c000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0aab24f000)
    libR.so => not found
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0aaaecd000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0aaabc4000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0aaa9ae000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0aaa5e4000)
    libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f0aaa3d4000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f0aaa1b2000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f0aabb8a000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0aa9fae000)

Thanks!

ADD REPLYlink modified 7 months ago • written 7 months ago by Hervé Pagès ♦♦ 14k

scPipe without rtracklayer also works perfectly for me.

here is my output of ldd Rsamtools.so after the failed installation: https://pastebin.com/PN3Lmmbv

Thanks!

ADD REPLYlink written 7 months ago by Nik dAK10

Interesting. In your output Rsamtools is linking against a system version of htslib, rather than the version installed via Rhtslib. The relevant line is:

libhts.so.2 => /usr/local/lib/libhts.so.2 (0x00007f6144fcd000)

and for Hervé it's

libhts.so.2 => /home/hpages/R/R-3.6.r76385/library/Rhtslib/usrlib/libhts.so.2 (0x00007f0aab686000)

Based on this, installing the Ubuntu libhts-dev package lets me recreate this error. However for me that entry is:

libhts.so.2 => /home/mike/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib/usrlib/libhts.so.2 (0x00007f4c9cef5000)

which looks like it should be correct, but still throws the same error. Something in the linking step during compilation is finding things in the wrong order.

ADD REPLYlink modified 7 months ago • written 7 months ago by Mike Smith4.0k

Hi, So far I'm having exactly the same issues with Rsamtools as above users. With grep I also got the same error code:

"0000000000021380 T faidxfetchseq2"

I also tried git installation of scPipe after removing the rtracklayer dependency and it all went well.

My output of ldd Rsamtools.so after failed installation is this: https://pastebin.com/9WRs1eRg

Thanks for your help!

ADD REPLYlink modified 7 months ago • written 7 months ago by e.sousa10
1

I think I may have tracked this down. Can you please try installing this modified version of Rhtslib and then retrying Rsamtools.

BiocManager::install('grimbough/Rhtslib')
BiocManager::install('Rsamtools')
ADD REPLYlink written 7 months ago by Mike Smith4.0k
1

It worked great! Thanks for the help!

ADD REPLYlink written 7 months ago by Jinsong Zhang60
1

Perfect! Thanks a lot for the help!

ADD REPLYlink written 7 months ago by e.sousa10
1

Also works for me, thank you very much!

ADD REPLYlink written 7 months ago by Nik dAK10
1

cool, all I had to do was install 'remote' and that worked like a charm. Thanks so much for chasing this down.

ADD REPLYlink written 7 months ago by kallen8310

one thing leads to another, now ggbio installs fine (apparently), but when I try to load it it fails to find faidxfetchseq2 in the Rsamtools library:

library(ggbio)
Error: package or namespace load failed for ‘ggbio’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/Rsamtools/libs/Rsamtools.so':
  /home/keithallen/R/x86_64-pc-linux-gnu-library/3.6/Rsamtools/libs/Rsamtools.so: undefined symbol: faidx_fetch_seq2

Should this go in a different thread, or will this be solved by the updates to Rhtslib?

ADD REPLYlink written 7 months ago by kallen8310

It's almost certainly related so no need to start a new thread. Did you reinstall ggbio after getting the new Rhtslib? I'll try on my system later.

ADD REPLYlink written 7 months ago by Mike Smith4.0k

yeah, looks like it pretty much has to be the same issue, and yes, the ggbio install was after the modified Rhtslib (and successful install of Rsamtools, rtracklayer and ballgown)

ADD REPLYlink written 7 months ago by kallen8310
Answer: Rsamtools v 1.99.6 installation error
3
gravatar for Hervé Pagès
7 months ago by
Hervé Pagès ♦♦ 14k
United States
Hervé Pagès ♦♦ 14k wrote:

A fix is in Rhtslib 1.16.1. This new version should become available via BiocManager::install() in the next 24h or so to users of the upcoming BioC 3.9 release (which will be announced later today).

Thanks to kubovcij, kallen83, Nik dAK, and other users for reporting the problem, and to Mike for helping with the troubleshooting.

Cheers,

H.

ADD COMMENTlink modified 7 months ago • written 7 months ago by Hervé Pagès ♦♦ 14k
Answer: Rsamtools v 1.99.6 installation error
1
gravatar for Mike Smith
7 months ago by
Mike Smith4.0k
EMBL Heidelberg / de.NBI
Mike Smith4.0k wrote:

A temporary solution to this issue is to run the following to install a slightly modified version of Rhtslib

BiocManager::install('grimbough/Rhtslib')
BiocManager::install('Rsamtools')

There's some more technical details available at https://github.com/Bioconductor/Rhtslib/pull/5 and we'll update here once a fix has made it into the proper Bioconductor version.

ADD COMMENTlink written 7 months ago by Mike Smith4.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 363 users visited in the last hour