tpook92 / HaploBlocker

R-package: Calculation of haplotype blocks and libraries
GNU General Public License v3.0
26 stars 2 forks source link

HaploBlocker on R 4.0.4, Windows 10 #11

Open martabe opened 3 years ago

martabe commented 3 years ago

Hi!

Can I ask you if you have tested installation in R version 4.0.4 (or any 4 version) in Windows? I cannot manage to install it, while it was working fine before upgrading R.

My sessionInfo:

R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=Italian_Italy.1252  LC_CTYPE=Italian_Italy.1252    LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C                  
[5] LC_TIME=Italian_Italy.1252    

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

loaded via a namespace (and not attached):
 [1] compiler_4.0.4       formatR_1.7          futile.logger_1.4.3  prettyunits_1.1.1    futile.options_1.0.1 remotes_2.2.0       
 [7] tools_4.0.4          testthat_3.0.2       digest_0.6.27        pkgbuild_1.2.0       pkgload_1.1.0        evaluate_0.14       
[13] memoise_2.0.0        lifecycle_1.0.0      rlang_0.4.10         rstudioapi_0.13      cli_2.3.0            curl_4.3            
[19] yaml_2.2.1           xfun_0.21            fastmap_1.1.0        withr_2.4.1          knitr_1.31           desc_1.2.0          
[25] fs_1.5.0             devtools_2.3.2       rprojroot_2.0.2      glue_1.4.2           R6_2.5.0             processx_3.4.5      
[31] rmarkdown_2.7        sessioninfo_1.1.1    callr_3.5.1          purrr_0.3.4          lambda.r_1.2.4       magrittr_2.0.1      
[37] ps_1.5.0             ellipsis_0.3.1       htmltools_0.5.1.1    usethis_2.0.1        assertthat_0.2.1     cachem_1.0.4        
[43] crayon_1.4.1

I have Rtools40 installed and listed in PATH:

Sys.getenv("PATH")
"C:\\Program Files\\R\\R-4.0.4\\bin\\x64;C:\\ProgramData\\Oracle\\Java\\javapath_target_703343;C:\\Applied Biosystems\\StepOne Software v2.3\\bin;C:\\Applied Biosystems\\StepOne Software v2.3\\eclipse;C:\\Applied Biosystems\\StepOne Software v2.3\\eclipse\\plugins\\com.apldbio.sds.experiment.genotyping_2.1.0\\bin;C:\\Applied Biosystems\\StepOne Software v2.3\\eclipse\\plugins\\com.apldbio.sds.experiment.genotyping_2.1.0\\bin\\bin\\win32;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Windows\\System32\\OpenSSH;C:\\Program Files\\MEGA-X;C:\\texlive\\2019\\bin\\win32;C:\\Users\\binag\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\binag\\AppData\\Local\\Programs\\Git\\cmd;C:\\Users\\binag\\AppData\\Local\\atom\\bin;C:\\Users\\binag\\Documents\\%USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\binag\\AppData\\Local\\Programs\\MiKTeX 2.9\\miktex\\bin\\x64;C:\\rtools40;C:\\rtools40\\mingw64\\bin"

Installing with devtools::install_github("tpook92/HaploBlocker", subdir="pkg") has non zero exit status. Manual installation with install.packages("https://github.com/tpook92/HaploBlocker/blob/master/Old_version/HaploBlocker_1.5.8.zip", type = "source", repos = NULL)
fails with Warning in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : cannot open compressed file 'HaploBlocker/DESCRIPTION', probable reason 'No such file or directory' Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : non posso aprire questa connessione (=cannot open this connection)

Do you have any suggestion on what could be wrong? Anything I could check?

Thanks a lot, Marta

tpook92 commented 3 years ago

Hi Marta, I just checked on my Windows system on R 4.0.2 and I think your installation error via devtools::install_github("tpook92/HaploBlocker", subdir="pkg") is caused by R automatically installing an old version of RandomFieldsUtils. Our newest version of HaploBlocker requires RandomFieldsUtils 0.6.6 or higher (but only 0.5.3 is on CRAN). Please first install RandomFieldsUtils manually. You can do this by downloading the newest version from here (https://github.com/tpook92/HaploBlocker/blob/master/RandomFieldsUtils_0.6.6.tar.gz). And install locally (install.packages("RandomFieldsUtils_0.6.6.tar.gz, type="source"))

Installing via regular link from install.packages is a syntax I am not familiar with. I personally would recommend downloading and installing from a local directory. In any case, type="source" is only needed when the package is in .tar.gz format. For a zipped package this will lead to an error.

Hope this could answer this problem. Otherwise, please provide me with the exact line of code entered in your R console and the error message.

Best regards Torsten

martabe commented 3 years ago

Hi Torsten,

I tried with the new version of RandomFieldsUtils and version 1.6.03 of HaploBlocker and it worked, thanks!

In the failed attempts I was installing an older version of HaploBlocker so that I didn't have to update RandomFieldsUtils. Also, I realised my wget commands were not always downloading the correct file from GitHub (I was getting an html with a .zip or .tar.gz extension). My mistake.

So, I guess there were a couple things wrong in my procedure...

Thanks a lot for your help! Marta