API Overview

Quick overview of the Methods and Datasets available in ATHENA.

Methods

Depending on the underlying mathematical foundations, the heterogeneity scores included in ATHENA can be classified into the following categories: (i) spatial statistics scores that quantify the degree of clustering or dispersion of each phenotype individually, (ii) graph-theoretic scores that examine the topology of the tumor graph, (iii) information-theoretic scores that quantify how diverse the tumor is with respect to different phenotypes present and their relative proportions, and (iv) cell interaction scores that assess the pairwise connections between different phenotypes in the tumor ecosystem. The interested reader is advised to read the Methodology section.

Pre-processing

Collection of common pre-processing functionalities.

extract_centroids(so, spl[, mask_key, inplace])

Extract centroids from segementation masks.

arcsinh(so, spl, cofactor)

Computes the arcsinh transformation of the expression values according to:

Graph building

The athena.graph_builder submodule of ATHENA constructs a graph representation of the tissue using the cell masks extracted from the high-dimensional images. The graph construction module implements three different graph flavors that capture different kinds of cell-cell communication:

  • contact-graph: juxtacrine signaling, where cells exchange information via membrane receptors, junctions or extracellular matrix glycoproteins

  • radius-graph: representation mimics paracrine signaling, where signaling molecules that are secreted into the extracellular environment interact with membrane receptors of neighboring cells and induce changes in their cellular state.

  • knn-graph: common graph topology, successfully used in digital pathology

Visualisation

The plotting module (athena.plotting) enables the user to visualise the data and provides out-of-the-box plots for some of the metrics.

spatial(so, spl, attr, *[, mode, node_size, …])

Various functionalities to visualise samples.

napari_viewer(so, spl, attrs[, censor, …])

Starts interactive Napari viewer to visualise raw images and explore samples.

interactions(so, spl, attr[, mode, …])

Visualise results from interactions() results.

ripleysK(so, spl, attr, ids, *[, mode, …])

Visualise results from ripleysK() results.

infiltration(so, spl[, attr, step_size, …])

Visualises a heatmap of the featuer intensity.

Entropic metrics

ATHENA brings together a number of established as well as novel scores that enable the quantification of tumor heterogeneity in a spatially-aware manner, borrowing ideas from ecology, information theory, spatial statistics, and network analysis.

richness(so, spl, attr, *[, local, …])

Computes the richness on the observation or the sample level

abundance(so, spl, attr, *[, mode, …])

Computes the abundance of species on the observation or the sample level.

shannon(so, spl, attr, *[, local, …])

Computes the Shannon Index on the observation or the sample level

simpson(so, spl, attr, *[, local, …])

Computes the Simpson Index on the observation or the sample level

renyi_entropy(so, spl, attr, q, *[, local, …])

Computes the Renyi-Entropy.

hill_number(so, spl, attr, q, *[, local, …])

Computes the Hill Numbers on the observation or the sample level

quadratic_entropy(so, spl, attr, *[, …])

Computes the quadratic entropy, taking relative abundance and similarity between observations into account.

Graph metrics

Currently, this module only implements modularity which captures the structure of a graph by quantifying the degree at which it can be divided into communities of the same label. In the context of tumor heterogeneity, modularity can be thought of as the degree of self-organization of the cells with the same phenotype into spatially distinct communities.

modularity(so, spl, community_id[, …])

Computes the modularity of the sample graph.

Cell-cell interaction metrics

More sophisticated heterogeneity scores additionally consider cell-cell interactions by exploiting the cell-cell graph, where nodes encode cells, edges encode interactions, and each node is associated with a label that encodes the cell’s phenotype. The cell interaction scores implemented in ATHENA’s neighborhood submodule include:

interactions(so, spl, attr[, mode, …])

Compute interaction strength between species. This is done by counting the number of interactions (edges in the graph)

infiltration(so, spl, attr, *[, …])

Compute infiltration score.

ripleysK(so, spl, attr, id, *[, mode, …])

Compute Ripley’s K as implemented by `[1]`_.

Datasets

ATHENA provides two datasets that enables users to explore the implemented functionalities and analytical tools:

  • An image mass cytometry dataset [Jackson]

  • An multiplexed ion beam imaging dataset [Keren]

imc([force_download])

Pre-processed zurich cohort IMC dataset from *Jackson, H.W., Fischer, J.R., Zanotelli, V.R.T.

mibi()

Processed data from A Structured Tumor-Immune Microenvironment in Triple Negative Breast Cancer Revealed by Multiplexed Ion Beam Imaging. Cell.

References

Jackson

Jackson, H. W. et al. The single-cell pathology landscape of breast cancer. Nature.

Keren

Keren, L. et al. A Structured Tumor-Immune Microenvironment in Triple Negative Breast Cancer Revealed by Multiplexed Ion Beam Imaging. Cell 174, 1373-1387.e19 (2018). Cell.