Theoretical Concepts
Here, we provide some background on concepts such as assortativity and Delaunay triangulation. For practical examples of how to implement mosna, skip ahead to the How to Guides.
Assortativity
Assortativity can be defined as a tendency of links to exist between nodes with similar attributes [1]. It is a general measure of preferential interactions between nodes that share the same attributes, expressed as a single scalar value. These attributes can, for example, be cell type labels or marker positiveness. In mosna, assortativity is used to quantify preferential interactions between different cell types or spots (attributes), where attributes that are often found together have a positive assortativity value those that show avoidant behavior a negative assortativity value.
Interactions between neighboring cells are known to underpin many physiological processes, including immune responses [2]. Hence, assortativity can potentially provide valuable insights into which interactions are occurring in resected tissue that is analyzed with any type of spatial imaging technique. Since assortativity can be calculated for all attribute pairs in a cellular network, it is possible to obtain a large number of features and make cross-sample comparisons. Adding clinical data enables us to investigate which of these features have predictive power to predict target features in the clinical dataset. This could enable biomarker discovery.
Network Attribute Randomization
Calculating assortativity is not a straightforward task. We consider that the relative proportion of cell types in the network affects the apparent assortativity: if there are many cells of the same type in a network, most of the edges in that network will be between cells of the same type [3]. As a result the network will appear very assortative [3]. Such imbalance in cell type proportions must be corrected for. To do so, MOSNA performs network attribute randomization, shuffling the assignment of values of each attribute to the cells [3]. This process is then repeated N times. With this method, the number of cells that are positive for each attribute and the links between the cells are preserved.
Delaunay Triangulation
Which nodes in a network are considered to interact is determined by mosna using the physical distance between them. For this purpose, multiple distance metrics can be used. In our examples, we will use Delaunay triangulation, which is widely used in computational geometry, both in two and three dimensional space [4]. It divides a set of points into a triangle mesh (a set of triangles connected by their common edges). A max-min angle criterion is then imposed [4]. This requires that the diagonal of every convex quadrilateral — a four sided polygon that has interior angles smaller than 180 degrees each — is “chosen well” [4]. It is “chosen well”, if replacing the diagonal by an alternative one does not increase the minimum of the six angles in the two triangles that make up the quadrilateral [4]. Hence, the Delaunay triangulation of a set of points (in a plane) will maximize the minimum angle in any triangle [4].