Distinguish red AP-Polymer stain in brown pigmented tumor

Dear QuPath users. I am very new in QuPath and haven’t found a solution on my problem, which is why I am adressing you. Any help is very appreciated :slight_smile:

In my lab, we stain our melanoma tumor tissue from paraffin blocks by using a pink-reddish AP-Polymer. We do this, as every now and then melanotic tumors can be quite pigmented and thus, a distinction between positively stained cells and pigmented cells would be difficult with DAB in brightfield scans.

So far, I’ve been successful to find positively red-stained cells, by thresholding the DAB intensity in non-pigmented tumor samples. But:

Is there a way, to distinguish red and brown and select only for strongly red cells in qupath? Or do you have any suggestions on alternatives?

I thank you already in advance for your help and kind regards

I would recommend you to segment the image and then create a detection classifier and train the classifier with points for positive red cells, pigmented false positive cells and negative cells.

I’ve added the ‘qupath’ tag to this post to help other QuPath users see it.
@Cwiss If you are able to post an example image or screenshot that would be helpful to get more suggestions.

1 Like

If I specifically want a color of cell vs another color, and I don’t care about the actual measurements, I usually create color vectors in one of the standard image types, and then switch to Brightfield Other and use the two color vectors there. Or if you have good measurements for a single signal, you can get color vectors using the ROI method from Pete’s videos.

Then you can use Add Intensity Features to create new measurements in each object with the new color vectors, and those should allow you to distinguish between objects.

You might be able to get away with using Red Green and Blue in Add Intensity Features without playing with the color vectors as well, if you can find good thresholds. Something like if Red > X and Green < Y. Note that depending on version, add intensity features may only generate whole cell measurements. I have a script that takes in various color vectors and generates mean OD for a variety of color vectors which I found very useful for brightfield multiplex. Haven’t tested it on new versions of QuPath, though, and it is probably broken due to scripting changes :slight_smile:

We do IHC on melanomas and deal with the same issue. A few things you may want to consider:

You may be doing this already, but we bleach our sections before staining to remove melanin pigment. It removes all pigment in lightly and moderately pigmented tumors. Some pigment remains in heavily pigmented melanomas, but it still helps a lot in those tumors. The bleaching does not interfere with IHC for the antibodies we used, but you would have to confirm this with your antibodies.

DAB is our routine chromogen, but for melanomas we use a red chromogen as you do (AEC or Fast red). As @Research_Associate said, you will first need to define color vectors in Qupath. However, brown and red being not that far apart, you may not be able to completely separate them by deconvolution. How well this works will depend on your particular slides. If you try and are not happy with the results, you could consider trying a different chromogen, such as blue or green.

2 Likes