Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Linking nuclei and cells

What it does

When a method segments both nuclei and whole cells, linking decides which nucleus belongs to which cell, and from that draws each cell’s cytoplasm: the cell minus its nucleus.

Parameters

segment_cells and segment_nuclei, both on: linking then runs for each method. Nothing else changes it; the one-half rule below is fixed. See Methods and targets.

How it works

Nuclei and cells are segmented in two separate passes, so they share nothing but their outlines. Linking pairs them by overlap, after the patches are joined, when the outlines are final:

  1. A nucleus links to the cell that holds the largest share of its area, if that share is at least half. A tie goes to the cell listed first.

  2. A cell’s nucleus compartment is the union of its linked nuclei, clipped to the cell.

  3. Its cytoplasm is the cell minus that compartment. It can be a ring, or several pieces.

  4. Nothing is dropped: an unlinked nucleus is kept, and a cell without a nucleus is kept.

Left, a cell with a nucleus inside it; the cell area around the nucleus is the cytoplasm. Right, a cell with a nucleus mostly outside it; the nucleus is not linked, the cell has no nucleus and no cytoplasm is defined.

Left: the nucleus lies inside the cell, so it is linked, and the rest of the cell is cytoplasm. Right: less than half of the nucleus lies inside, so it is not linked; the cell has no nucleus, so no cytoplasm is defined.

A cell without a nucleus has no cytoplasm value (“not measured”, NaN); a cell its nuclei fill has a cytoplasm area of 0 (“measured, nothing there”).

Inputs and outputs. In: one method’s resolved cells and nuclei. Out, in the store: {m}_nuclei with a linked_cell_id per nucleus, and {m}_cytoplasm; per cell, the number of nuclei, the largest linked nucleus and the nucleus and cytoplasm areas. Quantification measures the nucleus compartment and the cytoplasm as extra table layers. The QC report counts cells by number of nuclei, unlinked nuclei, and cells their nuclei fill. See The SpatialData store.

Similar tools

Here each method segments cells from the membrane markers, so linking by geometry is what lets one run measure nuclei, cells and cytoplasm from the same outlines.

Read more

Version used:

ModuleToolVersionContainerPaper
LINK_COMPARTMENTSgeopandas2.3.0-1docker.io/josenimo/sopa:2.3.0-1
References
  1. Bankhead, P., Loughrey, M. B., Fernández, J. A., Dombrowski, Y., McArt, D. G., Dunne, P. D., McQuaid, S., Gray, R. T., Murray, L. J., Coleman, H. G., James, J. A., Salto-Tellez, M., & Hamilton, P. W. (2017). QuPath: Open source software for digital pathology image analysis. Scientific Reports, 7(1). 10.1038/s41598-017-17204-5