RGLab / flowWorkspace

flowWorkspace
GNU Affero General Public License v3.0
45 stars 21 forks source link

RStudio crashes #355

Closed baj12 closed 3 years ago

baj12 commented 3 years ago

Here is a minimal example:

library(flowWorkspace)

g1 = load_gs("sampleGS")
population = "grp.0.4&:Lymphocytes:SC:SC1:SC1.other"

gh_pop_get_data(g1, population)

This results for me in the following screen shot:

image

I could share the example (47 MB), Just let me know where to send it (it is sensitive).

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.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/4.0/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   base     

other attached packages:
[1] flowWorkspace_4.2.0

loaded via a namespace (and not attached):
 [1] tidyselect_1.1.0    xfun_0.20           purrr_0.3.4         lattice_0.20-41    
 [5] colorspace_2.0-0    vctrs_0.3.6         generics_0.1.0      htmltools_0.5.1.1  
 [9] stats4_4.0.3        ncdfFlow_2.36.0     yaml_2.2.1          base64enc_0.1-3    
[13] XML_3.99-0.5        flowCore_2.2.0      rlang_0.4.10        pillar_1.4.7       
[17] glue_1.4.2          DBI_1.1.1           aws.s3_0.3.21       Rgraphviz_2.34.0   
[21] BiocGenerics_0.36.0 RColorBrewer_1.1-2  calibrate_1.7.7     jpeg_0.1-8.1       
[25] matrixStats_0.57.0  lifecycle_0.2.0     stringr_1.4.0       zlibbioc_1.36.0    
[29] RProtoBufLib_2.2.0  munsell_0.5.0       cytolib_2.2.1       htmlwidgets_1.5.3  
[33] evaluate_0.14       latticeExtra_0.6-29 Biobase_2.50.0      knitr_1.30         
[37] parallel_4.0.3      curl_4.3            Rcpp_1.0.6          scales_1.1.1       
[41] DT_0.17             S4Vectors_0.28.1    RcppParallel_5.0.2  graph_1.68.0       
[45] png_0.1-7           digest_0.6.27       stringi_1.5.3       dplyr_1.0.3        
[49] grid_4.0.3          tools_4.0.3         magrittr_2.0.1      tibble_3.0.5       
[53] crayon_1.3.4        aws.signature_0.6.0 pkgconfig_2.0.3     MASS_7.3-53        
[57] ellipsis_0.3.1      data.table_1.13.6   xml2_1.3.2          assertthat_0.2.1   
[61] rmarkdown_2.6       httr_1.4.2          rstudioapi_0.13     R6_2.5.0           
[65] compiler_4.0.3     
> 
baj12 commented 3 years ago

When running it directly in R (without RStudio) I get the following error message:

> gh_pop_get_data(g1, population)
Erreur : pile C d'ebord'ee vers le haut

which translates to

C stack upwards

using google translate...

baj12 commented 3 years ago

updated to flowWorkspace 4.3.5 and still get the crash.

mikejiang commented 3 years ago

please send the data link to mike@ozette.ai

mikejiang commented 3 years ago
gs = load_gs("~/Downloads/sampleGS")
> nodes <- gs_get_pop_paths(gs)
> pop <- nodes[184]
> pop
[1] "/Lymphocytes/SC/SC1/FSOMInput/grp.0.1&:Lymphocytes:SC:SC1:FSOMInput"
> gh <- gs[[1]]
> gh_pop_is_gated(gh, pop)
[1] FALSE

So that pop isn't gated. But still, the crashing shouldn't happen, it is a bug and I will fix it. For now, the workaround is to run

recompute(gs)

after gs is loaded, then you should be able to grab the gated data

> d = gh_pop_get_data(gh, pop)
baj12 commented 3 years ago

Dear Mike, thank you!!! That works, though I cannot save using save_gs(). I.e. saving doesn't produce an error, but after loading it again, I still don't have gated populations. But at least I can continue my work ;)

Thanks B

mikejiang commented 3 years ago

With the latest fix from RGLlab/cytolib, you shouldn't need to run recompute each time when you load_gs. You will need to pull and rebuild both cytolib and flowWorkspace.