Spatial point processes (MIT Statistical Models): A collection of typed cell positions is a marked spatial point process. The fundamental question is whether the marks (cell types) are spatially independent of each other — does knowing a cell's position tell you anything about what type it is? The Poisson null model assumes positions and marks are independent. Phenotype Interactions tests this null hypothesis using observed cross-type pair counts versus expected counts under the null.
The K-function framework (Ripley): Ripley's K-function K(r) counts the expected number of points within distance r of a typical point, normalized by overall density. When K(r) exceeds the Poisson expectation (πr²), points are clustered at scale r. When K(r) is less, points are dispersed. The cross-type variant K_ij(r) measures the spatial association between types i and j. Phenotype Interactions implements variants of this framework to quantify pairwise spatial associations.
Statistical significance testing (Dilbilir): Simply observing that two cell types are near each other doesn't prove interaction — it could be chance. Statistical methods compare the observed spatial pattern to a null distribution generated by Monte Carlo simulation (randomly permuting cell type labels many times). The observed interaction is significant only if it falls outside the central 95% of the null distribution. This controls for confounding factors like uneven cell density and non-uniform tissue geometry.
Biological interpretation: Attraction between CD8+ T cells and tumor cells suggests active immune recognition and effector function. Repulsion might indicate immune exclusion mechanisms (PD-L1 expression, physical barriers, immunosuppressive cytokines). These spatial patterns carry prognostic and predictive information — immunotherapy works better in immune-inflamed tumors (attraction) than immune-excluded tumors (repulsion).
Spatial point process statistics test whether cell types co-locate by choice or chance. The null hypothesis is that cell types are randomly distributed — knowing a cell's position tells you nothing about its type. When two types are found together significantly more than random chance, that's evidence of biological interaction. Significance testing (comparing observed patterns to thousands of random rearrangements) ensures you don't mistake chance clustering for real biology.