Labels cells and QCs segmentation by looking at the image with masks overlaid. Why this step matters: annotation is the bridge between the raw pixel image and the single-cell table, and it is the only QC step that can catch the segmentation, spillover, and morphology artifacts that summary statistics on the cell table structurally cannot show. Manual labels are not ground truth (expert-vs-expert concordance is only ~86%), and the display contrast limit is a positivity threshold in disguise.
pip install napari napari-imc scikit-learn numpy
# GUI backend
pip install pyqt5
# R viewers (optional): BiocManager::install(c('cytomapper', 'cytoviewer'))
# Mantis Viewer is a separate Electron app (CANDELbio / Parker Institute)
Tell your AI agent what you want to do: - "Open my .mcd in napari with the segmentation mask overlaid" - "Paint my clusters back onto the tissue and tell me which are artifacts" - "Build a class-balanced training set across my patients" - "Set up per-cell type annotation with fixed contrast limits" - "Check whether my CD3+CD20+ cells are merged segments on the image"
"Load this .mcd and the cell mask in napari, overlay outlines on DNA and a summed membrane channel, and fix the contrast so positivity is consistent."
"Color my masks by Leiden cluster and tell me which clusters scatter as salt-and-pepper haze along boundaries -- those are the artifact clusters."
"I need to train CellSighter. How many cells per class should I label, how do I handle my rare tumor population, and across how many patients?"
"Overlay the mask and the CD3 and CD20 channels on my suspected double-positive cells and tell me if the two signals come from two abutting nuclei."
.mcd with napari-imc and overlay mask outlines on nuclear + summed-membrane channels at fixed contrast limits..mcd; install the napari-imc plugin.