Abstract
Imaging technologies have revolutionized the study of the tumor microenvironment (TME) by leveraging spatial analysis, which enables the exploration of tissue organization and cellular communication, as well as aiding cancer diagnosis and prognosis. However, while many advanced spatial analysis methods have been recently published, they are enmeshed with specific imaging technology. An opportunity exists to develop a technology-agnostic methodology that captures complex spatial patterns in the TME as phenotypes to use in downstream tasks. In this paper, we present a novel variation of spatial g-function and a comprehensive imaging-technology-agnostic framework that identifies rich spatial phenotypes that can be used in survival analysis and classification tasks. Applying our methodology to breast cancer, we uncover spatial phenotypes with significance to survival across racial groups and molecular subtypes of breast cancer. We find other phenotypes that are significant to the survival of specific patient categories (such as African American). We also demonstrate that our phenotypes reflect specific biological contexts. These results highlight the relevance of our proposed spatial analysis and phenotype discovery pipeline and demonstrate the benefits of the systematic exploration of spatial phenotypes for more personalized diagnosis and treatments.
Keywords: Spatial Statistics, Survival Analysis, Spatial Phenotype, Cancer
CCS CONCEPTS: Applied computing → Health informatics, Computational proteomics, Imaging
1. INTRODUCTION
The tumor microenvironment (TME) is a complex biological system. Even though it has been the focus of study for many years [7, 33], we only seem to be scratching the surface. Advanced multi-omics data enable these studies. For example, one popular high-dimensional modality is multiplex immunofluorescence (mIF) which can capture high-dimensional protein biomarker expressions in the same tissue section [29]. Other modalities that capture protein expressions include multiplex immunohistochemistry (mIHC) [29], multiplexed ion beam imaging (MIBI) [23], and co-detection by indexing (CODEX) [11]. Additionally, cytometry information can be recorded with image mass cytometry (IMC) [4], while spatial transcriptomics [8] and single-cell RNA sequencing (scRNA-Seq) [17] capture genomic signatures. These imaging technologies have revolutionized the study of the immune microenvironment, especially in cancer, revealing the immense complexity of the immune system linked with prognosis and response to immune checkpoint inhibitors in several solid tumors. For instance, Rakaee et al. [24] used mIHC to explore the clinical significance of M1 and M2 macrophage markers on non-small cell cancer.
Spatial analysis is widely used to fuel the investigation of the above-mentioned imaging technologies. It enables a systematic understanding of tissue organization and cellular communication in spatial biology [9, 12, 13, 16, 21, 32, 34]. Specifically, the TMEs and their spatial organization play a vital role in cancer diagnosis and prognosis. For example, tumor-infiltrating lymphocytes are associated with improved control of tumor growth and prognosis. But immune cells distal to the tumor area and forming tertiary lymphoid structures are linked to response to immune checkpoint inhibitors [9]. In contrast, immune-excluded tumors forming an ‘immune ring’ are less likely to show an association with response to immune checkpoint inhibitors [9]. In such cases, spatial analysis proves highly beneficial. Additionally, spatial analysis has been employed to characterize the evolution of islets and their immune neighborhood during type I diabetes progression [6] and to understand the structure and immunoregulation in tuberculosis granulomas [20]. The range of applications is set to increase as spatial analysis toolkits and methods [9, 21, 32, 34] become more accessible.
However, while there are many spatial analysis frameworks, toolkits, and methods, they are currently limited by focusing on one particular aspect of spatial analysis. To date, most method development efforts have focused on extracting information from raw microscopy images through cell segmentation and cell phenotyping. Once these have been captured, few methods are dominantly used to quantify the spatial distributions. These methods mostly utilize simple analysis techniques, such as distances between pairs of cells or biomarkers [7]. Furthermore, these methods often rely on ad hoc thresholds, significant user input, and focus on simple dominant patterns [9]. As a result, they fail to capture the diversity and complexity of the spatial patterns present and thus cannot utilize the power of spatial analysis to address the complex biological questions. Most significantly, computational tools for tissue spatial data analysis are generally tailored to specific imaging techniques. They mostly focus on the infrastructure for spatial data, which often translates as being most suited for users with significant computational ability [9]. Last but not least, the majority of the state-of-the-art (SOTA) do not explore survival analysis to correlate patient outcomes with features generated from spatial analysis.
Motivated by the shortcomings of the SOTA, we set out to develop new, fine-grained spatial phenotypes based on imaging-technology-agnostic workflow. We present the first systematic exploration of spatial statistics g-function [28] and its application to a study of TMEs. We propose spatial context-based phenotype identification leveraging the g-function which generates statistically significant features of a TME via unsupervised clustering. These new spatial phenotypes can be used in survival analysis and classification tasks.
We apply our methodology to breast cancer, a heterogeneous disease with various molecular subtypes of diagnostic and prognostic significance. To properly diagnose, manage, and treat breast cancer we need to rely on the accurate identification of biomarkers and characterize their complex relationships [26]. We explore and characterize spatial phenotypes with significance to survival across racial groups and molecular subtypes of breast cancer. We find other phenotypes that are significant to the survival of specific patient categories (such as African American). We explored a wide range of spatial information encoded in the cell type distributions in breast cancer TMEs and visually demonstrated that our phenotypes capture these spatial relationships.
The main contributions of this paper are:
Imaging-technology-agnostic spatial analysis: We base our analysis on 2D coordinates and biomarker labels from point cloud data.
New methodology for analysis with complex spatial phenotypes: We combine a novel use of a spatial statistics gfunction with unsupervised clustering to create new spatial phenotypes that can be used for downstream tasks.
Fine-grained spatial phenotypes uncover survival differences and biological context: We demonstrate how these spatial phenotypes uncover survival differences in breast cancer patients, specifically in the underrepresented African American (AA) population. Meanwhile, phenotype-colored cells demonstrate coherent patterns that capture the spatial context of TME images.
1.1. Prior Work
Biological tissues contain complex and dynamic cellular ecosystems [22]. Many different tools and methods model these cellular ecosystems and mine clinically relevant features important for diagnosis and prognosis. They include various spatial statistics toolkits [9, 21, 32, 34], graph-based analyses [15, 22, 27], and community-based analyses [19, 35, 36]. Despite the diversity of advanced spatial analysis techniques, they are not directly comparable with our methodology due to different goals and evaluation techniques. We present an imaging-technology-agnostic data-centric approach for spatial analysis, intending to find new, previously unexplored patterns. Here, we provide an overview of SOTA for related works.
Toolkits for spatial analysis offer extensive analysis and simulation capabilities to understand spatial patterns. They also provide platforms to manage and analyze large data sets such as spatial proteomics and spatial transcriptomics. These toolkits enable comprehensive exploration of cellular and tissue environments, each contributing unique features to the field of spatial analysis. While existing tools facilitate various spatial analysis techniques, they primarily focus on the methods themselves. In contrast, our approach delves into the data to extract meaningful insights. Additionally, most tools do not attempt to correlate spatial analysis with survival and patient outcomes. Feng et al. [9]’s SPIAT toolkit characterizes spatial patterns of cells with multiple co-localization, neighborhood, and spatial heterogeneity metrics. This work mostly focuses on spatial proteomics technologies. SODB, introduced by Yuan et al. [34], is a web-based data management platform with some interactive spatial analysis toolkits, focusing on the spatial omics data. SCANPY [32] is a popular toolkit that focuses on the fast and efficient processing of spatial transcriptomics single-cell gene expression data. The toolkit contains methods for preprocessing, visualization, clustering, pseudotime and trajectory inference, differential expression testing, and simulation of gene regulatory networks. SCANPY performs basic spatial analysis, whereas SQUIDPY introduced by Palla et al. [21] is a toolkit performing more advanced spatial analysis. Like SCANPY, SQUIDPY mostly focuses on memory-efficient and large-scale analysis of spatial omics data.
Spatial graph-based methods presented below work on spot-level gene expression data from spatial transcriptomics, focusing on the characterization of gene expression patterns and interactions. Our data, with single-cell locations and labels from spatial proteomics, presents a problem with different resolution and analysis goals. One popular graph method is SpaGCN from Hu et al. [15], a graph convolutional neural network. It combines multi-modal data such as gene expression, spatial location, and histology images to find spatial patterns. SpaGCN’s primary focus is to detect spatial variability in gene expression through the effective use of multiple dimensions. Another spatial graph-based method, stLearn developed by Pham et al. [22] introduces pseuodo-time-space (PSTS) to model relationships between cells across tissue undergoing dynamic change, such as cancer progression. They also developed a spatial graph-based imputation method with neural networks to increase spot coverage in ST data. With a focus on predicting the spatial composition of cells from synthetic spatial transcriptomics data, Song and Su [27] tries to deconvolute each spot into the cell composition maintaining spatial configuration by applying a graph-based convolutional network on gene expressions.
Like graph methods, community or clustering-based spatial analysis also works on spot-level spatial transcriptomics data, with different research goals. One of the community-based methods, cytoNet [19], quantifies complex cell communities by leveraging spatial topology and functional relationships on individual cell phenotypes. The authors demonstrate cytoNet on use cases such as characterizing neural progenitor dynamics. BayesSpace [35] uses the Bayesian approach for spatial clustering by imposing a prior that gives higher weight to physically close spots in spatial transcriptomic data, using it to resolve undetectable tissue structure and identify transcriptional heterogeneity. Another work (Zhu et al. [36]) utilized the hidden Markov random field model for clustering low-resolution in situ hybridization data into distinct spatial domains by jointly modeling gene expression and spatial neighborhood structure.
Switching topics, the application of phenotypic analysis is well established in digital pathology literature, specifically in the identification of cancerous cells and grading of tumors based on phenotypic characteristics. It can help uncover disease mechanisms by correlating phenotypic traits with genetic and molecular data. Phenotype analysis can help tailor treatments for more targeted and effective therapies [14, 18]. MIHC, MIBI, CODEX, and IMC modalities try to capture different phenotypes from markers directly [2]. To obtain more complex phenotypes, researchers combine different types of data such as genomic, transcriptomic, proteomic, and spatial information [10]. To our knowledge, our proposed approach of identifying phenotypes using clustering on the spatial context of markers has not been explored before.
2. DATA
In this work, we use point cloud data, in the form of 2D coordinates of cells labeled based on the biomarkers they express. This allows our proposed pipeline to be imaging-technology agnostic. We obtained the point cloud of tissue microarray (TMA) data from a large breast cancer study [26], which used a commercial software package (HALO, Indica Labs) to detect and classify different markers. Fig. 1 shows the point cloud of one of the TMA samples from our dataset. In our point cloud dataset, we have four primary biomarkers: Stroma, Tumor, CD8, and CD68. The dataset consists of 538 patient samples. The racial breakdown is 284 Caucasians and 254 African Americans. For the molecular subtypes of breast cancer, the population contains 215 LumA, 130 LumB, 145 TNBC, and 48 Her2 patients. The median follow-up and the median survival for patients are 8.5 and 6.67 years, respectively [26].
Figure 1: Point cloud data for one of the Tissue Microarray (TMA) samples. We visualize 4 biomarkers: Stroma (blue), Tumor (red), cd8 (yellow), and cd68 (green).

Table 1 shows the statistics of the counts of different cell types. The distribution of different cell types across cases shows high variability, as indicated by the large standard deviations relative to the mean values ; with varying between and . The table indicates that stroma and tumor cell counts have the highest absolute standard deviation, while CD8 has the highest relative standard deviation compared to the corresponding mean.
Table 1:
Distribution Statistics of Biomarkers
| Marker | Count across all the cases |
|---|---|
|
| |
| Stroma | 1998.31 ± 1410.27 |
| Tumor | 2183.18 ± 1558.70 |
| CD8 | 307.46 ± 777.88 |
| CD68 | 609.12 ± 837.31 |
3. METHODS
We introduce a novel method to discover significant spatial phenotypes that are impactful for patient outcomes. Our technique comprises a spatial statistics function, unsupervised clustering, and survival analysis. To explore and represent the spatial relationships in the TME, we developed a novel version of the g-function as a spatial statistics function. After representing these spatial relationships, we identify spatial phenotypes having similar spatial contexts with an unsupervised clustering technique (K-means). Finally, we perform survival analysis (Kaplan-Meier) to observe whether these identified phenotypes have a significant correlation with patient outcomes. A detailed description of our technique is presented in the following subsections.
3.1. g-function
In this subsection, we present technical details of our implementation of the g-function, which we use to acquire the spatial distribution statistics. Stoyan and Stoyan [28] first introduced the standard pair correlation function (PCF) / radial distribution function [31] / gfunction [30]. The g-function is the derivative of one of the popular standard spatial statistics functions Ripley’s K-function [25].
We explain our implementation of g-function using conceptual Fig. 2. The field of view in the figure contains four types of biomarkers, which are tumor (red), stroma (blue), cd8 (yellow), and cd68 (green). For our calculation, we consider one of the markers as the source: (we focus on tumor in Fig. 2), and another as the target: (cd8 in Fig. 2).
Figure 2: Conceptual Diagram of un-normalized g-function calculation. We designate one of the biomarkers as the source (tumor here) and another as the target (cd8 here). For each source cell, for each distance zone, we calculate the raw count of the target biomarker cells.

We create an increasing set of concentric circles centered on any source marker . The distance between each pair of adjacent circles is a constant which we call step window. We define the space between each pair of adjacent circles as a distance zone or . In Fig. 2, we show the distance zones for a step window of . The total number of distance zones is denoted with . Within each distance zone, we calculate the frequency of the target, , denoted as . We also denote the total frequency of any source marker as . We denote the area of any distance zone for a cell of source type as . Eqn. 1 shows the calculation of .
| (1) |
Using the target marker frequency within the distance zones and the distance zone areas, we represent the source-target marker spatial context for a given step window, which we denote as a g-function vector (gv). A conceptual illustration of gv for tumor biomarker as source marker to cd8 biomarker as target marker is shown in Fig. 3. The calculation of the g-function vector (gv) for any source marker and any target marker within Kth distance zone is expressed by Eqn. 2.
Figure 3: Conceptual visualization of the process to identify spatial context phenotypes through clustering for k=2. (A) shows all the source markers with their corresponding g-function vectors which are being clustered based on the similarities of the values. Cluster 1 is visualized with violet color and cluster 2 with orange color. (B) is a conceptual figure of the result of the spatial phenotype-identification process. It shows all the tumor biomarkers partitioned into two spatial phenotypes.

| (2) |
Thus, we obtain a gv for every patient sample, source-target, and step window spatial context for every source cell. Each gv is a vector of distance zone-specific values per source cell.
Our implementation of the g-function is quite different from the standard g-function and K-function. The K-function is cumulative, measuring the expected number of points within distance / radius of any given point [3]. Conversely, the g-function is density-based, describing the probability of finding a point at a specific distance / radius from another point [3]. Our implementation of the g-function deviates from the standard since we are calculating the expected number of points within each distance zone instead of finding a point at a specific distance. Again, our implementation is different from the K-function in the sense that, we are partitioning the continuous space around a point into discrete distance zones. The K-function shows cumulative effects across multiple distance scales, while the g-function is easier to interpret directly at specific distances. Our approach lies somewhere in between. While the K-function is normalized with respect to the density of the source markers [1] and the g-function by the perimeter [30], our approach normalizes the distance-based calculation by the area of the distance zones. The key rationale for our design decisions was the desire to examine and identify the spatial patterns that are significant and persistent across the distance zones.
3.2. Spatial Context Clustering
After the calculation of the g-function vector (gv) described in the previous subsection, we identify different spatial phenotypes of source markers by performing spatial context clustering on these gfunction vectors. This is a novel approach of identifying phenotypes using clustering on the spatial context of markers.
As described in the previous section, for every source-target and step window spatial context, we obtain a gv for every source cell in each patient sample, which is a vector of distance zone-specific values. We consider this g-function vector of a source cell as a feature and apply K-Nearest Neighbor (KNN) clustering [5]. We thus classify the patient cells for this specific spatial context into k categories, which we call our Phenotypes. It is important to note that clustering all patients’ source cells’ gvs together yields a stable Phenotype formation, where each Phenotype captures the same spatial context features across all patients.
Selecting the best k is challenging because we aim to identify meaningful spatial phenotypes without diluting information. Table 4 (Supp.) shows an ablation study of different k values on the 4 most persistent marker combinations. For each k, we report the p-value of the most significant phenotype/cluster, highlighting those <= 0.05. With a step window, we find k = 5 to be the smallest value that consistently produces at least one statistically significant phenotype for survival across marker combinations. We therefore use k=5 in our experiments.
Fig. 3 visualizes the process of identifying spatial phenotypes, with k=2 for a single patient for illustration purposes. In this conceptual figure, we consider the tumor biomarker as the source marker. We visualize the g-function vector (gv) for all of the tumor biomarkers that are creating a spatial contextual relation with cd8 as the target marker. This approach of creating a number of Phenotypes for each spatial context (a source-target combination and a step window size) enables us to capture the complexity of spatial information in the TME data, as we will demonstrate in the results section.
3.3. Survival Analysis
We perform the survival analysis separately for each Phenotype and spatial context (source-target and step window combination). Before performing survival analysis, we consider all the source markers classified into different spatial Phenotypes and calculate the frequency of the source markers falling into each Phenotype. We then normalize these frequencies with the total frequency of the source marker present in each TMA (patient sample). This step is important given the high variability in the number of different biomarkers across the samples. Then, for the Phenotype under consideration, the proportion of the cells of this Phenotype for a given spatial context in a patient sample becomes the feature used to separate patients into survival groups.
While for each combination, it is possible to partition the patients into several survival groups, the most straightforward way for our detailed exploration across multiple scenarios was a binary separation into high and low. After the calculation of normalized frequency for all the samples, we partition them into high vs. low groups using the median as a threshold. If the normalized frequency is less than or equal to the median then it belongs to the low group otherwise it falls into a high group. Then for each Phenotype and spatial context, we separate the patient samples by race or molecular subtype, while keeping the high/low group designation from the previous step.
This methodology allows us to uncover which spatial phenotypes are discriminant for survival for different races or molecular subtypes of studied cancer, and which of them persist across different step windows. We estimate the survival function and obtain the significance using the standard Kaplan-Meier method.
4. RESULTS AND DISCUSSION
4.1. Experimental Setup
While performing spatial analysis with the g-function, we have calculated the spatial context for all the possible combinations of biomarkers (Stroma, Tumor, cd8, and cd68) as source and target. We experimented with all of these context combinations with different step windows such as , and . We set the maximum radius to from the source marker for the experiment. We used an adaptive number of distance zones, calculated using step window size and maximum radius. For example, for a step window size of we used 40 distance zones. We used Python 3.7 language to perform our experiments. We performed our analysis on a single CPU core in the Linux Operating System. The system has a 64-bit architecture with an Intel Xeon E5–2650 v4 CPU at 2.20GHz, featuring 48 CPUs across 2 sockets, supporting hyper-threading with 2 threads per core, and includes various cache levels and NUMA node distribution.
4.2. Quantitative Results
For the evaluation of our method on the breast cancer dataset, we have performed survival analysis using spatial phenotypes generated from different combinations of context with different step windows. The patients were stratified, in separate experiments, by race or by molecular subtype of breast cancer. We quantified the correlation between generated spatial phenotypes and patient outcomes and present the results in Table 2. We show all statistically significant patterns derived from our experiments, colored based on the frequency of their appearance for a step window.
Table 2:
Statistically significant results derived from applying survival analysis on different combinations of source markers and target markers.
| Step Window | Race | Cancer Subtypes | ||||
|---|---|---|---|---|---|---|
| Caucasian | African American | LumA | LumB | TNBC | Her2 | |
|
| ||||||
| 5 μm | tumor-tumor(5) | cd68-cd68(1,5) | cd8-tumor(4) | tumor-tumor(5) | cd68-stroma(2) | cd68-stroma(1,3,4) |
| - | cd8-cd68(1,3,5) | tumor-stroma(2) | - | stroma-stroma(1) | cd68-tumor(1) | |
| - | tumor-cd68(1) | tumor-tumor(5) | - | tumor-stroma(4) | stroma-tumor(1,3,5) | |
| - | cd8-tumor(4) | - | - | - | tumor-tumor(4,5) | |
| - | - | - | - | - | - | |
| - | - | - | - | - | - | |
| - | - | - | - | - | - | |
|
| ||||||
| 10 μm | tumor-tumor(5) | - | cd8-tumor(1) | tumor-tumor(5) | cd68-stroma(2) | cd68-stroma(1,4,5) |
| - | cd8-cd68(1,4,5) | tumor-stroma(1) | - | stroma-stroma(2, 3) | cd68-tumor(5) | |
| - | tumor-cd68(2) | tumor-tumor(5) | - | tumor-stroma(5) | stroma-tumor(1,4,5) | |
| - | cd8-tumor(1) | - | - | - | tumor-tumor(3, 5) | |
| - | - | - | - | - | - | |
| - | - | - | - | - | - | |
| - | - | - | - | - | - | |
|
| ||||||
| 15 μm | tumor-tumor(3) | cd68-cd68(5) | cd8-tumor(1) | tumor-tumor(3,4,5) | - | cd68-stroma(1,3,4) |
| - | cd8-cd68(2,3,4) | tumor-stroma(1,3) | - | stroma-stroma(2) | cd68-tumor(1) | |
| - | tumor-cd68(4) | tumor-tumor(1) | - | - | stroma-tumor(2,3,5) | |
| - | cd8-tumor(1) | - | - | - | tumor-tumor(5) | |
| - | - | - | - | - | cd8-tumor(4) | |
| - | - | - | - | - | stroma-stroma(5) | |
| - | - | - | - | - | - | |
|
| ||||||
| 20 μm | tumor-tumor(5) | cd68-cd68(1,2) | cd8-tumor(1) | tumor-tumor(2,3,5) | cd68-stroma(2) | cd68-stroma(4) |
| - | cd8-cd68(1,2) | - | - | stroma-stroma(4) | cd68-tumor(5) | |
| - | tumor-cd68(4) | - | - | - | stroma-tumor(1,4,5) | |
| - | - | - | - | - | tumor-tumor(1,2) | |
| - | - | - | - | - | cd8-tumor(5) | |
| - | - | - | - | - | - | |
| - | - | - | - | - | cd8-stroma(5) | |
We are showing experiments with different step windows. Maker combinations that produced significant results corresponding to patient features such as Race and Cancer Subtypes are presented. The values in the brackets represent which spatial phenotype out of 5 spatial phenotypes yielded statistically significant results. The colors represent the frequency of marker combinations appearing on each step-size block. Following is the color scheme for frequencies: 1 - purple, 2 - blue, 3 - green, 4 - red.
We can immediately make some general observations. Contexts such as tumor-tumor and cd8-cd68 appear frequently across all step windows for race. cd8-tumor and cd68-stroma are also common, especially in specific molecular subtypes like LumA, TNBC, and Her2. Smaller step windows (5 μm, 10 μm) show a higher frequency of significant combinations. Larger step windows (15 μm, 20 μm) maintain significant combinations, but fewer in number. Certain contexts are more informative of survival for specific races and cancer subtypes. For example, cd68-stroma and tumor-tumor are notable in the TNBC and Her2 categories.
One of the main results from Table 2 is that Phenotype 5 for the tumor-tumor context is highly correlated with race and cancer subtypes. This combination is also persistent across different step windows (i.e. ), especially for Caucasian, LumB, and Her2 categories. tumor-tumor context is not a significant survival discriminator for the African-American category. However, for the African-American category, several contexts are significant survival discriminators that do not apply to the Caucasian group. Their context significance persists across smaller micron step windows, including cd8-cd68, tumor-cd68, and cd8-tumor. These are promising new phenotypes to help with survival prognosis for the underrepresented African-American population. For LumA and LumB subtypes, the tumor-tumor context shows statistically significant persistent survival discriminators. cd8-tumor and tumor-stroma for LumA also show statistical significance.
Another important result from Table 2 is for the TNBC subtype, where only the stroma-stroma context appears to be a statistically significant persistent survival discriminator. For smaller step windows, cd68-stroma and tumor-stroma show significant results. Identification of TNBC subtype-associated biomarker is a known difficult problem, and our results are promising.
A large number of spatial contexts can discriminate Her2 significantly. It can be observed from the table that cd68-stroma, cd68-tumor, stroma-tumor, and tumor-tumor are always persistent in spatial context up to . The cd8-tumor context appears at a larger step window.
Distribution Statistics:
We present the distribution statistics of all the contexts and phenotypes for different step windows in Table 5 (Supp.), corresponding to the same combinations from Table 2. From the distributions, it is noticeable that most of the significant phenotypes have non-zero medians making the emerged combinations more reliable by showing sufficient presence of biomarkers considered for spatial analysis. It is also observable that significant phenotypes tend to have similar or the same distribution spanning over different step windows. For example, in context tumor-tumor, Phenotype 5 in step window has close similarity of distributions with Phenotype 5 in step window , Phenotype 1 in step window , and Phenotype 1 in step window .
Our method uncovers spatial phenotypes with significance to survival across racial groups and molecular subtypes of breast cancer. We find other phenotypes that are significant to the survival of specific patient categories (such as African American or TNBC). These results offer the promise of applying such spatial phenotype pipelines in medical settings.
4.3. Qualitative Results
To understand the causality behind the quantified emerging significant patterns from spatial phenotypes, we present a visualization of representative spatial phenotypes (Fig. 4) and Kaplan-Meier survival curves (Fig. 5).
Figure 4: Visualization of biomarkers and phenotypes in representative Caucasian and African-American Patients. (A) and (C) shows Tumor vs. Non-Tumor Biomarkers for Caucasian and African-American patients respectively. (B) and (D) shows Phenotypes 1 to 5 within the tumor-tumor context in a representative Caucasian and African-American patient respectively.

Figure 5: This figure highlights the statistically significant survival results produced from some of the persistent spatial phenotypes for 5-micron distance zones correlated with race (A-D) and molecular subtypes of breast cancer (E-H).

First, we focus on Fig. 4 which visualize all the phenotypes derived by our analysis pipeline for tumor-tumor context in a representative case of Caucasian and African-American patients, respectively. The selection of representative cases relied on the normalized frequency distribution phenotypes. We picked the cases that were closest to the median of the normalized frequency distribution of phenotypes and had the presence of all Phenotypes 1 to 5.
Fig. 4 highlight potential differences in tumor heterogeneity and spatial organization between the two representative patients. For the Caucasian patient (Fig. 4(A) and 4(B)), phenotypes are more intermixed within the tumor region, indicating a heterogeneous tumor environment. Whereas in the case of African-American patients (Fig. 4(C) and 4(D)), phenotypes also show some degree of mixing, but with a clearer distinction in certain regions. In the representative case of a Caucasian patient (Fig. 4(B)) Phenotype 3 (highlighted with light green color) is mostly centered at the tumor core surrounded by Phenotype 4 (highlighted with orange color) which appears to be much denser. But in the representative case of African-American patient in Fig. 4(D) Phenotype 3 cells appear to be dense and contiguous, surrounded by less dense tumor tissue. In both cases, Phenotype 1 (highlighted in purple color) and Phenotype 5 (highlighted in red color) appear on the periphery of the tumor, surrounding Phenotype 4. In the Caucasian case, Phenotype 5 is forming more dense mini-clusters compared to the African-American case. This difference can be one of the reasons behind Phenotype 5 being a strong discriminator between Caucasian and African-American races presented in Table 2. Phenotype 2 (highlighted in blue color) corresponds to the outlier cells, further away from the rest.
It is worth noting that while the phenotype differences in Fig. 4(B) and Fig. 4(D) uncover the TME heterogeneity of two representative patients, they also demonstrate the biological explain-ability and persistence of our phenotypes. For example, in both cases, Phenotype 3 (highlighted with a light green color) is mostly centered at the tumor core surrounded by Phenotype 4 (highlighted with an orange color); the same applies to Phenotypes 1, 2, and 5.
Next, we highlight some of our spatial phenotypes that are statistically significant survival discriminators for different race or molecular subtype patient groups. Fig. 5 (A) shows the Kaplan-Meir survival curve for tumor-to-tumor context Phenotype 5 for Caucasian patients. Panels (B) - (D) show some significant context-Phenotype combinations for African American patients. Fig. 5 (E) – (H) shows the Kaplan-Meir survival curves for representative context-Phenotype combinations for each of the molecular subtypes of breast cancer.
Interestingly, for some phenotypes, the low expression group is associated with significantly better survival outcomes, whereas for other phenotypes this is reversed. This observation is indicative of the phenotypes capturing different, biologically relevant spatial aspects of the individual TMEs.
In the Supplement, we also present distributions of phenotypes for selected contexts for the step window. The contexts were chosen based on the relevance to the racial subgroups (see Table 2). The distributions in Fig. 6 (A) – (D) Supp. are across all patients, demonstrating another aspect of differences among the phenotypes.
Comparison with Baselines:
For comparison, we implemented standard spatial statistics such as Ripley’s K-Function, Nearest Neighbor G-Function, and baseline statistics like Absolute and Normalized Counts. We also compared our novel g-function without clustering (Table 3). After performing Kaplan-Meier survival analysis on each feature, our method consistently produced phenotypes that were significant discriminants of survival across different race or cancer subtypes and biomarker combinations, outperforming other statistics.
Table 3:
Comparison of our method with different baselines.
| Context | Categories | Abs. C. | Norm. C. | g(Avg) | g(Max) | G(Avg) | G(Max) | K(Avg) | K(Max) | Ours |
|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||
| tumor-tumor | Race = Caucasian | 0.69 | 0.56 | 0.44 | 0.00* | 0.22 | 0.68 | 0.34 | 0.19 | 0.01* |
| cd8-cd68 | Race = African American | 0.84 | 0.33 | 0.07 | 0.02* | 0.08 | 0.51 | 0.00* | 0.00* | 0.01* |
| cd8-tumor | Subtype = LumA | 0.08 | 0.40 | 0.33 | 0.19 | 0.01* | 0.09 | 0.02* | 0.07 | 0.04* |
| cd68-stroma | Subtype = Her2 | 0.16 | 0.35 | 0.11 | 0.07 | 0.04* | 0.55 | 0.26 | 0.43 | 0.04* |
A comparison is being made for the lowest possible p-values obtained from the Kaplan-Meier survival analysis. In the table, Abs. C. = Absolute Count, Norm. C. = Normalized Count, g(Avg) = g-Function Average Pooling, g(Max) = g-Function Max Pooling, G(Avg) = G-Function Average Pooling, G(Max) = G-Function Max Pooling, K(Avg) = K-Function Average Pooling, K(Max) = K-Function Average Pooling.
5. CONCLUSION AND FUTURE WORK
In this study, we present a novel variation of spatial g-function and a comprehensive framework that identifies rich spatial phenotypes which can then be used in survival analysis and classification tasks. Our imaging-technology-agnostic approach addresses the limitations of existing spatial analysis techniques while identifying statistically significant and biologically relevant spatial phenotypes.
We have observed patterns like tumor-tumor, cd8-cd68, and cd8-tumor contexts are frequently significant across various step windows and categories. Smaller step windows (5 μm, 10 μm) are more sensitive in detecting significant combinations. Different race and molecular cancer subtype categories exhibit unique significant marker combinations, indicating the importance of personalized analysis. These findings can be crucial for understanding the prognostic value of different spatial phenotypes. We also demonstrate that our phenotypes reflect specific biological contexts, with same-phenotype cells collocating in similar contexts within the TME.
Our work underscores the importance of integrating multi-omics data and advanced spatial analysis to unravel the complexities of cancer biology. By systematically exploring the spatial g-function, and identifying new phenotypes based on similar spatial context with unsupervised clustering, we have shown its potential to uncover new biomarkers and therapeutic targets, paving the way for more personalized and effective treatments for breast cancer.
In the future, we will explore other spatial analyses and also topology. This work demonstrates the utilization of spatial statistics in finding significant biological signals from a single case study. We will develop a large suite of tools and apply them to multiple case studies to obtain more reliable results. We will also explore other ways where we can use the g-function as a potential feature to use as input into other advanced survival models and deep learning classification models, etc. While we have explored the effect of individual spatial phenotypes on survival, we plan to explore the use of an entire phenotype vector as a feature. Other future work includes developing an automated (ML-based) phenotype selection for survival analysis.
In conclusion, our study offers a significant contribution to the field of digital pathology by providing a comprehensive framework for spatial analysis that is both accessible and applicable to a wide range of imaging modalities. The methodologies and insights presented here have the potential to revolutionize the study of TMEs in various cancers, ultimately improving patient outcomes through more accurate diagnostics and targeted therapies. We anticipate that our approach will inspire further research and development in spatial phenotyping, driving forward the capabilities of computational pathology and enhancing our understanding of complex biological systems.
Supplementary Material
ACKNOWLEDGMENTS
This research was partially supported by the grants NIH R01GM148 970, R01CA253368, R01CA266040, R01CA253368, R01CA297843–01, R21CA258493–2S1, R21CA258493–02, R01DA057195, NCI UH3CA22 50121 and Stony Brook University IDEA Fellowship.
Footnotes
ACM Reference Format:
Mahmudul Hasan, Ariadna Kim Silva, Shahira Abousamra, Shao-Jun Tang, Prateek Prasanna, Joel Saltz, Kevin Gardner, Chao Chen, and Alisa Yurovsky. 2024. New Spatial Phenotypes from Imaging Uncover Survival Differences for Breast Cancer Patients. In 15th ACM International Conference on Bioinformatics, Computational Biology and Health Informatics (BCB ‘24), November 22–25, 2024, Shenzhen, China. ACM, New York, NY, USA, 12 pages. https://doi.org/10.1145/3698587.3701333
Contributor Information
Mahmudul Hasan, Stony Brook University, Stony Brook, NY, USA.
Ariadna Kim Silva, Stony Brook University, Stony Brook, NY, USA.
Shahira Abousamra, Stony Brook University, Stony Brook, NY, USA.
Shao-Jun Tang, Stony Brook University, Stony Brook, NY, USA.
Prateek Prasanna, Stony Brook University, Stony Brook, NY, USA.
Joel Saltz, Stony Brook University, Stony Brook, NY, USA.
Kevin Gardner, Columbia University, New York, NY, USA.
Chao Chen, Stony Brook University, Stony Brook, NY, USA.
Alisa Yurovsky, Stony Brook University, Stony Brook, NY, USA.
REFERENCES
- [1].Abousamra Shahira, Belinsky David, Van Arnam John, Allard Felicia, Yee Eric, Gupta Rajarsi, Kurc Tahsin, Samaras Dimitris, Saltz Joel, and Chen Chao. 2021. Multi-class cell detection using spatial context representation. In Proceedings of the IEEE/CVF International Conference on Computer Vision. 4005–4014. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [2].Angelo Michael, Bendall Sean C, Finck Rachel, Hale Matthew B, Hitzman Chuck, Borowsky Alexander D, Levenson Richard M, Lowe John B, Liu Scot D, Zhao Shuchun, et al. 2014. Multiplexed ion beam imaging of human breast tumors. Nature medicine 20, 4 (2014), 436–442. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [3].Baddeley Adrian, Rubak Ege, and Turner Rolf. 2015. Spatial point patterns: methodology and applications with R. CRC press. [Google Scholar]
- [4].Chang Qing, Ornatsky Olga I., Siddiqui Iram, Loboda Alexander, Baranov Vladimir I., and Hedley David W.. 2017. Imaging Mass Cytometry. Cytometry Part A 91, 2 (2017), 160–169. 10.1002/cyto.a.23053 [DOI] [PubMed] [Google Scholar]
- [5].Cover Thomas and Hart Peter. 1967. Nearest neighbor pattern classification. IEEE transactions on information theory 13, 1 (1967), 21–27. [Google Scholar]
- [6].Damond Nicolas, Engler Stefanie, Zanotelli Vito RT, Schapiro Denis, Wasserfall Clive H, Kusmartseva Irina, Nick Harry S, Thorel Fabrizio, Herrera Pedro L, Atkinson Mark A, et al. 2019. A map of human type 1 diabetes progression by imaging mass cytometry. Cell metabolism 29, 3 (2019), 755–768. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [7].Delgado-Coka Lyanne A, Horowitz Michael, Torrente-Goncalves Mariana, Roa-Peña Lucia, Leiton Cindy V, Hasan Mahmudul, Babu Sruthi, Fassler Danielle, Oentoro Jaymie, Bai Ji-Dong Karen, et al. 2024. Keratin 17 modulates the immune topography of pancreatic cancer (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- [8].Du Jun, Yang Yu-Chen, An Zhi-Jie, Zhang Ming-Hui, Fu Xue-Hang, Huang Zou-Fang, Yuan Ye, and Hou Jian. 2023. Advances in spatial transcriptomics and related data analysis strategies. Journal of translational medicine 21, 1 (May 2023), 330. 10.1186/s12967-023-04150-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
- [9].Feng Yuzhou, Yang Tianpei, Zhu John, Li Mabel, Doyle Maria, Ozcoban Volkan, Bass Greg T, Pizzolla Angela, Cain Lachlan, Weng Sirui, et al. 2023. Spatial analysis with SPIAT and spaSim to characterize and simulate tissue microenvironments. Nature Communications 14, 1 (2023), 2697. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [10].Giesen Charlotte, Wang Hao AO, Schapiro Denis, Zivanovic Nevena, Jacobs Andrea, Hattendorf Bodo, Schüffler Peter J, Grolimund Daniel, Buhmann Joachim M, Brandt Simone, et al. 2014. Highly multiplexed imaging of tumor tissues with subcellular resolution by mass cytometry. Nature methods 11, 4 (2014), 417–422. [DOI] [PubMed] [Google Scholar]
- [11].Goltsev Yury and Nolan Garry. 2023. CODEX multiplexed tissue imaging. Nature Reviews Immunology 23 (08 2023). 10.1038/s41577-023-00936-z [DOI] [PubMed] [Google Scholar]
- [12].Goltsev Yury, Samusik Nikolay, Kennedy-Darling Julia, Bhate Salil, Hale Matthew, Vazquez Gustavo, Black Sarah, and Nolan Garry P. 2018. Deep profiling of mouse splenic architecture with CODEX multiplexed imaging. Cell 174, 4 (2018), 968–981. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [13].Goossens Pieter, Lu Chang, Cao Jianhua, Gijbels Marion J, Karel Joël MH, Wijnands Erwin, Claes Britt SR, Fazzi Gregorio E, Hendriks Tim FE, Wouters Kristiaan, et al. 2022. Integrating multiplex immunofluorescent and mass spectrometry imaging to map myeloid heterogeneity in its metabolic and cellular context. Cell metabolism 34, 8 (2022), 1214–1225. [DOI] [PubMed] [Google Scholar]
- [14].Heindl Andreas, Nawaz Sidra, and Yuan Yinyin. 2015. Mapping spatial heterogeneity in the tumor microenvironment: a new era for digital pathology. Laboratory investigation 95, 4 (2015), 377–384. [DOI] [PubMed] [Google Scholar]
- [15].Hu Jian, Li Xiangjie, Coleman Kyle, Schroeder Amelia, Ma Nan, Irwin David J, Lee Edward B, Shinohara Russell T, and Li Mingyao. 2021. SpaGCN: Integrating gene expression, spatial location and histology to identify spatial domains and spatially variable genes by graph convolutional network. Nature methods 18, 11 (2021), 1342–1351. [DOI] [PubMed] [Google Scholar]
- [16].Jiang Sizun, Mukherjee Nilanjan, Bennett Richard S, Chen Han, Logue James, Dighero-Kemp Bonnie, Kurtz Jonathan R, Adams Ricky, Phillips Darci, Schürch Christian M, et al. 2021. Rhesus macaque CODEX multiplexed immunohistochemistry panel for studying immune responses during Ebola infection. Frontiers in immunology 12 (2021), 729845. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [17].Jovic Dragomirka, Liang Xue, Zeng Hua, Lin Lin, Xu Fengping, and Luo Yonglun. 2022. Single-cell RNA sequencing technologies and applications: A brief overview. Clinical and Translational Medicine 12, 3 (2022), e694. 10.1002/ctm2.694 [DOI] [PMC free article] [PubMed] [Google Scholar]
- [18].Madabhushi Anant and Lee George. 2016. Image analysis and machine learning in digital pathology: Challenges and opportunities. Medical image analysis 33 (2016), 170–175. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [19].Mahadevan Arun S, Long Byron L, Hu Chenyue W, Ryan David T, Grandel Nicolas E, Britton George L, Bustos Marisol, Gonzalez Porras Maria A, Stojkova Katerina, Ligeralde Andrew, et al. 2022. cytoNet: Spatiotemporal network analysis of cell communities. PLoS computational biology 18, 6 (2022), e1009846. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [20].McCaffrey Erin F, Donato Michele, Keren Leeat, Chen Zhenghao, Delmastro Alea, Fitzpatrick Megan B, Gupta Sanjana, Greenwald Noah F, Baranski Alex, Graf William, et al. 2022. The immunoregulatory landscape of human tuberculosis granulomas. Nature immunology 23, 2 (2022), 318–329. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [21].Palla Giovanni, Spitzer Hannah, Klein Michal, Fischer David, Schaar Anna Christina, Kuemmerle Louis Benedikt, Rybakov Sergei, Ibarra Ignacio L, Holmberg Olle, Virshup Isaac, Lotfollahi Mohammad, Richter Sabrina, and Theis Fabian J. 2022. Squidpy: a scalable framework for spatial omics analysis. Nat. Methods 19, 2 (Feb. 2022), 171–178. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [22].Pham Duy, Tan Xiao, Balderson Brad, Xu Jun, Grice Laura F, Yoon Sohye, Willis Emily F, Tran Minh, Lam Pui Yeng, Raghubar Arti, et al. 2023. Robust mapping of spatiotemporal trajectories and cell–cell interactions in healthy and diseased tissues. Nature communications 14, 1 (2023), 7739. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [23].Ptacek Jason, Locke Darren, Finck Rachel, Cvijic Mary-Ellen, Li Zhuyin, Tarolli Jay G., Aksoy Murat, Sigal Yari, Zhang Yi, Newgren Matt, and Finn Jessica. 2020. Multiplexed ion beam imaging (MIBI) for characterization of the tumor microenvironment across tumor types. Laboratory Investigation 100, 8 (2020), 1111–1123. [DOI] [PubMed] [Google Scholar]
- [24].Rakaee Mehrdad, Adib Elio, Ricciuti Biagio, Lynette M Sholl Weiwei Shi, Joao V Alessi Alessio Cortellini, Claudia AM Fulgenzi Patrizia Viola, David J Pinato, et al. 2023. Association of machine learning–based assessment of tumor-infiltrating lymphocytes on standard histologic images with outcomes of immunotherapy in patients with NSCLC. JAMA oncology 9, 1 (2023), 51–60. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [25].Ripley Brian D. 1988. Statistical inference for spatial processes. Cambridge university press. [Google Scholar]
- [26].Singhal Sandeep K, Byun Jung S, Park Samson, Yan Tingfen, Yancey Ryan, Caban Ambar, Hernandez Sara Gil, Hewitt Stephen M, Boisvert Heike, Hennek Stephanie, et al. 2021. Kaiso (ZBTB33) subcellular partitioning functionally links LC3A/B, the tumor microenvironment, and breast cancer survival. Communications biology 4, 1 (2021), 150. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [27].Song Qianqian and Su Jing. 2021. DSTG: deconvoluting spatial transcriptomics data through graph-based artificial intelligence. Briefings in bioinformatics 22, 5 (2021), bbaa414. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [28].Stoyan Dietrich and Stoyan Helga. 1994. Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley & Sons; (1994). [Google Scholar]
- [29].Tan Wei Chang Colin, Nerurkar Sanjna Nilesh, Cai Hai Yun, Ng Harry Ho Man, Wu Duoduo, Wee Yu Ting Felicia, Lim Jeffrey Chun Tatt, Yeong Joe, and Lim Tony Kiat Hon. 2020. Overview of multiplex immunohistochemistry/immunofluorescence techniques in the era of cancer immunotherapy. Cancer Communications 40, 4 (2020), 135–153. 10.1002/cac2.12023 [DOI] [PMC free article] [PubMed] [Google Scholar]
- [30].R Core Team. 2024. RDocumentation. https://www.rdocumentation.org/packages/spatstat/versions/1.64-1/topics/pcf. Accessed: 2024-07-02.
- [31].Wikipedia contributors. 2024. Radial distribution function — Wikipedia, The Free Encyclopedia. https://en.wikipedia.org/w/index.php?title=Radial_distribution_function&oldid=1228812808 [Online; accessed 2-July-2024].
- [32].Wolf F Alexander, Angerer Philipp, and Theis Fabian J. 2018. SCANPY: large-scale single-cell gene expression data analysis. Genome biology 19 (2018), 1–5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [33].Wu Zhenqin, Trevino Alexandro E, Wu Eric, Swanson Kyle, Kim Honesty J, D’Angio H Blaize, Preska Ryan, Charville Gregory W, Dalerba Piero D, Egloff Ann Marie, et al. 2022. SPACE-GM: geometric deep learning of disease-associated microenvironments from multiplex spatial protein profiles. bioRxiv; (2022), 2022–05. [DOI] [PubMed] [Google Scholar]
- [34].Yuan Zhiyuan, Pan Wentao, Zhao Xuan, Zhao Fangyuan, Xu Zhimeng, Li Xiu, Zhao Yi, Zhang Michael Q, and Yao Jianhua. 2023. SODB facilitates comprehensive exploration of spatial omics data. Nature Methods 20, 3 (2023), 387–399. [DOI] [PubMed] [Google Scholar]
- [35].Zhao Edward, Stone Matthew R, Ren Xing, Guenthoer Jamie, Smythe Kimberly S, Pulliam Thomas, Williams Stephen R, Uytingco Cedric R, Taylor Sarah EB, Nghiem Paul, et al. 2021. Spatial transcriptomics at subspot resolution with BayesSpace. Nature biotechnology 39, 11 (2021), 1375–1384. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [36].Zhu Qian, Shah Sheel, Dries Ruben, Cai Long, and Yuan Guo-Cheng. 2018. Identification of spatially associated subpopulations by combining scRNAseq and sequential fluorescence in situ hybridization data. Nature biotechnology 36, 12 (2018), 1183–1190. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
