Cell detection with DAB, hematoxylin and DAPI

Hi, I’m pretty new to IHC and I’m currently trying to analyze my data. I have brain tissue slides that have been stained with DAB and counterstained with DAPI or hematoxylin. I counterstained my slides with DAPI first and if DAPI did not work, I used hematoxylin. I’m trying to quantify the percentage of cells that are DAB-positive.

I tried using the positive cell detection in QuPath and it seemed to work fine with DAB/Hematoxylin, but did not work with DAB/DAPI.

I have QuPath and ImageJ installed, so if you have any suggestions/links on how to quantify DAB-positive cells in either software, that would be great.

DAB_DAPI.tiff (9.0 MB) DAB_hematoxylin.tiff (9.0 MB)

Hmm, your DAB-DAPI image seems to be flattened? I’m not sure if QuPath (or I) am opening it correclty, but it should be Brightfield + 1 fluorescent channel, right? I’m seeing it as a flattened RGB image, which mostly defeats the primary advantage of the DAPI channel.

*If nothing else, I’d use pairs of images, cell detection on the DAPI image, and then transfer the objects over to the brightfield image. It should be quite easy since the images are already aligned.

I noticed that when I tried to do cell detection on the DAB_DAPI image, it generated a 0% positive value…is that the same as a flattened image? I do have the brightfield and DAPI images saved separately. When you say transfer the objects to the brightfield, is that workaround the same idea as using positive cell detection?

Flattened meaning you have turned the gray scale DAPI image into blue… which mixes in with all of the brightfield colors. What that means practically is that segmentation of negative cells is easy, but positive staining will chop up your nuclei since the DAPI is now obscured.

If the DAPI is it’s own channel or image, the DAPI will not have the DAB in the way.

Notice what happened to the upper cell.

*I suspect if you were to hunt down that cell in the original DAPI image, it would be fairly clean and circular.

Two other issues you might be running into, depending on your file types:
The TIFF images you posted lack metadata, and the weird mix of DAPI+DAB resulted in my default import treating the image as if it was “Hematoxylin+Eosin”

  1. Without the pixel size metadata, you have to be very careful about your values in the cell detection. Most cells are between 10 and 400 um^2, but as far as pixels? That can vary all over the place depending on the size of the pixels.
  2. If the colors aren’t separated well, the cell detection and positivity detection won’t work at all. Using the 2 and 3 keys when in the Viewing window lets me see if my color separation is accurate.

More info on stain vectors:

I noticed that when I imported it, they do lack the metadata so I was trying to change the stain vectors to Hematoxylin and DAB, but it automatically generated the Hemotoxylin and Eosin labels.

I attached the DAPI image that’s associated with my flattened image and you’re right that the cell itself is circular and clean.
DAPI.tiff (3.0 MB)

So at this point, would it be best to do what you suggested and analyze the files separately, then transferring the objects to the brightfield?

I really appreciate your input!

Yes, it would require some scripting, but it wouldn’t be too difficult to pair images based on their names, and transfer the objects that way. There is a slightly more extreme example here:

But you could probably get away with simply:
Make one project with all of the DAPI images.
Run cell detections to generate objects
Export all of the objects to files with the same names as the corresponding brightfield images.
Import the objects into a second project with all of the brightfield images.
Classify based on the DAB signal within the cells using Add intensity features.

The exporting and importing part uses the same two scripts mentioned here:

The trick is making the file names match up, but I don’t know how your images are named. The two scripts will have to be modified, though, unless your DAPI and brightfield images have the exact same names.

With more scripting, you could make one giant project and search for all of the DAPI files, perform cell detections, and then find the paired image within the project to copy the cells to. I think the 2 project method is much cleaner, though, as it will keep you to one copy of results files within a project.

Great, thank you for the links! As for my images with hematoxylin and DAB, those are just fine with the positive cell detection, correct?

Not sure, really depends on the quality of the images and stains, shapes of the cells, whether the DAB is cytoplasmic or nuclear, etc.
The segmentation will always be better on the DAPI, but by selecting Optical Density rather than Hematoxylin during Cell detection, you can often make it work. I didn’t play around with that aspect of it.

Ok, thank you! Looks like I’ll just have to mess around with it.

Playing around with it a little bit, it doesn’t even look like most of your nuclei are too near the DAB staining.

Using subcellular detection to look at the DAB staining in your cells

And using the pixel classifiers to look at the staining outside the cell objects

And just for fun, highlighting cells that were not close to any of that external DAB stain. No particular reason.

Would you say that since the DAB and DAPI aren’t really close to each other that the staining is non-specific?

I have no idea what the staining is :slight_smile:
*supposed to be.

Or even the tissue, although the incredibly low cell density and round nuclei make me think liver.

Oops. :sweat_smile:

It’s brain tissue and I’m staining for NQO1. It seems strange though since the reference say the expression of NQO1 is relatively low in cerebral cortex, but DAB staining looks relatively high unless my understanding is incorrect (which it very well could be, lol).

1 Like

The staining intensity probably varies from antibody lot, fixation, AB concentration, etc. Assuming the negative control (secondary) was clean, it’s probably fine. Any isotype control?

It doesn’t look exactly like the stains in the link, but the Cell atlas indicates it should be cytoplasmic and not nuclear, so maybe not as weird as I thought if you are seeing extensions of 3 dimensional cells through your two dimensional image.

Using the interactive image alignment… I’m wondering if there is any chance the DAB is masking your DAPI emission.
50/50 DAPI grayscale and brightfield

It turns out that first set of images I generated showing the nuclei getting chopped up? That nucleus is also chopped up in the DAPI image.

I have a feeling the DAB is blocking the DAPI light. If you wanted to do something like this (and I think it’s a great idea!), you need to use some other chromogen, maybe a teal/green/red.

Yeah, I wasn’t thinking about using an isotype control, but I will add one in once my university opens back up.

I also believe the DAB is masking some of the DAPI, so I may try our red chromogen. We sometimes use these samples for RNAscope and if the RNAscope doesn’t find anything, we move onto using the slides for other projects.

1 Like