QuPath 0.2.0-m4- Subcellular particle analysis

Hi all,

I have images with 3 different channels:

  1. DAPI (nucleus)
  2. subcellular marker
  3. neuronal marker.

I was wondering if it’s possible to analyze channel 2 within channel 3, excluding channel 1. I guess I would need to first segment (how?) the channel 3 and then run the cell detection tool for channel 2?


The pixel classifier might be your best bet in M5. Or the threshold tool (same menu with the pixel classifier).

I don’t think QuPath is generally cut out for neuronal detection (dendrites?), and you may have better luck with CellProfiler for cell by cell analysis. But if you want to post a picture, I might be able to give a more specific answer. It would also depend on how large the image is (there are various ways to abuse the subcellular detection tool).

I haven’t tried these new tools, is there any trial to learn how to use them?

Here’s a representative picture and the colors are:

  • WHITE: subcellular particles to analyze
  • GREEN: astrocytes
  • RED: neurons

My aim is to analyze particles in neurons vs astrocytes. It’s hard to see neurites here (probably because of thigh density of neural network), the red is pretty much everywhere with a much fainter staining where astroctyes are. There must be a way to separate the 2 by thresholding.

Please let me know if anything is unclear. Thanks!

If your image is that small, you could probably use the “convert a whole image annotation into a cell and generate subcellular objects method.”
Roughly described here, though I think any code is for 0.1.3.
Once you have objects for your Red and White channels, you can convert them into annotations and AND them through the context menu Annotations->Intersect selected annotations.
Or simply create Subcellular detections for the white objects, and classify them by the intensity of red or green within them.

On the other hand, you might find it more straightforward, depending on the number of images, to use the Simple Threshold tool in M5. No guide on this yet, but short version…

Pick a channel

Verify the mask is what you want. Turn the mask on and off using the poorly circled C button.

Create Objects

Now that I have a Tumor object, I can go ahead and make another annotation for my CD8 positive objects.

Selecting both of these annotations through the Annotations tab, and then right clicking on one in the Viewer window, I can then choose the Annotations->Intersect selected annotations and get just the CD8 area inside of the Tumor area.

This process can take a moment, just let it struggle.
In the end, the overlapping area as annotations:

1 Like

Even better, it looks like you can save the simple threshold as a classifier and run it as a script thanks to @dstevens

I have occasionally gotten the Save model window stuck behind the model window at times, though.

1 Like

Thanks for the instructions. The image I have posted is just a inset. My images are huge (over 300 MB) so I probably won’t be able to use the “convert a whole image annotation into a cell and generate subcellular objects method”.

I have tried using the Classify with simple thresholder but there might be some bug in the 0.2.0. I have selected the FITC channel and ignored everything below the threshold but I get weird images like the one below (attached) no matter what threshold I select. Please let me know if you have any advice on this.

This is a great idea and I think it will do the job.

Thanks! :blush:

You are using M4, where neither the pixel classifier nor the thresholding tool were fully functional.

If you really want to stick with M4, you might be able to create the whole image annotation, split that up into tiles, and then convert each tile into a cell, and run subcellular detection on the “cell tiles,” though you will potentially chop up some of your white objects between cells.

As mentioned in your first post, you could also try treating the white objects as your nuclei, and then classify the resulting cells based on their green or red channel intensities. It will somewhat depend on how roundish and how evenly sized your white spots are, though. The thresholding tool is a bit less sensitive to size variation.

You can also use the thresholding tool in one step to generate white detections (rather than annotations) and use Add Intensity Features to add the mean intensity for your other channels. The objects can then be classified by those intensities. I may need to edit some of the classification scripts for M5, though, so let me know how it is working (or not) if you choose to do that.