RGLab / flowWorkspace

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

Unable to parse FCS files within the workspace #334

Closed ppremraj-zs closed 4 years ago

ppremraj-zs commented 4 years ago

Hello,

I am trying to parse the fcs files within a flowjo workspace. I am getting the following error. Can you please guide me how to solve this

gs <- flowjo_to_gatingset(ws, name=1, isNcdf=FALSE)

Parsing 1 samples windows version of flowJo workspace recognized. version X Creating flowSet... loading data: /home/ppremraj/projects/cell-bio-flow-autogate/Specimen_002_D1_D01_030.fcs Compensating gating ... Error in .cpp_gating(gs@pointer, mat, guid, gains, nodeInd, recompute, : try to extend the coordinates for ellipse gate! In addition: Warning message: In .parse.pData(obj = obj, keywords = keywords, sg = sg, keywords.source = keywords.source, : Can't find the FCS files for the following samples:

gfinak commented 4 years ago

The error indicates that the gating scheme in the workspace has an ellipse gate whose coordinates cross 0, and is likely truncated in the workspace. flowJo to gatingset tries to deal with this by extending the coordinates of gates truncated on the boundary by extending them in the negative direction in order capture all the cells they are intended to capture. Except this doesn't work for ellipse gates and you get this error. Your can disable this by setting the extend_val argument to flowjo_to_gatingset to a large negative value (try -1000). This is the threshold at which the method will try to extend gates on the boundary, effectively disabling the behavior. But then you will have there issue with other rectangle gates that if they're truncated on the boundary they will not capture all the intended cells. To be clear, this is an issue with flowJo export to XML.

ppremraj-zs commented 4 years ago

Thank you so much, after setting extend_val = -14000 it worked.

mikejiang commented 4 years ago

With latest patch from cytolib RGLab/cytolib@88b3887118b628766517d7427fe370a189dc500e changing extend_val shouldn't be needed for parsing ellipsoidGate properly.