Percentages and Density

I’m my Multiplex IF analysis on QuPath (M9), there are some complex phenotypes (ie, CD4/FOXP3/PD1). It works perfectly.
I’m trying to get the cell % and cell densities from each sub-class using the script posted: Class cell counts, percentages and density to parent annotation M5.groovy
Unfortunately, I am getting only the % and densities from the main classes. The densities of the sub-classes (complex phenotypes) are not being calculated. How can I get the results from every class and sub-class found? Many thanks.

1 Like

Can you calculate this afterwards (e.g. in a spreadsheet) using the data that is available? Or have I misunderstood?

Since there could in principle be a lot of distinct classifications representing complex phenotypes using the m9 approach to analysis, I’m not sure how many measurements really should be computed automatically to avoid ending up with an unmanageably large measurement table. It will likely take a bit more thought to figure out how to summarize this kind of data within the software, and how much should be done elsewhere after export.

2 Likes

Quick script update to make that work in M9. For now. I think!

As Pete mentioned, if you have a lot of sub-classes or base classes, the measurement table gets ridiculously large and hard to sort through, and some classes may be entirely missing within a given image or slide. I am not sure of an easy way to collect all existing combinations of classes throughout an entire project at this time, though I am pretty sure it would be possible. As it is, you may end up with some samples where an annotation measurement for a given set of classes does not even exist (rather than showing up as zero).