Automated counting of cytosolic proteins in immunofluorescence images

Hello,
I’m trying to write a macro to count the number of positive cells to a specific cytosolic protein. I would like to know how many total cells there are and how many of these have the specific cytosolic protein. I did it for nucleic proteins but I don’t know how to do it for cytosolic proteins

Dear Sara1,

it would be great if you could post example images in order for the community to see what your problem looks like.

Also if you could briefly describe the existing analysis could help us to understand what you want to measure.

Cheers,
Christopher

CTRLPOS_20x_DAPI CTRLPOS_20x_EpCAM
Thank you for your answer. The blue image is a Dapi and the second one use EpCam, a cytosolic protein. I would like to know how many cell express the cytosolic protein.
I know I can measure the percentage of “green” area but I am interested in the number of cells.
I’m completely new to the world of image analysis and imageJ. I hope someone can give me an idea to continue my work

The main problem in your images will be to separate the individual cells.
For this I would segment or detect the nuclei and use them as seeds for a marker controlled watershed. Since you don’t have a channel that delineates the borders of the cells I would go for
Process > Find Maxima with the Segmented particles option based on the nuclei channel: https://imagej.nih.gov/ij/docs/guide/146-29.html#Flo:Maxima-outputs

The result is a binary mask and you can get the cells as ROIs then using the particle analyser: Analyze > Analyze particles: Add to ROI Manger.

Once you have generated the ROIs you could measure the intensity in your marker channel. Based on a “threshold” on what is defined a positive cell you can then count them. You can also subtract the area of the nucleus from the measurement using some tricks. But test if the segmentation is doable first.

You need to test how suitable this segmentation is for your analysis. This segmentation will not be perfect, so the cells will not be perfectly separated but for you it might be sufficient. You can always expand the segmentation with better algorithms but for this you might need to adjust your imaging approach.

Depending on how many images you have a manual analysis is also acceptable. As long as you always treat the images the same (brightness contrast) and have consistent criteria. For a manual counting I recommend to use the MTB Cell Counter: http://mitobo.informatik.uni-halle.de/index.php/Applications/MTBCellCounter

If you need more accurate results I would maybe also go for Flow Cytometry.

Thank you for your advice! I’ll follow them! :slight_smile:

Hi Sara

I have three versions for you.
In all three versions I would first perform a guassion smooth, this will help in the analysis.
38%20PM
Then identify daps nuclei with a shape oriented segmentation.
45%20PM

1st Type - Watersheld with a propagation (yellow positive cells)
07%20PM

2nd Type - Watershed using a distance matrix of 10px around the nucleus (red positive cells)
03%20PM

3rd Type - Expand nuclei objects until touching and measure the total object intensity and decide your own cutoff.
23%20PM

I hope these help. CellProfiler version 3.5.1 DAPI_EpCAM.cpproj (863.8 KB)

3 Likes

Thank you very much! it was exactly what i was searching for :smile:

Just a question, once I have the final image is there a way to count the number of yellow positive cells automatically?

After the segmentation I obtain this kind of image:

CTRLPOS_20x_DAPI.jpg Segmented.tif (4.7 MB)

Could you explain me better what you mean “Once you have generated the ROIs you could measure the intensity in your marker channel. Based on a “threshold” on what is defined a positive cell you can then count them”.
Thank you

Hi Sara1,

what you see is a binary mask. An 8 bit image with the grey value of 0 values representing the background (uninteresting) and the grey value of 255 representing the foreground, thus your cells.

In order to do measurements you need to now create defined and separated objects that the computer understands: Regions of Interest - ROIs. Thus you do a connected component analysis using the Analyze Particles plugin.

Perform on this masked image: Analyze > Analyze Particles

You can filter small objects or objects of odd shape using the Size and Circularity filter. Important is that you tick the “Add to Manager” box. Click “ok” to perform the connected component analysis. The computer looks now for foreground pixels that are connected to each other.

Then you have ROIs saved in the ROI Manager. These ROIs you can apply onto another channel and then you can perform measurements. Just click on the channel, Fiji performs analysis and processing always on the image that is currently in front (active image).

Define the measurements you want to perform:

Analyse > Set Measurements

Screenshot%20from%202019-05-13%2013-02-40

Then you can perform these on the measurement channel within each ROI by pressing:

ROI Manager > measure

You should get a result table with each ROI and the corresponding measurements

Hi Sara

Of course there is. Im going to assume you are very new to cell profiler, their website has some great tutorials. But I have edited my pipeline to be a fully functional automated version for all three types to give you counts.

Gaussian smooths DAPI and EpCAM. Then identified 447 nuclei.

1st Type - Watersheld with a propagation (yellow positive cells)
I identified the cytoplasm using watershed propagation with OTSU automatic threshold and then used this to identify thertiary objects. Because the watershed is not perfect I also filtered positive nuclei that had at least 2000 pixels of positive green which left 54 positive cells out of 457. Change the filtering to be more lease lenient depending on what you think are positive cells.

50%20AM

2nd Type - Watershed using a distance matrix of 10px around the nucleus (yellow positive cells)
Same premise, with a filtering of 500pixels, which left 67 positive cells out of 457. Change the filtering to be more lease lenient depending on what you think are positive cells.

11%20AM

3rd Type - Expand nuclei objects until touching and measure the total object intensity and decide your own cutoff. (yellow positive cells)
This option would be my last choice, I prefer the first or second to be the most accurate. This option requires you to decide what threshold, I choose 0.12. So for every cell I asked is the mean threshold of green greater than 0.12, if it is then I consider it a positive cells. This approach identified 49 positive cells out of 457. Change threshold to be more lease lenient.

19%20AM

The reason the first two options are more appropriate for you, is that you are really only asking a binary answer (yes/no) and that your cells are not a uniformed shape. These two also don’t rely on cell density and because of the automatic threshold calculations you are unbiased.

Best
Lee

DAPI_EpCAM.cpproj (883.1 KB)

2 Likes