KlausVigo / phangorn

Phylogenetic analysis in R
http://klausvigo.github.io/phangorn/
202 stars 38 forks source link

install phangorn in R 3.6? #124

Closed marwa38 closed 2 years ago

marwa38 commented 2 years ago

any way to install phangorn in R 3.6? I tried remotes::install_github("KlausVigo/phangorn") and gave an error

> remotes::install_github("KlausVigo/phangorn")
Downloading GitHub repo KlausVigo/phangorn@HEAD
✓  checking for file ‘/tmp/Rtmpirnh9d/remotes3a96756d4a144/KlausVigo-phangorn-272ec49/DESCRIPTION’ (534ms)
─  preparing ‘phangorn’: (370ms)
✓  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts (825ms)
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘phangorn_2.8.1.1.tar.gz’
Warning: invalid uid value replaced by that for user 'nobody'

Installing package into ‘/uoa/scratch/users/r01mt19/R/3.6’
(as ‘lib’ is unspecified)
ERROR: this R is version 3.6.1, package 'phangorn' requires R >= 4.1.0
Warning message:
  In i.p(...) :
  installation of package ‘/tmp/Rtmpirnh9d/file3a96753330378/phangorn_2.8.1.1.tar.gz’ had non-zero exit status
Error in fetch(key) : 
  lazy-load database '/uoa/scratch/users/r01mt19/R/3.6/remotes/help/remotes.rdb' is corrupt
Error in fetch(key) : 
  lazy-load database '/uoa/scratch/users/r01mt19/R/3.6/remotes/help/remotes.rdb' is corrupt
> devtools::install_github("KlausVigo/phangorn")
Downloading GitHub repo KlausVigo/phangorn@HEAD
✓  checking for file ‘/tmp/Rtmpirnh9d/remotes3a9671c758f99/KlausVigo-phangorn-272ec49/DESCRIPTION’ (530ms)
─  preparing ‘phangorn’: (371ms)
✓  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts (887ms)
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘phangorn_2.8.1.1.tar.gz’
Warning: invalid uid value replaced by that for user 'nobody'

Installing package into ‘/uoa/scratch/users/r01mt19/R/3.6’
(as ‘lib’ is unspecified)
ERROR: this R is version 3.6.1, package 'phangorn' requires R >= 4.1.0
Warning message:
  In i.p(...) :
  installation of package ‘/tmp/Rtmpirnh9d/file3a9676b7f2879/phangorn_2.8.1.1.tar.gz’ had non-zero exit status

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /opt/software/uoa/2019/conda/anaconda3/envs/rstudio-1.1.456/lib/R/lib/libRblas.so

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

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

other attached packages:
  [1] ape_5.6       remotes_2.4.2

loaded via a namespace (and not attached):
  [1] Rcpp_1.0.7          rstudioapi_0.13     magrittr_2.0.1      usethis_2.1.5       devtools_2.4.3     
[6] pkgload_1.2.4       lattice_0.20-45     R6_2.4.0            rlang_0.4.12        fastmap_1.1.0      
[11] tools_3.6.1         parallel_3.6.1      grid_3.6.1          pkgbuild_1.3.1      nlme_3.1-153       
[16] sessioninfo_1.1.1   cli_3.1.0           withr_2.4.3         ellipsis_0.3.2      yaml_2.2.0         
[21] assertthat_0.2.1    rprojroot_1.3-2     lifecycle_1.0.1     crayon_1.4.2        processx_3.5.2     
[26] purrr_0.3.4         BiocManager_1.30.16 callr_3.7.0         fs_1.5.2            ps_1.6.0           
[31] curl_3.3            testthat_3.1.1      memoise_2.0.1       glue_1.6.0          cachem_1.0.6       
[36] compiler_3.6.1      desc_1.4.0          backports_1.1.4     prettyunits_1.0.2  

Thanks

marwa38 commented 2 years ago

Hello @KlausVigo

I ran this and it worked but I got another error I haven't got before when I worked on a different version of R > 4 (which I can't for some reason do now). install_version("phangorn", version = "1.99-11")

fitGTR <- optim.pml(fitGTR, model="GTR", optInv=TRUE, optGamma=TRUE,
                    rearrangement = "stochastic", control = pml.control(trace = 0))
# Error in moveLL2(P, LL, dat[, loli], nr, nc, k) : 
#   NA/NaN/Inf in foreign function call (arg 1)

I am working according to this workflow https://f1000research.com/articles/5-1492 do you advise upgrading to another version that still works with 3.6 R? or any advice please cheers Marwa

marwa38 commented 2 years ago

As an update: I ran phangorn 2.26 and it worked fine without any error.