Support homeAtera Instrument SoftwareAlgorithms Overview
Segmenting Nuclei and Cells from 2D Projection Images

Segmenting Nuclei and Cells from 2D Projection Images

The goal of cell segmentation is to approximate boundaries between cells so that transcripts can be assigned to cells. Downstream, these results will be used to produce a cell-feature matrix.

The algorithms described on this page are used to generate the cell summary segmentation, and segmentation metrics in the output bundle:

  • morphology_2d/
  • cells.zarr.zip: includes cell and nucleus segmentation mask and boundary polygon data
  • analysis_summary.html: Cell Segmentation and Image QC (Autofluorescence and Cell Segmentation images) tabs
  • metrics_summary.csv

2D projections are produced for each stain image. The DAPI focus image is based on the DAPI image captured in the background cycle in the cell segmentation kit.

After RNA detection imaging cycles, there are two cell stain cycles to image the interior of the cell, and if present in the assay, the cell membrane boundary and interior protein stains for multimodal cell segmentation.

  1. Capture DAPI and the other stain channels in a blank state
  2. Capture DAPI and the other channels with their respective stains present

The DAPI images from these cell stain cycles are aligned to the 3D DAPI image (cycle 1) so they are in the same coordinate system.

Next, the background "blank" images are subtracted from the stain images for each of the multi-tissue stain channels, which helps to offset the effects of autofluorescence. Background subtraction is performed for the multi-tissue stain images, not the DAPI image.

This algorithm step is based on multi-focus image fusion techniques* to generate an all-in-focus stitched, 2D projection for each stain image (i.e., DAPI, interior RNA, boundary, and interior protein). It includes the following steps:

  • In 16 x 16 pixel patches, the algorithm selects the best in-focus Z-slice from the aligned multi-channel stain image Z-stack, which has a 0.75 µm step size and includes the DAPI, background, and cell segmentation stain channels. This process is applied to every FOV selected for analysis.
  • The focus finding process then generates a global focus map based on all these channels, which is applied across every channel and cycle.

*Review articles such as this one provide some background information about multi-focus image fusion methods.

Deconvolution and background removal are applied to the Z-stacks. The all-in-focus image is sampled from the deconvolved and background removed Z-stacks for each stain. This step improves resolution and contrast of images (i.e., when visualized in 10x Explorer).

Cell segmentation images undergo a masking step that uses information from the background images to identify and mask saturated pixels.

Finally, the results are stitched together to generate a 2D projection image for each stain. These processed images are provided in the morphology_2d/ directory.

The nucleus segmentation algorithm detects nuclei locations using the DAPI and 18S images and a custom neural network. The algorithm prioritizes using the 2D global focus map images, but is supplemented by the 3D DAPI Z-stack results, to enable nuclei detection in regions with saturated DAPI signal. The neural network is trained on thousands of manually labeled image patches covering multiple tissue types from 10x Genomics spatial data.

Any nucleus that has 95% or more of its pixel intensity lower than an intensity threshold of 400 AU will be removed for deconvolved DAPI images and 800 AU for the DAPI Z-stack.

The multimodal cell segmentation algorithm uses custom deep learning models to analyze the multi-channel stain images. The models are trained on 10x Genomics spatial data, which include a range of tissue types and preparations (fresh frozen, FFPE). Cell segmentation is performed on the deconvolved, global focus map images (described above).

After nucleus segmentation, the algorithm uses up to three methods to segment cell boundaries. The segmentation results are prioritized in this order for each cell:


The segmentation results are prioritized in this order for each cell:

  • Segment cells based on their cell boundary stain: The inferred segmentation from this method should be closest to the true cell membrane boundary. It uses cell-surface marker antibodies to target epithelial markers (ATP1A1, E-Cadherin) and immune markers (pan-lymphocyte: CD45). This method can split nuclei, define cells missing a nucleus, and identify multinucleate cells. Nuclei that overlap with anucleate cells are assigned to the cell.
  • Segment cells based on expansion from the nucleus to the cell interior stain edge: This method includes both a deep learning model and a nuclear expansion method using the interior stain to infer cell boundaries. It uses the interior stain (18S rRNA marker) and the DAPI stain for nuclei. The Atera Onboard Analysis cell segmentation algorithm does not currently use the interior protein stain (alphaSMA/Vimentin), as the 18S marker has been sufficient for most tissue types. The inferred cell outline may look irregular in cases where boundaries between cell interior stains are challenging to identify (i.e., for dense tissue types).
  • Nuclear expansion: For cases where cells that do not have boundary or interior stains, cells are segmented with a nuclear expansion method. Once the locations of nuclei in the sample have been identified by the model, a heuristic cell boundary expansion step is performed. The nucleus boundaries are expanded by 5 µm or until they encounter another cell boundary in X-Y. If cell boundaries overlap during expansion, they are resolved using an algorithm that is conceptually similar to Voronoi tessellation.

The segmentation method prioritization depends on the cell stains present in the assay:

Assay1st priority2nd priority3rd priority
Atera Gene ExpressionInterior stain and expansionNuclear expansionN/A
Atera Gene Expression with optional Atera Cell Segmentation Staining ReagentsBoundary stainInterior stain and expansionNuclear expansion

Atera cell segmentation takes into account the 3D output from the DAPI image processing step for all Z-slices for better accuracy, as well as the 2D focus image outputs. The pipeline ultimately produces a flattened 2D segmentation mask for ease of use.

The nucleus boundaries are consolidated to form non-overlapping 2D objects when projected in X-Y. Since the segmentation mask is 2D, transcripts are assigned to 2D shapes based on their X and Y coordinates.

Nucleus and cell boundary polygons are provided in the outputs. They are approximations of the nucleus and cell segmentation masks and are used for efficient visualization of segmentation results in 10x Explorer and other analysis software.

Back to algorithms overview