vallenderlab / MicrobiomeR

A comprehensive and customizable R package for microbiome analysis.
https://vallenderlab.github.io/MicrobiomeR/
MIT License
20 stars 4 forks source link

Installation failure due to modes package #105

Open avportal opened 4 years ago

avportal commented 4 years ago

Hi there,

I am trying to install the package but I get the following error message:

ERROR: dependency ‘modes’ is not available for package ‘MicrobiomeR’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/MicrobiomeR’
Error: Failed to install 'MicrobiomeR' from GitHub:
  (converted from warning) installation of package ‘/var/folders/st/y2p98lbd0y58731wvyg2rgpc0000gp/T//RtmpI4UmRD/fileefb13850b96/MicrobiomeR_0.6.1.tar.gz’ had non-zero exit status

> install.packages("modes")
Warning in install.packages :
  package ‘modes’ is not available (for R version 3.6.3)

It seems that the package "modes" has been removed from the CRAN repository.

Insert Session info here

R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] phyloseq_1.30.0 devtools_2.3.0  usethis_1.6.1  

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4.6        ape_5.4             lattice_0.20-41    
 [4] prettyunits_1.1.1   ps_1.3.3            Biostrings_2.54.0  
 [7] assertthat_0.2.1    rprojroot_1.3-2     digest_0.6.25      
[10] foreach_1.5.0       R6_2.4.1            plyr_1.8.6         
[13] backports_1.1.7     stats4_3.6.3        ggplot2_3.3.1      
[16] pillar_1.4.4        zlibbioc_1.32.0     rlang_0.4.6        
[19] curl_4.3            rstudioapi_0.11     data.table_1.12.8  
[22] vegan_2.5-6         callr_3.4.3         S4Vectors_0.24.4   
[25] Matrix_1.2-18       splines_3.6.3       desc_1.2.0         
[28] stringr_1.4.0       igraph_1.2.5        munsell_0.5.0      
[31] compiler_3.6.3      pkgconfig_2.0.3     BiocGenerics_0.32.0
[34] multtest_2.42.0     pkgbuild_1.0.8      mgcv_1.8-31        
[37] tidyselect_1.1.0    biomformat_1.14.0   tibble_3.0.1       
[40] IRanges_2.20.2      codetools_0.2-16    permute_0.9-5      
[43] fansi_0.4.1         dplyr_1.0.0         crayon_1.3.4       
[46] withr_2.2.0         MASS_7.3-51.6       grid_3.6.3         
[49] nlme_3.1-148        jsonlite_1.6.1      gtable_0.3.0       
[52] lifecycle_0.2.0     magrittr_1.5        scales_1.1.1       
[55] cli_2.0.2           stringi_1.4.6       XVector_0.26.0     
[58] reshape2_1.4.4      fs_1.4.1            remotes_2.1.1      
[61] testthat_2.3.2      generics_0.0.2      ellipsis_0.3.1     
[64] vctrs_0.3.1         Rhdf5lib_1.8.0      iterators_1.0.12   
[67] tools_3.6.3         ade4_1.7-15         Biobase_2.46.0     
[70] glue_1.4.1          purrr_0.3.4         survival_3.1-12    
[73] processx_3.4.2      pkgload_1.1.0       parallel_3.6.3     
[76] colorspace_1.4-1    rhdf5_2.30.1        cluster_2.1.0      
[79] sessioninfo_1.1.1   memoise_1.1.0
grabear commented 4 years ago

Hi @avportal. I'm very sorry it took this long to get back to you fully. It seems that you are correct about the modes package. We only use one function from there (shown below). It shouldn't be to hard to port it over, and remove the modes as a dependency completely. I will work on this tomorrow and try to get the changes update for you.

bimodality_coefficient<-function(x, finite=TRUE,...){
    if(finite==TRUE){
        G=skewness(x,finite)
        sample.excess.kurtosis=kurtosis(x,finite)
        K=sample.excess.kurtosis
        n=length(x)
        B=((G^2)+1)/(K+ ((3*((n-1)^2))/((n-2)*(n-3))))
    }
    else{
        G=skewness(x,FALSE)
        K=kurtosis(x,FALSE)
        B=((G^2)+1)/(K)
    }
    return(B)
}
grabear commented 4 years ago

https://github.com/sathish-deevi/modes-Package/blob/master/src/R/Nonparametric_functions.R

sdhutchins commented 4 years ago

@grabear I created this little branch for that. Feel free to delete it. 😃

avportal commented 4 years ago

Thank you!

Cheers,

Angel

On 08 Jul 2020, at 01:12, Rob Gilmore notifications@github.com wrote:

Hi @avportal https://github.com/avportal. I'm very sorry it took this long to get back to you fully. It seems that you are correct about the modes package. We only use one function from there (shown below). It shouldn't be to hard to port it over, and remove the modes as a dependency completely. I will work on this tomorrow and try to get the changes update for you.

bimodality_coefficient<-function(x, finite=TRUE,...){ if(finite==TRUE){ G=skewness(x,finite) sample.excess.kurtosis=kurtosis(x,finite) K=sample.excess.kurtosis n=length(x) B=((G^2)+1)/(K+ ((3((n-1)^2))/((n-2)(n-3)))) } else{ G=skewness(x,FALSE) K=kurtosis(x,FALSE) B=((G^2)+1)/(K) } return(B) } — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vallenderlab/MicrobiomeR/issues/105#issuecomment-655185856, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO4MKESZJR3YC3PALALNWILR2OTWZANCNFSM4N5LG6UQ.


Angel Valverde Portal IRNASA-CSIC C/ Cordel de Merinas 40-52 37008 Salamanca Spain Tel.: +34 923 219 606

sdhutchins commented 4 years ago

@avportal I would suggest installing this release with the latest version of R (4.0).

MicrobiomeR_0.7.0.tar.gz

install.packages("MicrobiomeR_0.7.0.tar.gz", repos = NULL, type ="source")
avportal commented 4 years ago

Many thanks.

Regards,

Angel

On 09 Aug 2020, at 05:21, Shaurita Hutchins notifications@github.com wrote:

@avportal https://github.com/avportal I would suggest installing this release https://github.com/vallenderlab/MicrobiomeR/releases/tag/v0.7.0 with the latest version of R (4.0).

MicrobiomeR_0.7.0.tar.gz https://github.com/vallenderlab/MicrobiomeR/files/5046711/MicrobiomeR_0.7.0.tar.gz install.packages("MicrobiomeR_0.7.0.tar.gz", repos = NULL, type =‘‘source’’) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vallenderlab/MicrobiomeR/issues/105#issuecomment-671000458, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO4MKETVGLKCPZ3O7HXNHVDR7YI3XANCNFSM4N5LG6UQ.


Angel Valverde Portal IRNASA-CSIC C/ Cordel de Merinas 40-52 37008 Salamanca Spain

Tel.: +34 923 219 606 (Ext. 231) Fax: +34 923 219 609 angel.valverde@csic.es

lixiaopi1985 commented 4 years ago

work around: download modes package from CRAN: https://cran.r-project.org/web/packages/modes/index.html, and install it locally install_local()

grabear commented 4 years ago

@lixiaopi1985 Thank you for this workaround. @sdhutchins And thank you for pushing a working release.

@avportal The issue should be fixed by installing MicrobiomeR using @sdhutchins solution. If you have any more issues with this, then please let us know.

The primary reason for the delay with this bug fix was a failure to get our Travis CI and GitHub actions working properly. However, this is a separate issue and should have been treated as one.

avportal commented 4 years ago

It did work indeed. Thanks!

Cheers,

Angel

El 5 oct 2020, a las 17:32, Rob Gilmore notifications@github.com escribió:

@lixiaopi1985 https://github.com/lixiaopi1985 Thank you for this workaround. @sdhutchins https://github.com/sdhutchins And thank you for pushing a working release.

@avportal https://github.com/avportal The issue should be fixed by installing MicrobiomeR using @sdhutchins https://github.com/sdhutchins solution. If you have any more issues with this, then please let us know.

The primary reason for the delay with this bug fix was a failure to get our Travis CI and GitHub actions working properly. However, this is a separate issue and should have been treated as one.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vallenderlab/MicrobiomeR/issues/105#issuecomment-703709571, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO4MKERMZYCFHK2VDSYGIOLSJHRJ3ANCNFSM4N5LG6UQ.


Angel Valverde Portal IRNASA-CSIC C/ Cordel de Merinas 40-52 37008 Salamanca Spain

Tel.: +34 923 219 606 (Ext. 231) Fax: +34 923 219 609 angel.valverde@csic.es