Currently, we don't have a spatial metric that describes how spread out cells are in an image. The goal of this metric would be to summarize whether a given cell population tends to be concentrated or dispersed.
The simplest way to calculate this is to divide each image up into a grid, and look within each tile of the grid to see how many cells are present. We then set a threshold for how many cells need to be in a tile for it to be marked as positive, then count the number of tiles that are positive.
For this approach, we should play around with the tile size and threshold for positivity in each tile to see how it impacts the results. Create summary plots showing the distribution of the score across the cohort, look at images on either end of the spectrum to make sure the score is capturing the visual impact in the image, and see how all of that changes as the two parameters above are varied.
After deciding on a single threshold for raw counts across specific cell types, next play around with normalized cell counts. This is important because this can allow for the selection of a specific threshold across all cell types, as opposed to a specific threshold for each cell type. Normalization can be done:
Per image
Across the cohort
The different normalization techniques to try are:
Raw z-score
Mean centering
A slightly more complex way would be to look at the actual distribution of cell counts across the tiles, rather than a binary yes/no. If the binary assignment seems to be doing a good job of capturing the relevant dynamics, we can skip this one, but if it doesn't do a great job, we should try this.
Some options would be looking at the entropy in cell counts across the tiles, either calculated in a spatially agnostic way, or taking into account neighboring tiles to produce a more holistic metric of the distribution of cells.
Look into RQI
Potentially interesting spatial metric that broadly captures differences in abundance and organization of cell types. Should dig in and see if it's useful, provides new information, etc. If so, can consider adding https://pubmed.ncbi.nlm.nih.gov/35649657/