Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stats display issue for open-ended rectangleGate in Cytobank #28

Open
mikejiang opened this issue Dec 1, 2017 · 1 comment
Open

stats display issue for open-ended rectangleGate in Cytobank #28

mikejiang opened this issue Dec 1, 2017 · 1 comment

Comments

@mikejiang
Copy link
Member

The issue is reported by @cjungR in #25 (comment)
CytoML writes the scale info for this gate in json definition

{"scale":{
"x":{"flag":4,"argument":"5","min":-5,"max":12000,"bins":256,"size":256},
"y":{"flag":4,"argument":"5","min":-5,"max":12000,"bins":256,"size":256}
}}

The label field that defines the stats position in the plot is optional and thus is currently omitted and has working fine for all close-ended gates until we encountered this gate generated by openCyto as open-ended rectangleGate to capture the cells in UR quadrant.

In ggcyto, we superseded the gate range with data range when the open-ended situation occurs, here is the code https://github.com/RGLab/ggcyto/blob/trunk/R/stat_position.R#L76-L79

The solution is either Cytobank needs to fix it or CytoML has to explicitly provide the label info in json.
However, it is not clear how the label coordinates are scaled. Here is the manual gate drawn and output from cytobank
image

{"scale":{
"x":{"flag":4,"argument":"5","min":-5,"max":12000,"bins":256,"size":256},
"y":{"flag":4,"argument":"5","min":-5,"max":12000,"bins":256,"size":256},
"label":[5.571834733508659,7.968586637265983]
}}

And it seems to be different from the data scale.

@tjburns08
Copy link

In trying to reproduce the issue, I am only getting NA values for statistics. This happens only when I gate on non-linear markers (eg CD33 etc). Statistics import fine with scatter. Below is an example with closed point gates.

screen shot 2017-12-12 at 8 14 44 am

With quad gates, statistics appear on the bottom left corner on top of each other.

screen shot 2017-12-12 at 8 19 22 am

Notice the plots for CD33 x CD20 appear uncompensated. I have seen this before and I have reason to believe it is a Cytobank specific bug (@katdrake you've seen this before). I'm going to have some people look at it on my end and once it's fixed I'll hopefully be able to reproduce and look into the problem with the upper right quad gate, and determine if the "bottom left corner" problem shown here is consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants