Motivation

The spatial organization of cellular phenotypes within a tissue can inform tissue function and/or disease progression. A Cell Neighborhood is a specific tissue region defined by its composition of cell types and functional processes. Cell Neighborhood analysis seeks to identify conserved tissue regions across a dataset, which can be used to speculate about tissue behavior, such as inferring mechanisms of disease progression.

Here, we offer a set of guidelines to use k-means clustering to identify Cellular Neighborhoods based on cell location and phenotypes from multiplexed fluorescence images. These steps can be performed using the Cell Neighborhood Extension on the Portal or via SpatialMap in Workbench.

<aside> đź’ˇ Number of Neighbors: We recommend k = 10. Number of Neighborhoods. We recommend k = 10.

</aside>

Approach for Neighborhood Analysis

K-nearest-neighbors

A cell’s local neighborhood consists of the collection of cell types in its immediate vicinity. To define a cell’s neighborhood, we use a k-nearest-neighbors approach. For every annotated cell in a dataset, the algorithm enumerates the cell types of its k-nearest spatial neighbors in Euclidean space.

Illustration of K-nearest neighbors method for determining a cell’s (red) local neighborhood (grey), where K = 12.

Illustration of K-nearest neighbors method for determining a cell’s (red) local neighborhood (grey), where K = 12.

K-means clustering

To identify repeated neighborhoods across a dataset we use a k-means-clustering approach. Cells’ local neighborhoods are grouped into a predefined number of clusters (k) based on its mean composition of cell types.

Analysis options

Once you have created a Cell Neighborhood Annotation with one of the above extensions you may also directly edit the cell neighborhood assignments from within the Visualizer. To learn more, please see: Editing Annotation Classes for Cell Overlay Channels

Evaluation of performance

The ideal neighborhood analysis uncovers neighborhoods that are conserved across multiple tissue regions within a dataset, yet have distinct cellular compositions and functional characteristics. To assess the quality of neighborhood analysis, we recommend evaluating the heat map of cellular frequencies. We also recommend looking at the spatial distribution of neighborhoods within samples using Voronoi diagrams and the heatmap of neighborhood frequencies across samples generated through the Explorer.

In the heat map of cellular frequencies, each row represents a neighborhood, each column represents a cell type, and the color of each rectangle depicts the normalized cell frequency for that cell type in that neighborhood. The heatmap should reveal distinct sets of cell phenotypes for each neighborhood.

The Explorer can be used to examine the spatial distribution of the neighborhoods in samples through Voronoi diagrams and across samples through the heatmap of neighborhood frequencies. The Voronoi diagrams for each region should be inspected to determine whether the spatial mapping of the neighborhoods seems reasonable, while the heatmap can be used to verify that neighborhoods are found across multiple samples.

Voronoi diagrams of two lung cancer tissue cores, colored by cellular neighborhood. These diagrams can be useful in inspecting the quality of neighborhood analysis: for example, are tumor neighborhoods (black and blues) in expected spatial locations?

Voronoi diagrams of two lung cancer tissue cores, colored by cellular neighborhood. These diagrams can be useful in inspecting the quality of neighborhood analysis: for example, are tumor neighborhoods (black and blues) in expected spatial locations?

Expected Outcomes

From running neighborhood analysis, we are able to determine spatial groupings of cell phenotypes that commonly occur across various samples of a study. We can then compare the relative frequencies of various neighborhoods between different groups and samples in the Explorer.