Measurement module, percentage of cells

I started using/learning CellProfiler just a few days ago. My goal is to calculate the percentage of cells that stain positively (above a set threshold) for a nuclear protein.
I managed to make a pipeline until IdentifySecondaryObjects. Now, I tried to use Measurement modules to calculate the intensity of staining, and based on that the percentage of cells that display staining above certain threshold, but I did not succeed so far. In this image, 3 cells exhibit distinct staining from other cells, and I would like to reach the result of 23% of cells as positive for this nuclear protein.

Please find attached the image and the pipeline. I would appreciate help on using the measurement module to perform these calculations.
FB421_test.cp (5.68 KB)

Hi Kirsti,

Assuming that your protein of choice is strictly localized to the nucleus (which it appears to be?), then you don’t need IdentifySecondary in your pipeline; you can just measure the protein from the nuclei objects directly.

I suggest the following:

  • In the MeasureObjectIntensity module: Set the image to measure from as “Protein” and the objects to measure from as “Nuclei”
  • Add a DisplayDataOnImage module: Set the object to be shown as “Nuclei”, category as “Intensity”, measurement as “MeanIntensity” and image as “Protein”. Pick the protein image to display the measurements on, and the resultant image will show the per-nuclei mean intensity value displayed on each nucleus. This is a good way to visually confirm what the cutoff value should be.
  • Add a ClassifyObjects module: Set the object to be classified as “Nuclei”, category as “Intensity”, measurement as “MeanIntensity” and image as “Protein”. Set bin spacing to “Custom-defined bins” and enter your cutoff value. Check both the “Use a bin for objects…” boxes.

The result of the ClassifyObjects module will be per-image percentage of nuclei that fall above and below your chosen threshold. You may also want to confirm whether you to include objects that touch the image edge in IdentifyPrimaryObjects; typically, it’s best not to include partial objects in your downstream analysis.


Thank you.
Your suggestion not to include IdentifySecondary and add DisplayDataOnImage improved the pipeline I had created (using ClassifyObjects) greatly.