RGLab / CytoML

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

choose the right scale value from diva xml #58

Closed mikejiang closed 5 years ago

mikejiang commented 5 years ago

scale value is the critical parameter used to control the linear width for biexp transformation. It is currently stored in various places of diva xml and often time they don't agree with one another, so it is important to choose the right version of its value. Here are the 5 different locations where you can parse the scale_value from the same xml

However It's not clear which one is actually used by diva. Technically speaking, the same channel can be potentially scaled differently in different gates/plots since diva doesn't scale the data until it is displayed. So gate-specific scale value makes sense and we used it by default and didn't see any issues until the parser failed on a use case recently. By switching to tube level scale value (with a hidden option scale_level = "tube"), the issue resolved. This prompt me to change the default to tube level ( this hidden option is the product of uncertainty behavior of the diva parser and not intended to be used by users). So far, tube-level scaling passes all the existing tests and we are yet to see if there will be a gate-level scaling use case in future(I haven't been able to produce one with diva software so far)