bvieth / powsimR

Power analysis is essential to optimize the design of RNA-seq experiments and to assess and compare the power to detect differentially expressed genes. PowsimR is a flexible tool to simulate and evaluate differential expression from bulk and especially single-cell RNA-seq data making it suitable for a priori and posterior power analyses.
https://bvieth.github.io/powsimR/
Artistic License 2.0
104 stars 23 forks source link

Installation failed #24

Closed gcrynen closed 6 years ago

gcrynen commented 6 years ago

Hi, I have been trying to install powsimR however i am having some issues, i have read a few of the closed posts from other users and your advice but none of them helped thus far. I am using a windows machine with Rstudio and R version 3.4.4. version 3.5 doesnt work , apparently there is no version of Rtools currently available for R 3.5 or at least that is the error message i am getting. so i moved back to R 3.4.4. then I did exactly what was suggested but I am still having trouble. any input will be greatly appreciated. here is the log:

ipak <- function(pkg, repository = c("CRAN", "Bioconductor", "github")) {

  • new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
  • new.pkg <- pkg

  • if (length(new.pkg)) {
  • if (repository == "CRAN") {
  • install.packages(new.pkg, dependencies = TRUE)
  • }
  • if (repository == "Bioconductor") {
  • source("https://bioconductor.org/biocLite.R")
  • biocLite(new.pkg, dependencies = TRUE, ask = FALSE)
  • }
  • if (repository == "github") {
  • devtools::install_github(new.pkg, build_vignettes = FALSE, dependencies = TRUE)
  • }
  • }
  • }

CRAN PACKAGES

cranpackages <- c("bbmle", "broom", "cobs", "cowplot", "data.table", "devtools",

  • "doParallel", "dplyr", "drc", "DrImpute", "fastICA", "fitdistrplus", "foreach",
  • "gamlss.dist", "ggExtra", "ggplot2", "ggthemes", "grDevices", "glmnet",
  • "grid", "gtools", "Hmisc", "kernlab", "MASS", "matrixStats", "mclust", "methods",
  • "minpack.lm", "moments", "msir", "NBPSeq", "nonnest2", "parallel", "penalized",
  • "plyr", "pscl", "reshape2", "ROCR", "Rtsne", "scales", "Seurat", "snow",
  • "stats", "tibble", "tidyr", "VGAM", "ZIM") ipak(cranpackages, repository = "CRAN")

BIOCONDUCTOR

biocpackages <- c("AnnotationDbi", "baySeq", "Biobase", "BiocGenerics", "BiocParallel",

  • "DEDS", "DESeq2", "EBSeq", "edgeR", "IHW", "iCOBRA", "limma", "Linnorm",
  • "MAST", "monocle", "NOISeq", "qvalue", "ROTS", "RUVSeq", "S4Vectors", "scater",
  • "scDD", "scde", "scone", "scran", "SCnorm", "SingleCellExperiment", "SummarizedExperiment",
  • "zinbwave") ipak(biocpackages, repository = "Bioconductor")

GITHUB

githubpackages <- c("nghiavtr/BPSC", "cz-ye/DECENT", "mohuangx/SAVER", "statOmics/zingeR") ipak(githubpackages, repository = "github") Downloading GitHub repo nghiavtr/BPSC@master from URL https://api.github.com/repos/nghiavtr/BPSC/zipball/master Installing BPSC "C:/PROGRA~1/R/R-34~1.4/bin/x64/R" --no-site-file --no-environ --no-save --no-restore \ --quiet CMD INSTALL \ "C:/Users/gcrynen/AppData/Local/Temp/Rtmpg5DfOm/devtools2fe076323993/nghiavtr-BPSC-1fe6f32" \ --library="C:/Users/gcrynen/Documents/R/win-library/3.4" --install-tests

*** arch - i386 C:/RBuildTools/3.4/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-34~1.4/include" -DNDEBUG -I"C:/Users/gcrynen/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/gcrynen/Documents/R/win-library/3.4/RcppEigen/include" -I"C:/Users/gcrynen/Documents/R/win-library/3.4/RcppNumerical/include" -O2 -Wall -mtune=generic -c LRT_logl.cpp -o LRT_logl.o C:/RBuildTools/3.4/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-34~1.4/include" -DNDEBUG -I"C:/Users/gcrynen/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/gcrynen/Documents/R/win-library/3.4/RcppEigen/include" -I"C:/Users/gcrynen/Documents/R/win-library/3.4/RcppNumerical/include" -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o C:/RBuildTools/3.4/mingw_32/bin/g++ -shared -s -static-libgcc -o DECENT.dll tmp.def LRT_logl.o RcppExports.o -LC:/PROGRA~1/R/R-34~1.4/bin/i386 -lR installing to C:/Users/gcrynen/Documents/R/win-library/3.4/DECENT/libs/i386

arch - x64 C:/RBuildTools/3.4/mingw_64/bin/g++ -I"C:/PROGRA~1/R/R-34~1.4/include" -DNDEBUG -I"C:/Users/gcrynen/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/gcrynen/Documents/R/win-library/3.4/RcppEigen/include" -I"C:/Users/gcrynen/Documents/R/win-library/3.4/RcppNumerical/include" -O2 -Wall -mtune=generic -c LRT_logl.cpp -o LRT_logl.o C:/RBuildTools/3.4/mingw_64/bin/g++ -I"C:/PROGRA~1/R/R-34~1.4/include" -DNDEBUG -I"C:/Users/gcrynen/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/gcrynen/Documents/R/win-library/3.4/RcppEigen/include" -I"C:/Users/gcrynen/Documents/R/win-library/3.4/RcppNumerical/include" -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o C:/RBuildTools/3.4/mingw_64/bin/g++ -shared -s -static-libgcc -o DECENT.dll tmp.def LRT_logl.o RcppExports.o -LC:/PROGRA~1/R/R-34~1.4/bin/x64 -lR installing to C:/Users/gcrynen/Documents/R/win-library/3.4/DECENT/libs/x64 R data moving datasets to lazyload DB preparing package for lazy loading help installing help indices converting help for package 'DECENT' finding HTML links ... done Estep2ByGene html
EstepByGene html
MstepNB html
calc2DOProb html
calc2NBProb html
calc2PoisProb html
calcDOProb html
calcNBProb html
dbetabinom2 html
dbinom2 html
decent html
dnbinom2 html
dpois2 html
fitDE html
fitNoDE html
getImputed html
loglI html
loglI2 html
lrTest html
sim html
zinbGrad html
building package indices testing if installed package can be loaded
arch - i386 *** arch - x64

package ‘DESeq2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\gcrynen\AppData\Local\Temp\Rtmpg5DfOm\downloaded_packages "C:/PROGRA~1/R/R-34~1.4/bin/x64/R" --no-site-file --no-environ --no-save --no-restore \ --quiet CMD INSTALL \ "C:/Users/gcrynen/AppData/Local/Temp/Rtmpg5DfOm/devtools2fe0397630a0/statOmics-zingeR-c789ae5" \ --library="C:/Users/gcrynen/Documents/R/win-library/3.4" --install-tests

I also used the alternative method but that gives the same results.

thank you very much gogce

bvieth commented 6 years ago

Hello,

thanks for trying out powsimR! So there appears to be an issue with the subversion (SVN). If you successfully installed all dependencies of powsimR (see also https://github.com/bvieth/powsimR/issues/20#issuecomment-393850730), you can manually install powsimR:

Step 1: Download the source zip from github. Step 2: Unzip the content. Step 3: Run the following code (adjust the path as necessary): library(devtools); source <- devtools::source_pkg("E:/temp/powsimR-master"); devtools::install(source); library(powsimR)

I hope this helps!

Kind regards Beate

gcrynen commented 6 years ago

hi i still get error message.

library(devtools); source <- devtools::source_pkg("C:/Users/gcrynen/Documents/powsimR-master"); devtools::install(source); library(powsimR) Error: 'source_pkg' is not an exported object from 'namespace:devtools'

so I added one more : between devtools and source pkg and i get the SVN error.

library(devtools); source <- devtools:::source_pkg("C:/Users/gcrynen/Documents/powsimR-master"); devtools::install(source); library(powsimR) Installing powsimR Error: SVN does not seem to be installed on your system.

bvieth commented 6 years ago

Hello,

One alternative is to download the zip file, unzip it and subsequently zip it as a tar.gz file and then install the source package in R: install.packages("powsimR.tar.gz", type="source", repos=NULL)

Kind regards Beate

gcrynen commented 6 years ago

Thank you for the advice, I hate to be the bearer of bad news but that didnt work either, here is the log

install.packages("C:/Users/.../Downloads/powsimR.tar.gz", repos = NULL, type = "source") Installing package into ‘C:/Users/.../Documents/R/win-library/3.4’ (as ‘lib’ is unspecified)

  • installing source package 'powsimR' ... R data * moving datasets to lazyload DB inst ** preparing package for lazy loading Warning: replacing previous import 'DECENT::lrTest' by 'MAST::lrTest' when loading 'powsimR' Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/..../Documents/R/win-library/3.4/rtracklayer/libs/x64/rtracklayer.dll': `maximal number of DLLs reached... ERROR: lazy loading failed for package 'powsimR'
  • removing 'C:/Users/gcrynen/Documents/R/win-library/3.4/powsimR' In R CMD INSTALL Warning in install.packages : running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users...\Documents\R\win-library\3.4" "C:/Users/.../DROPBO~1/DOWNLO~1/powsimR.tar.gz"' had status 1 Warning in install.packages : installation of package ‘C:/Users/.../DROPBO~1/DOWNLO~1/powsimR.tar.gz’ had non-zero exit status
bvieth commented 6 years ago

Hello,

so from your message above I can see that you have reached the maximum number of DLLs. As explained in the README file, you can set this system environmental variable to a higher number:

Starting with R version 3.4.0, one can set the environmental variable 'R_MAX_NUM_DLLS' to a higher number. I recommend to increase the maximum number of DLLs that can be loaded to at least 500. For that locate the Renviron file: First determine your R_HOME directory (see the output of R.home(component="home")), then in there, you will find the Renviron file in etc/ folder. Open the file with an editor and add the following line: R_MAX_NUM_DLLS=500. Save the changes to the file and restart your R to load the changes.

Kind regards Beate

gcrynen commented 6 years ago

thank you for the quick reply. This helped me through installation but then when i loaded the package it gave me a similar maximum dll error. I looked at ?Startup file and reading that I created a "Renviron.site" file with the same line you suggested (R_MAX_NUM_DLLS=500) under the same etc folder (C:\Program Files\R\R-3.4.4\etc) and it worked! thank you very much for all the help.