scverse / pytometry

Flow & mass cytometry analytics.
https://pytometry.readthedocs.io/en/latest/index.html
Apache License 2.0
41 stars 10 forks source link

Include normalizations as matplotlib scale #68

Open grst opened 2 months ago

grst commented 2 months ago

I like how CytoPy includes matplotlib scales for the different normalizations that make the axes look like in e.g. FlowJo. I.e. instead of plotting normalized values, the raw valuese are plotted, but the axis scales are adjusted accordingly: image

There are implementations for this by @burtonrj in https://github.com/burtonrj/CytoPlots/tree/main/cytoplots/transforms

@mbuttner @quentinblampey, what do you think of this approach?

mbuttner commented 2 months ago

Oh, I like those plots with rescaled axes, too. If @burtonrj agrees, I would be delighted to include them in pytometry.

burtonrj commented 2 months ago

I would be delighted to see them in pyrometry! Also happy to help contribute with getting them into the package.

Is there a consensus yet on how to handle basic transformations such as logicle and arcsinh transform. The latter is easy to do on numpy but the former will need C bindings. Might be best to just use @whitews flowutils package here but I also have a cytotransforms package that might help.

burtonrj commented 2 months ago

I think @whitews has mentioned this before, but we might also want to consider upfront if GatingML standards will be followed for 2D plots and transforms.

quentinblampey commented 2 months ago

I also like these plots! One small note: if normalization has already been performed (and raw data stored in a specific layer), then we could automatically choose the scale of the plot according to the transformation that was used. This way, we don't need to tell the type of scale that we want to use for each plot

In #65, we talked about storing the normalization parameters in adata.uns