RGLab / CytoML

A GatingML Interface for Cross Platform Cytometry Data Sharing
GNU Affero General Public License v3.0
29 stars 14 forks source link

Boolean NOT Gate Issue in FlowJo .wsp #120

Open alexheubeck opened 3 years ago

alexheubeck commented 3 years ago

Hi @gfinak and @mikejiang,

I'm using CytoML to export a FlowJo file from a gating set generated with openCyto. The gating set includes a few boolean NOT gates. When I open the .wsp file, the NOT gates are there, and have values in the Stats and Counts columns, like this:

Screen Shot 2020-11-11 at 3 20 05 PM

However, as soon as I click on the gate to open the plot window, the stats display "-", like this:

Screen Shot 2020-11-11 at 3 20 28 PM

And the plot window that comes up looks like this:

Screen Shot 2020-11-11 at 3 20 35 PM

This hasn't happened when I drop the same file into a new FlowJo workspace and create a NOT gate from within the software. It only seems to happen with workspaces created with CytoML.

Please let me know if you have any insight into fixing this issue. I also reached out to FlowJo to see if they can diagnose what is up with the .wsp file, but I'm still waiting to hear back. I can also provide a .wsp file if necessary.

Best,

Alex

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

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

other attached packages:
 [1] knitr_1.30               dplyr_1.0.2              tidyr_1.1.2              tibble_3.0.4            
 [5] gridExtra_2.3            colorRamps_2.3           scales_1.1.1             cytolib_2.3.0           
 [9] CytoML_2.1.14            data.table_1.13.2        flowDensity_1.23.0       ggcyto_1.19.0           
[13] ggplot2_3.3.2            ncdfFlow_2.37.0          BH_1.72.0-3              RcppArmadillo_0.10.1.0.0
[17] flowCore_2.1.4           flowWorkspace_4.3.0      openCyto_2.3.0
mikejiang commented 3 years ago

I will look into it.

alexheubeck commented 3 years ago

@mikejiang

This is what I got back from FlowJo:

It seems like the “Not” gate saved in that workspace is lacking the reference gate coordinate information, which should look as follows:

  <Gate gating:id="ID1976806565"  gating:parent_id="ID677617047" >
    <gating:PolygonGate eventsInside="1"  annoOffsetX="0"  annoOffsetY="0"  tint="#000000"  isTinted="0"  lineWeight="Normal"  userDefined="1"  quadId="-1"  gateResolution="256" >
      <gating:dimension>
        <data-type:fcs-dimension data-type:name="Comp-BV711-A" />
      </gating:dimension>
      <gating:dimension>
        <data-type:fcs-dimension data-type:name="Comp-BV421-A" />
      </gating:dimension>
      <gating:vertex>
        <gating:coordinate data-type:value="4640.13549" />
        <gating:coordinate data-type:value="3635.53063" />
      </gating:vertex>
      <gating:vertex>
        <gating:coordinate data-type:value="-5047.82677" />
        <gating:coordinate data-type:value="3635.53063" />
      </gating:vertex>
      <gating:vertex>
        <gating:coordinate data-type:value="-5047.82677" />
        <gating:coordinate data-type:value="689729.60365" />
      </gating:vertex>
      <gating:vertex>
        <gating:coordinate data-type:value="13675.38501" />
        <gating:coordinate data-type:value="689729.60365" />
      </gating:vertex>
      <gating:vertex>
        <gating:coordinate data-type:value="13675.38501" />
        <gating:coordinate data-type:value="11030.13295" />
      </gating:vertex>
      <gating:vertex>
        <gating:coordinate data-type:value="4640.13549" />
        <gating:coordinate data-type:value="3635.53063" />
      </gating:vertex>
    </gating:PolygonGate>
  </Gate>
mikejiang commented 3 years ago

Yeah, reference gate info is redundant therefore I didn't put there, which seems to be fine with FlowJo 10.7.1, what is your flowJo version?

alexheubeck commented 3 years ago

I'm using 10.7.1 on Mac. My collaborators use Windows and FlowJo 10.7.1, and saw the same issue with CytoML generated .wsp files.

mikejiang commented 3 years ago

Strange, I can't seem to reproduce this issue, looks like we need your minimum reproducible example 1502231680850 remmina-2020-11-13-4:6:24 333046

alexheubeck commented 3 years ago

I attached a minimum reproducible example. This file was gated with openCyto, and the .wsp was generated with CytoML. I confirmed the attached .wsp has the same issue on my machine.

test.zip

mikejiang commented 3 years ago

I can reproducible with your file. Bu as I expected, the reference gate itself doesn't seem to be the cause since merely adding the reference gate doesn't fix the issue. I will have to further troubleshoot it.

mikejiang commented 3 years ago

Turns out FlowJo now expectes the full path for Dependent/reference, (used to be relative path) image pull the rglab/gs-to-flowjo either (2.2 or devel tag), and let me know if it works for you

alexheubeck commented 3 years ago

Hey @mikejiang,

That fix works, thanks so much! Just fyi, I'm getting the warning that the docker image is built with cytolib 2.2.0 instead of 2.3.0, not sure if that was intentional.

Thanks,

Alex

mikejiang commented 3 years ago

The version check warning is for precaution. Probably doesn't matter for now since cytolib 2.2 doesn't differ from 2.3 too much at this point. But if you pull rglab/gs-to-flowjo:devel, the warning should be gone since it seems you are using devel/github master branch of cytolib