RGLab / flowStats

flowStats: algorithms for flow cytometry data analysis using BioConductor tools
15 stars 10 forks source link

unable to load flowStats & openCyto #17

Closed chethanjjj closed 7 years ago

chethanjjj commented 8 years ago

Hi guys,

I've recently have a problem with loading flowStats and openCyto. They install fine, but for some reason they crash RStudio every time I load it.


my code:

source("https://bioconductor.org/biocLite.R") Bioconductor version 3.2 (BiocInstaller 1.20.1), ?biocLite for help biocLite("flowStats") BioC_mirror: https://bioconductor.org Using Bioconductor 3.2 (BiocInstaller 1.20.1), R 3.2.3 (2015-12-10). Installing package(s) ‘flowStats’ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 17 4266k 17 767k 0 0 3833k 0 0:00:01 --:--:-- 0:00:01 3817k100 4266k 100 4266k 0 0 8249k 0 --:--:-- --:--:-- --:--:-- 8236k

The downloaded binary packages are in /var/folders/sn/0tvmr0bj32l8bpdzl6xzmpqm0000gn/T//Rtmp6ugDnY/downloaded_packages

library(flowStats) Loading required package: flowCore Loading required package: fda Loading required package: splines Loading required package: Matrix

Attaching package: ‘Matrix’

The following object is masked from ‘package:flowCore’:

%&%

Attaching package: ‘fda’

The following object is masked from ‘package:graphics’:

matplot

Loading required package: mvoutlier Loading required package: sgeostat sROC 0.1-2 loaded Loading required package: cluster Loading required package: flowWorkspace Loading required package: flowViz Loading required package: lattice Loading required package: ncdfFlow Loading required package: RcppArmadillo Loading required package: BH Loading required package: gridExtra


its at this point loading flowStats and openCyto crashes my RStudio


I downloaded the latest version of both packages: flowStats: 1.0 openCyto: 1.2.8

And my version of R: R: 3.2.3

And my Mac operating system version: 10.11.2


Interestingly though, I tried to install and load flowStats and openCyto with R 3.2.1 on my windows machine and found it worked no problem. Could there be an issue with the new version of R and these packages? Thank you for taking time to address these issues.

I've also included the crash report in this post as well.

rsession_2016-01-29-212731_PEDS-0JTG8WM-LT.txt

SamGG commented 8 years ago

Hi, No problem under Windows 7 x64, R 3.2.3. My versions are flowStats_3.28.1 and openCyto_1.8.4. I have a doubt with the installation of rrcov and reinstalled it. Apart from that, it's fine. Best.

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(openCyto)
Loading required package: flowWorkspace
Loading required package: flowCore
Loading required package: flowViz
Loading required package: lattice
Loading required package: ncdfFlow
Loading required package: RcppArmadillo
Loading required package: BH
Loading required package: gridExtra
sROC 0.1-2 loaded
> library(flowStats)
Loading required package: fda
Loading required package: splines
Loading required package: Matrix

Attaching package: ‘Matrix’

The following object is masked from ‘package:flowCore’:

    %&%

Attaching package: ‘fda’

The following object is masked from ‘package:graphics’:

    matplot

Loading required package: mvoutlier
Loading required package: sgeostat
Loading required package: cluster
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

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

other attached packages:
 [1] flowStats_3.28.1          cluster_2.0.3            
 [3] mvoutlier_2.0.6           sgeostat_1.0-26          
 [5] fda_2.4.4                 Matrix_1.2-3             
 [7] openCyto_1.8.4            flowWorkspace_3.16.13    
 [9] gridExtra_2.0.0           ncdfFlow_2.16.1          
[11] BH_1.60.0-1               RcppArmadillo_0.6.400.2.2
[13] flowViz_1.34.0            lattice_0.20-33          
[15] flowCore_1.36.9          

loaded via a namespace (and not attached):
 [1] Biobase_2.30.0        jsonlite_0.9.19      
 [3] R.utils_2.2.0         gtools_3.5.0         
 [5] assertthat_0.1        stats4_3.2.3         
 [7] latticeExtra_0.6-26   RBGL_1.46.0          
 [9] robustbase_0.92-5     RUnit_0.4.31         
[11] chron_2.3-47          RColorBrewer_1.1-2   
[13] colorspace_1.2-6      R.oo_1.19.0          
[15] plyr_1.8.3            multicool_0.1-9      
[17] pcaPP_1.9-60          XML_3.98-1.3         
[19] misc3d_0.8-4          zlibbioc_1.16.0      
[21] corpcor_1.6.8         mvtnorm_1.0-4        
[23] scales_0.3.0          ggplot2_2.0.0        
[25] BiocGenerics_0.16.1   hexbin_1.27.1        
[27] magrittr_1.5          IDPmisc_1.1.17       
[29] ks_1.10.0             GGally_1.0.1         
[31] R.methodsS3_1.7.0     MASS_7.3-45          
[33] graph_1.48.0          tools_3.2.3          
[35] data.table_1.9.6      flowClust_3.8.0      
[37] matrixStats_0.50.1    stringr_1.0.0        
[39] MCMCpack_1.3-3        munsell_0.4.2        
[41] flowUtils_1.34.0      pls_2.5-0            
[43] grid_3.2.3            gtable_0.1.2         
[45] codetools_0.2-14      DBI_0.3.1            
[47] reshape_0.8.5         rrcov_1.3-8          
[49] R6_2.1.1              robCompositions_1.9.1
[51] dplyr_0.4.3           sROC_0.1-2           
[53] clue_0.3-51           KernSmooth_2.23-15   
[55] Rgraphviz_2.14.0      stringi_1.0-1        
[57] parallel_3.2.3        Rcpp_0.12.3          
[59] rgl_0.95.1441         DEoptimR_1.0-4       
[61] coda_0.18-1          
> 
chethanjjj commented 8 years ago

hmmm that interesting, is there any other information i could provide to get an idea of why flowStats and openCyto are not working on my machine?

gfinak commented 8 years ago

If it crashes as it's loading gridExtra, try loading those listed packages in that order, see if it reproduces the crash.Try to isolate the issue. It's specific to your machine, so there's not much we can do.

chethanjjj commented 8 years ago

thank you Greg, that's actually something I did first when I found this issue and the individual packages loaded fine. is there anything else I could investigate?

SamGG commented 8 years ago

I am still surprised that the versions you reported are very different and old in regards to the one I got under Windows. Did you understand that? Following Greg's idea, once you loaded all the libraries successfully, I guess you load flowStats. Does it crash?

chethanjjj commented 8 years ago

no i understand. I think I do have the most up to date versions now. After I saw your versions, I went and downloaded those from Bioconductor and installed the packages from my machine, but still when I use commands ?flowStats and ?openCyto, it still says 1.0 and 1.2.8, respectively.

I tried that as well Sam, and it still crashed. I unfortunately don't think its the dependent packages, could be there be something else that can cause flowStats and openCyto to crash?

gfinak commented 8 years ago

Do you have them installed in the system or a local library directory? Could you check your .libPaths()? Could be that R is loading the system installed version rather than one in a local library directory.

Greg Finak On Jan 31, 2016 11:21 AM, "chethanjjj" notifications@github.com wrote:

no i understand. I think I do have the most up to date versions now. After I saw your versions, I went and downloaded those from Bioconductor and installed the packages from my machine, but still when I use commands ?flowStats and ?openCyto, it still says 1.0 and 1.2.8, respectively.

I tried that as well Sam, and it still crashed. Is there something else flowStats does after it loads dependents that could cause a crash?

— Reply to this email directly or view it on GitHub https://github.com/RGLab/flowStats/issues/17#issuecomment-177592720.

chethanjjj commented 8 years ago

.libPaths() points to my local library directory, and openCyto and flowStats in this directory are up to date

FlowStats: 3.28.1 OpenCyto: 1.8.4

Greg, this might not be anything, but I installed gcc49 compiler from MacPorts awhile back and that was around the time I started noticing these problems but didn't think anything of it because its just a compiler. could that be something?

mikejiang commented 8 years ago

Please post the complete output of your sessionInfo() and .iibPaths().

mikejiang commented 8 years ago

Regarding to the compiler, you can check it by running R CMD config CC abd R CMD config CXX, Bioconductor is currently using clang-600.0.57

gfinak commented 8 years ago

It certainly could, yes, particularly if R is compiled with one compiler, some packages with another, and others still with your new compiler.

From: chethanjjj notifications@github.com Reply-To: RGLab/flowStats reply@reply.github.com Date: Monday, February 1, 2016 at 10:20 AM To: RGLab/flowStats flowStats@noreply.github.com Cc: Greg Finak greg.finak@gmail.com Subject: Re: [flowStats] unable to load flowStats & openCyto (#17)

.libPaths() points to my local library directory, and openCyto and flowStats in this directory are up to date

FlowStats: 3.28.1 OpenCyto: 1.8.4

Greg, this might not be anything, but I installed gcc49 compiler from MacPorts awhile back and that was around the time I started noticing these problems but didn't think anything of it because its just a compiler. could that be something?

— Reply to this email directly or view it on GitHub.

chethanjjj commented 8 years ago

i loaded all the dependent packages for openCyto and flowStats.

sessionInfo() R version 3.2.3 (2015-12-10) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.11.2 (El Capitan)

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] splines stats graphics grDevices utils datasets methods base

other attached packages: [1] cluster_2.0.3 mvoutlier_2.0.6 sgeostat_1.0-26 fda_2.4.4
[5] Matrix_1.2-3 flowWorkspace_3.16.13 gridExtra_2.0.0 ncdfFlow_2.16.1
[9] BH_1.60.0-1 RcppArmadillo_0.6.500.4.0 flowViz_1.34.1 lattice_0.20-33
[13] flowCore_1.36.9 RMySQL_0.10.8 DBI_0.3.1

loaded via a namespace (and not attached): [1] pcaPP_1.9-60 colorspace_1.2-6 stats4_3.2.3 chron_2.3-47 RBGL_1.46.0
[6] XML_3.98-1.3 hexbin_1.27.1 Rgraphviz_2.14.0 BiocGenerics_0.16.1 RColorBrewer_1.1-2
[11] plyr_1.8.3 matrixStats_0.50.1 robustbase_0.92-5 stringr_1.0.0 zlibbioc_1.16.0
[16] munsell_0.4.2 pls_2.5-0 robCompositions_1.9.1 gtable_0.1.2 mvtnorm_1.0-4
[21] GGally_1.0.1 latticeExtra_0.6-26 Biobase_2.30.0 RUnit_0.4.31 parallel_3.2.3
[26] flowUtils_1.34.0 sROC_0.1-2 DEoptimR_1.0-4 Rcpp_0.12.3 KernSmooth_2.23-15
[31] corpcor_1.6.8 scales_0.3.0 graph_1.48.0 jsonlite_0.9.19 IDPmisc_1.1.17
[36] ggplot2_2.0.0 stringi_1.0-1 dplyr_0.4.3 grid_3.2.3 tools_3.2.3
[41] magrittr_1.5 rrcov_1.3-8 MASS_7.3-45 data.table_1.9.6 reshape_0.8.5
[46] assertthat_0.1 R6_2.1.2

.libPaths() [1] "/Library/Frameworks/R.framework/Versions/3.2/Resources/library"


Terminal:

PEDS-0JTG8WM-LT:~ jujjavarapuc$ R CMD config CC clang PEDS-0JTG8WM-LT:~ jujjavarapuc$ R CMD config CXX clang++

mikejiang commented 8 years ago

Can you do packageVersion("flowStats") and packageVersion("openCyto")?

chethanjjj commented 8 years ago

packageVersion("flowStats") [1] ‘3.28.1’ packageVersion("openCyto") [1] ‘1.8.4’

mikejiang commented 8 years ago

It's conflicting to what you've reported previously

but still when I use commands ?flowStats and ?openCyto, it still says 1.0 and 1.2.8, respectively.

SamGG commented 8 years ago

@mikejiang, 1.0 and 1.2.8 are version number that appear in the help of the packages. Look at the help page of openCyto {openCyto}. ?openCyto::openCyto @chethanjj, one option might be to restart from a fresh empty R installation, in order to install all packages with the same new compiler. But may be Greg and Mike will find a better alternative.

chethanjjj commented 8 years ago

@SamGG I tried that option, I removed R, RStudio, and /Library/Frameworks/R.framework, re-installed everything, but still loading flowStats and openCyto crashes RStudio.

SamGG commented 8 years ago

@chethanjjj I think you mean that R is crashing (and RStudio consequently). I saw that there is a gcc4.9.1 that may correct some errors of gcc4.9.0. http://www.phoronix.com/scan.php?page=news_item&px=MTc1MDQ May be you should roll back to gcc4.8.2 al though some other packages may not run. @mikejiang @gfinak if you are under Mac, what is your gcc version? Hope you will get a solution.

mikejiang commented 8 years ago

@SamGG , apparently it has nothing to do with gcc since clang is the compiler used by R.

PEDS-0JTG8WM-LT:~ jujjavarapuc$ R CMD config CC clang PEDS-0JTG8WM-LT:~ jujjavarapuc$ R CMD config CXX clang++

SamGG commented 8 years ago

Thanks Mike. I guessed MacOS is like Linux. Shame on me, I am wrong. Next time, I will stay within my Linux/Win7 knowledge. Best.

lmde:~$ R CMD config CC gcc -std=gnu99 lmde:~$ R CMD config CXX g++

chethanjjj commented 8 years ago

I think the issue is related to another package that suggests to recompile packages that are needed by flowStats and openCyto. I figured this out by again removing all packages and testing which package based on authors' installation instructions caused issues with flowStats. So openCyto and flowStats are working now.

SamGG commented 8 years ago

I am curious... Let's know which package if possible ;-)

mikejiang commented 8 years ago

@chethanjjj I don't think it is clear to me what exactly happened and what helped you fix the issue. It would helpful to other people who reads this thread if you can explain it.

chethanjjj commented 8 years ago

So here is how I figured it out.

For a program called CITRUS, it requires the user to install a new compiler gcc49 and run the following code: install.packages(c("Rcpp","RcppEigen","Rclusterpp"),type="source") which recompiles the following source packages with the new compiler, and in doing so causes flowStats and OpenCyto to crash.

However, when I run the following code: install.packages(c("Rcpp","RcppEigen","Rclusterpp")) flowStats and openCyto load properly. I believe its using the binary packages.

I repeated the process by removing the gcc49 compiler and ran the same code as the first: install.packages(c("Rcpp","RcppEigen","Rclusterpp"),type="source") it was compiled with clang++ and both flowStats and openCyto loaded fine.

chethanjjj commented 7 years ago

Hi guys,

I'm trying to solve this problem now as my team and I are closer to making our product available. What I outlined before was a temporary fix I needed to continue testing, however now I am trying to understand why this is happening.

The current situation:

Any insight would be appreciated.

mikejiang commented 7 years ago

Based on the information you provided last time, assuming you are still on mac and the R and all the packages were compiled by clang. Now you are telling R to compile Rcpp with gcc specifically, which may be the cause of crashes.
If you must use gcc, then try to build R using gcc in the first place, then you won't even need to mess with the local makefile (i.e. ~/.R/Makevars)

gfinak commented 7 years ago

I want to stress what Leo just said. He's absolutely right. You need to use the same toolchain to compile all native code. Libraries compiled with Clang will not necessarily play nicely with libraries compiled with gcc. If you are using Rclusterpp (as I saw upthread somewhere), it expects openmp support, which apple's clang doesn't have. So you may have to install clang-omp from something like homebrew, and use that toolchain to compile all r libraries. Even then it may or may not play nicely with rstudio.

Greg

Greg Finak

On Nov 12, 2016, at 9:26 AM, Mike Jiang notifications@github.com wrote:

Based on the information you provided last time, assuming you are still on mac and the R and all the packages were compiled by clang. Now you are telling R to compile Rcpp with gcc specifically, which may be the cause of crashes.

If you must use gcc, then try to build R using gcc in the first place, then you won't even need to mess with the local makefile (i.e. ~/.R/Makevars)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

chethanjjj commented 7 years ago

Understood, will implement these suggestions.

nuneznicolas commented 7 years ago

Hello guys, I'm quite new in this area. I have some problems to install openCyto. I used the following command from bioconductor:

try http:// if https:// URLs are not supported source("https://bioconductor.org/biocLite.R") biocLite("openCyto")

I have the following message:

try http:// if https:// URLs are not supported Error: unexpected symbol in "try http" source("https://bioconductor.org/biocLite.R") Bioconductor version 3.5 (BiocInstaller 1.25.3), ?biocLite for help biocLite("openCyto") BioC_mirror: https://bioconductor.org Using Bioconductor 3.5 (BiocInstaller 1.25.3), R 3.4.0 (2017-04-21). Installing package(s) 'openCyto' trying URL 'https://bioconductor.org/packages/3.5/bioc/bin/macosx/el-capitan/contrib/3.4/openCyto_1.13.5.tgz' Content type 'application/x-gzip' length 2380759 bytes (2.3 MB)

downloaded 2.3 MB

tar: Failed to set default locale

The downloaded binary packages are in /var/folders/0p/4bcdc9f94x38yp1_nhnz2tf40000gn/T//RtmpJCgGSn/downloaded_packages

Then when I'm trying to load openCyto, I have the following message:

Loading required package: flowWorkspace Loading required package: flowCore Loading required package: ncdfFlow Loading required package: RcppArmadillo Loading required package: BH Error: package or namespace load failed for 'openCyto' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called 'SparseM'

and then I cannot run the openCyto applications.. I did the same in the iMac and everything is working properly. However, I have this problem in the Macbook Pro (MAC OS Sierra, 10.12.4 (16E195), R 3.4.0 GUI 1.70 El Capitan build (7338), Rstudio Version 1.0.143 – © 2009-2016 RStudio, Inc.) I will really appreciate your help. Thanks in advance Nicolás

mikejiang commented 7 years ago

there is no package called 'SparseM'

This is telling you to install SparseM

nuneznicolas commented 7 years ago

Dear Mike, Thanks a lot for your quick answer. I could solve the problem! Best Nicolás