Search
Question: flowWorkspace: Crash when using getPopStats with format="wide"
0
gravatar for Viktor Thiel
2.8 years ago by
Sweden
Viktor Thiel0 wrote:

Dear all!

I am trying to move my flow analysis to Bioconductor's flow packages, but I ran into trouble.

I can create a GatingSet object and properly apply my gating steps manually or use openCyto to do it for me, but getPopStats() with format="wide" fails spectacularly (see below for the full traceback).

Here is a reproducible example:

library(flowWorkspace)
data(GvHD)

dat <- GvHD[1:4]
gs <- GatingSet(dat)
gate <- rectangleGate(filterId="randomGate", .gate=list("FSC-H"=c(250, 500), "SSC-H"=c(200, 400)))
add(gs, gate)
getPopStats(gs, format="long") # works
getPopStats(gs, format="wide") # breaks

Actually, it breaks even when I do not add the gate at all, but call getPopStats on the empty GatingSet. Is this a problem with the package, or is it on my end only? Thank you for your ideas!

VT

> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux

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

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

other attached packages:
[1] flowWorkspace_3.16.9      gridExtra_2.0.0          
[3] ncdfFlow_2.16.0           BH_1.58.0-1              
[5] RcppArmadillo_0.6.400.2.2 flowViz_1.34.0           
[7] lattice_0.20-33           flowCore_1.36.4          

loaded via a namespace (and not attached):
 [1] pcaPP_1.9-60        Rcpp_0.12.2         DEoptimR_1.0-4     
 [4] RColorBrewer_1.1-2  flowUtils_1.34.0    tools_3.2.3        
 [7] zlibbioc_1.16.0     jsonlite_0.9.19     gtable_0.1.2       
[10] graph_1.48.0        DBI_0.3.1           Rgraphviz_2.14.0   
[13] parallel_3.2.3      mvtnorm_1.0-3       hexbin_1.27.1      
[16] stringr_1.0.0       dplyr_0.4.3         cluster_2.0.3      
[19] IDPmisc_1.1.17      stats4_3.2.3        grid_3.2.3         
[22] robustbase_0.92-5   Biobase_2.30.0      data.table_1.9.6   
[25] rrcov_1.3-8         R6_2.1.1            XML_3.98-1.3       
[28] RBGL_1.46.0         latticeExtra_0.6-26 magrittr_1.5       
[31] corpcor_1.6.8       MASS_7.3-45         BiocGenerics_0.16.1
[34] RUnit_0.4.31        assertthat_0.1      KernSmooth_2.23-15
[37] stringi_1.0-1       chron_2.3-47     

The traceback can be found at http://pastebin.com/KQWiYLQv

 
ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by Viktor Thiel0
1
gravatar for Viktor Thiel
2.8 years ago by
Sweden
Viktor Thiel0 wrote:

I got rid of the compilation error after downgrading the BH package to 1.58.0-1, which got bumped to 1.60 during an auto-update. Neither flowCore nor flowWorkspace seem to currently like this.

After recompilation, I also got rid of the segfault, so I guess that fixed itself. Thanks for your input, though!

ADD COMMENTlink written 2.8 years ago by Viktor Thiel0

The latest flowWorkspace (3.16.10) should compile with the BH 1.60 now.

ADD REPLYlink written 2.8 years ago by Jiang, Mike1.2k
0
gravatar for Jiang, Mike
2.8 years ago by
Jiang, Mike1.2k
(Private Address)
Jiang, Mike1.2k wrote:

You need to run

recompute(gs)

after any gate is added.

ADD COMMENTlink written 2.8 years ago by Jiang, Mike1.2k

And I can't reproduce your segfault. Here is what I've got if I don't recompute.

> getPopStats(gs, format="long") # works
    name Population Parent Count ParentCount
1: s5a01 randomGate   root     0        3420
2: s5a02 randomGate   root     0        3405
3: s5a03 randomGate   root     0        3435
4: s5a04 randomGate   root     0        8550
> getPopStats(gs, format="wide") # breaks
           s5a01 s5a02 s5a03 s5a04
randomGate    NA    NA    NA    NA
root           1     1     1     1

 

Apparently recompute will fix these NA values.

> recompute(gs)
....done!
> getPopStats(gs, format="long") # works
    name Population Parent Count ParentCount
1: s5a01 randomGate   root    70        3420
2: s5a02 randomGate   root    65        3405
3: s5a03 randomGate   root    34        3435
4: s5a04 randomGate   root   119        8550
> getPopStats(gs, format="wide") # breaks
                s5a01      s5a02       s5a03      s5a04
randomGate 0.02046784 0.01908957 0.009898108 0.01391813
root       1.00000000 1.00000000 1.000000000 1.00000000
ADD REPLYlink modified 2.8 years ago • written 2.8 years ago by Jiang, Mike1.2k

Thanks for the reply. I get the same error even with the recompute, but it's good to know that it's on my end. I guess I'll start looking for a faulty lib ...

ADD REPLYlink written 2.8 years ago by Viktor Thiel0

I've tried building flowWorkspace from scratch in an empty library and now fail at this step.

boost_serialization/basic_archive.cpp:44:20: error: expected unqualified-id before ‘const’
 BOOST_ARCHIVE_DECL(const char *)
                    ^
boost_serialization/basic_archive.cpp:44:20: error: expected ‘)’ before ‘const’
boost_serialization/basic_archive.cpp:78:1: error: expected constructor, destructor, or type conversion before ‘BOOST_ARCHIVE_VERSION’
 BOOST_ARCHIVE_VERSION(){
 ^
/usr/lib64/R/etc/Makeconf:143: recipe for target 'boost_serialization/basic_archive.o' failed
make: *** [boost_serialization/basic_archive.o] Error 1
ERROR: compilation failed for package ‘flowWorkspace’

 

I have boost installed on my system, if it matters.

local/boost 1.60.0-1
    Free peer-reviewed portable C++ source libraries - development headers
local/boost-libs 1.60.0-1
    Free peer-reviewed portable C++ source libraries - runtime libraries

 

Can you potentially make anything out of these messages?

Edit: The complete build log, in case it's of interest. http://pastebin.com/F0eJzGje

ADD REPLYlink modified 2.8 years ago • written 2.8 years ago by Viktor Thiel0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 167 users visited in the last hour