scverse / pytometry

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

Population expression plot #67

Open grst opened 5 months ago

grst commented 5 months ago

I really like @quentinblampey's visualzation from scyan and suggest adding it to pytometry. I don't think it would necessarily require a scyan model, would it?

scyan.plot.pop_expressions(model, "Monocytes")

image

quentinblampey commented 5 months ago

Having a Scyan model is quite important because it brings everything to the same scale in the latent space (neg = -1, and pos = 1) Without it, we would need to define what "pos" means, which can be tricky using only normalization, because we don't have specific values for positivity. Maybe we can adapt it slightly?

When we find a good solution, I will add it to pytometry!

quentinblampey commented 5 months ago

I think the best alternative for this plot would be to use cumulative distribution functions For each marker, the bottom would represent 0, and the top would represent the maximum value for this specific marker. Then, each value is displayed according to the empirical cumulative distribution function of the corresponding marker (evaluated at this specific value). That is, the median value of the marker X is in the middle.