Installing and problem with : package 'Rhtslib'

1,372 views
Skip to first unread message

Britta

unread,
Aug 1, 2018, 6:32:40 AM8/1/18
to methylkit_discussion
Dear all, Dear Altuna,

I have problems installing the package Methylkit on my new local computer. 
I get this message after downloading from the GitHub: Error: package 'Rhtslib' 1.12.1 was found, but >= 1.13.1 is required by 'al2na-methylKit-75b949f'
However also later when re-installing Rhtslib I get another error (see below). 
Can you help me? or shall I write Rhtslib-people? or is it something really easy I just don't see?
Best wishes and thanks a lot,

Britta


> library(devtools)
> install_github("al2na/methylKit", build_vignettes=FALSE, 
+                repos=BiocInstaller::biocinstallRepos(),
+                dependencies=TRUE,type="source")
Using GitHub PAT from envvar GITHUB_PAT
Downloading GitHub repo al2na/methylKit@master
Installing methylKit
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/27/h99dl6wn73n43cw31xdmb75h0000gp/T/Rtmp4MvTe0/devtools13437fc47ef2/al2na-methylKit-75b949f'  \
  --library='/Library/Frameworks/R.framework/Versions/3.5/Resources/library' --install-tests 

During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
* installing *source* package 'methylKit' ...
** libs
Error: package 'Rhtslib' 1.12.1 was found, but >= 1.13.1 is required by 'al2na-methylKit-75b949f'
* removing '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/methylKit'
Installation failed: Command failed (1)
> library(devtools)
> install_github("al2na/methylKit", build_vignettes=FALSE, 
+                repos=BiocInstaller::biocinstallRepos(),ref="development",
+                dependencies=TRUE)

> library(Rhtslib)
Rhtslib htslib version 1.7

Than I try to update the htslib package - but another command fails....

Bioconductor version 3.7 (BiocInstaller 1.30.0), ?biocLite for help
> biocLite("Rhtslib",type="source")
Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.5.0 (2018-04-23).
Installing package(s) 'Rhtslib'
Content type 'application/x-gzip' length 1424650 bytes (1.4 MB)
==================================================
downloaded 1.4 MB

During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
* installing *source* package 'Rhtslib' ...
** libs
cd "htslib-1.7" && make -f "/Library/Frameworks/R.framework/Resources/etc/Makeconf" -f "Makefile.Rhtslib"
Makefile.Rhtslib:128: warning: overriding commands for target `.c.o'
/Library/Frameworks/R.framework/Resources/etc/Makeconf:159: warning: ignoring old commands for target `.c.o'
clang -g -Wall -O2 -I.  -c -o kfunc.o kfunc.c
clang -g -Wall -O2 -I.  -c -o knetfile.o knetfile.c
clang -g -Wall -O2 -I.  -c -o kstring.o kstring.c
clang -g -Wall -O2 -I.  -c -o bcf_sr_sort.o bcf_sr_sort.c
clang -g -Wall -O2 -I.  -c -o bgzf.o bgzf.c
clang -g -Wall -O2 -I.  -c -o errmod.o errmod.c
clang -g -Wall -O2 -I.  -c -o faidx.o faidx.c
clang -g -Wall -O2 -I.  -c -o hfile.o hfile.c
clang -g -Wall -O2 -I.  -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION "1.7"' > version.h
clang -g -Wall -O2 -I.  -c -o hts.o hts.c
clang -g -Wall -O2 -I.  -c -o hts_os.o hts_os.c
clang -g -Wall -O2 -I.  -c -o md5.o md5.c
clang -g -Wall -O2 -I.  -c -o multipart.o multipart.c
clang -g -Wall -O2 -I.  -c -o probaln.o probaln.c
clang -g -Wall -O2 -I.  -c -o realn.o realn.c
clang -g -Wall -O2 -I.  -c -o regidx.o regidx.c
clang -g -Wall -O2 -I.  -c -o sam.o sam.c
clang -g -Wall -O2 -I.  -c -o synced_bcf_reader.o synced_bcf_reader.c
clang -g -Wall -O2 -I.  -c -o vcf_sweep.o vcf_sweep.c
clang -g -Wall -O2 -I.  -c -o tbx.o tbx.c
clang -g -Wall -O2 -I.  -c -o textutils.o textutils.c
clang -g -Wall -O2 -I.  -c -o thread_pool.o thread_pool.c
clang -g -Wall -O2 -I.  -c -o vcf.o vcf.c
clang -g -Wall -O2 -I.  -c -o vcfutils.o vcfutils.c
clang -g -Wall -O2 -I.  -c -o cram/cram_codecs.o cram/cram_codecs.c
clang -g -Wall -O2 -I.  -c -o cram/cram_decode.o cram/cram_decode.c
clang -g -Wall -O2 -I.  -c -o cram/cram_encode.o cram/cram_encode.c
clang -g -Wall -O2 -I.  -c -o cram/cram_external.o cram/cram_external.c
clang -g -Wall -O2 -I.  -c -o cram/cram_index.o cram/cram_index.c
clang -g -Wall -O2 -I.  -c -o cram/cram_io.o cram/cram_io.c
cram/cram_io.c:61:10: fatal error: 'lzma.h' file not found
#include <lzma.h>
         ^~~~~~~~
1 error generated.
make[1]: *** [cram/cram_io.o] Error 1
make: *** [htslib] Error 2
ERROR: compilation failed for package 'Rhtslib'
* removing '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rhtslib'
* restoring previous '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rhtslib'





> session_info()
Session info -------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.0 (2018-04-23)
 system   x86_64, darwin15.6.0        
 ui       RStudio (1.1.447)           
 language (EN)                        
 collate  C                           
 tz       Europe/Berlin               
 date     2018-08-01                  

Packages -----------------------------------------------------------------------------------------------------------------------------
 package       * version date       source        
 base          * 3.5.0   2018-04-24 local         
 BiocInstaller * 1.30.0  2018-05-01 Bioconductor  
 compiler        3.5.0   2018-04-24 local         
 curl            3.2     2018-03-28 CRAN (R 3.5.0)
 datasets      * 3.5.0   2018-04-24 local         
 devtools      * 1.13.6  2018-06-27 CRAN (R 3.5.0)
 digest          0.6.15  2018-01-28 CRAN (R 3.5.0)
 git2r           0.23.0  2018-07-17 CRAN (R 3.5.0)
 graphics      * 3.5.0   2018-04-24 local         
 grDevices     * 3.5.0   2018-04-24 local         
 httr            1.3.1   2017-08-20 CRAN (R 3.5.0)
 knitr           1.20    2018-02-20 CRAN (R 3.5.0)
 memoise         1.1.0   2017-04-21 CRAN (R 3.5.0)
 methods       * 3.5.0   2018-04-24 local         
 R6              2.2.2   2017-06-17 CRAN (R 3.5.0)
 Rhtslib       * 1.12.1  2018-05-31 Bioconductor  
 stats         * 3.5.0   2018-04-24 local         
 tools           3.5.0   2018-04-24 local         
 utils         * 3.5.0   2018-04-24 local         
 withr           2.1.2   2018-03-15 CRAN (R 3.5.0)
 yaml            2.2.0   2018-07-25 CRAN (R 3.5.0)
 zlibbioc        1.26.0  2018-05-01 Bioconductor  

Britta

unread,
Aug 1, 2018, 8:05:36 AM8/1/18
to methylkit_discussion
new info: I actually get the exact same error using Linux_Gnu Rstudio (1.1.453) Revision 3.51 

Johan Zicola

unread,
Aug 1, 2018, 9:19:41 AM8/1/18
to methylkit_discussion
Dear Britta,

I was struggling as well for methylKit installation with both Windows and Linux because of Rhtslib. Here how I solved the problem for the two OS. In both case, the solution is to install manually the 'misnamed' last version of Rhtslib:

For Linux
I downloaded the version  Rhtslib_1.13.4.tar.gz https://www.bioconductor.org/packages/devel/bioc/html/Rhtslib.html
and put it in the library directory, enter command in bash
R CMD INSTALL Rhtslib_1.13.4.tar.gz
Ignore the fact that the name of the archive is Rhtslib_1.13.4.tar.gz, it is actually 1.7, as you will see.
Go in R 3.5.0
library(Rhtslib)
Rhtslib htslib version 1.7

library
(devtools)
install_github
("al2na/methylKit", build_vignettes=FALSE,

  repos
=BiocInstaller::biocinstallRepos(),
  dependencies
=TRUE)
library
(methylKit)

For Windows
Download the binary zip from https://www.bioconductor.org/packages/devel/bioc/html/Rhtslib.html
In R 3.5.0, type:
# Give path to the zip file
install
.packages('C:/Users/zicola/Documents/R/win-library/3.5/Rhtslib_1.13.4.zip', lib='C:/Users/zicola/Documents/R/win-library/3.5/',repos = NULL)


library
(Rhtslib)
Rhtslib htslib version 1.7

Install Methylkit

library
(devtools)
install_github
("al2na/methylKit", build_vignettes=FALSE,

   repos
=BiocInstaller::biocinstallRepos(),
   dependencies
=TRUE)

library
(methylKit)
# Works!




Britta

unread,
Aug 1, 2018, 12:12:43 PM8/1/18
to methylkit_discussion
Dear Johan,

thanks a lot! You gave me the right idea to download the right package version.

if (!requireNamespace("BiocManager", quietly=TRUE))
    install.packages("BiocManager")
BiocManager::install("Rhtslib", version = "devel")
And than 
install_github("al2na/methylKit", build_vignettes=FALSE, 
+                repos=BiocInstaller::biocinstallRepos(),ref="development",
+                dependencies=TRUE)

This finally worked... (only) on the linux. 

Thanks again!

Johan Zicola

unread,
Aug 2, 2018, 3:29:06 AM8/2/18
to methylkit_discussion
Dear Britta,

I remember now that I also had a Rtools problem in Windows, which could also be your case. You can give a try and install the last Rtools (version 35) if not done already (download on https://cran.r-project.org/bin/windows/Rtools/ and launch the executable). Tip the "Add rtools to system PATH during installation" (see this helpful thread https://stackoverflow.com/questions/50034966/no-rtools-compatible-with-r-version-3-5-0-was-found).
Reopen R
> library(devtools)

> install_github("al2na/methylKit", build_vignettes=FALSE,
+   repos=BiocInstaller::biocinstallRepos(),
+   dependencies=TRUE)

library
(methylKit)

Let me know if this solve your Windows problem as well.
Cheers,
Reply all
Reply to author
Forward
0 new messages