whitews / FlowKit

A Python toolkit for flow cytometry analysis supporting GatingML and FlowJo workspaces
https://flowkit.readthedocs.io
BSD 3-Clause "New" or "Revised" License
158 stars 39 forks source link

Workspace not loading Boolean gates #179

Closed ldrufuca closed 1 month ago

ldrufuca commented 11 months ago

Hi, thanks for the very useful package!

I recently encountered an unexpected behavior while loading a workspace instance. In particular it appears that the gating hierarchy tree is incompletely loaded. As a comment to the workspace loading routine I found the following note:

# Incomplete group tree: The collection of group gates is not # guaranteed to have the complete gate tree. This occurs if all # samples have a custom gate for a particular gate tree node.

but as I went back to flowjo it appears that while some samples have 'custom' gates, most of them share the same gating hierarchy as defined for the group with no modifications.

Incidentally I realized that the missing gating subtree starts with a 'NOT' boolean gate and it is the only boolean gate in the hierarchy though I do not know whether the two facts are related.

Could someone help me understanding what is happening?

whitews commented 7 months ago

Hi & apologies for the late response!

Would you be able to share the workspace (can be privately via email)? Or, even better, would be to attempt to replicate the issue using the 8-color data set in data/8_color_data_set.

Regards, Scott

whitews commented 7 months ago

OK, I created a workspace file incorporating the Boolean NOT gate and can confirm they do not get imported. These gates are implemented very differently in the XML structure and it'll take a bit to properly support them. Unfortunately, this won't make it in the upcoming 1.1 release but I'll get to it in the next one and keep this open in the meantime. Thanks for reporting this!

whitews commented 1 month ago

Boolean gates are now supported when loading FlowJo workspaces. This is in the develop branch and will be included in the upcoming 1.2.0 release.