QuPath (0.2.0-m9) multiplex classifier classes

Hi,
I am using the QuPath v0.2.0-m9 and trying the new multiplex classifier to analyze 4 channel image. After cell detection based on DAPI channel, I have trained the classifier for each of the three channels separately. Then I combined the three classifiers to get different cell phenotypes in the image.
I have a question regarding the class names. I got the following detections;

Screen Shot 2020-03-06 at 11.27.04 AM

Class name “Ignore” comes with all the detections in all single and double positive detections as shown in the image above (eg, Env: Ignore or Env:CD3:Ignore) and below;

Let me know, if I did something wrong during building the classifiers or the classifications will be like this.
Thanks.

That looks pretty standard if you chose Ignore as your negative class for each of the individual classifiers. If you wanted to simply have the shown cell classified as “CD3,” leave the “Below threshold” blank.


At the moment I have been using a script to reassign all “null” classifications to “Negative” or ignore (if you create the classifier as shown above, all negative cells will end up unclassified)… I’m not sure if there is an easy way within the complex classifier to make unassigned cells Negative without scripting (or Ignore, in your case). I missed that part of the workshop, unfortunately.

Maybe @petebankhead or @melvingelbard will have a more useful answer.

The asterisk is important: it should be Ignore*

That doesn’t change the result for me, though.
image
In case it is useful, this is how the dialog looked that ended up with that result after complex classifier creation.

The original post mentions ‘train’, so I presume Train object classifier is used. Then Ignore* has the right effect.

If you explicitly choose the Ignore* class with Create single measurement classifier then that’s what you get. But if you leave it blank or select Unclassified then the behavior differs.

The reason is that training always requires some kind of classification for an object to contribute (otherwise any unclassified annotation might wreak havoc).

1 Like

I had actually never even considered merging Train object classifier… classifiers! I have always been basing phenotypes off of single channel measurements in IF. That does open up some interesting possibilities for brightfield images though. Just not seeing very many of those these days :slight_smile:

@Research_Associate it’s all in the docs :slight_smile: https://qupath.readthedocs.io/en/latest/docs/tutorials/multiplex_analysis.html#train-save-classifiers

1 Like

@petebankhead and @Research_Associate
I am using the fluorescent images for analysis as shown in the above examples. I am using the new “train object classifier” and use both points tool and brush to train the classifier.

@shoaib.arif I understand, do my answers solve the problem or not?

Note that I really wouldn’t advise having so many Ignore* samples relative to the small number of positive samples. The pie chart is there to show the relative balance, and it is generally better to try to keep the numbers of each roughly similar. This may be easier if you use the points tool only.

I admit, I’ve been more of a qupath.skimthedocs kinda guy recently :frowning:

Thanks @petebankhead… I will train the classifier again and will update if it solve the problem.
Just confirming that in the new “train object classifier” you can update the classifier later?
Thanks.

No, you can only rebuild a new classifier - but with the same initial training data if you want, and you have have saved your data files (i.e. annotations, in the normal way you save image data when working in a project).

And now that I have, I realized .splitNames would have saved me some headaches with regex and .trim.

If I understood correctly.
I can save the points (from points tool) for each classifier and load again in the same image and add more data to it and rebuild the classifier?

1 Like

@shoaib.arif - exactly, that’s correct.

*Both the classifier and the complex classifier, I think. Just to make sure :slight_smile:

Perfect…that will be really helpful…
I missed this little info in the San Diego workshop. I thought, I will have to build a classifier from scratch every time.
Thanks again.

1 Like

@Research_Associate… for the multiplex classifier, I am training classifiers for each channel separately… so I think if you update each classifier separately then you will be able to combine them again for a complex classification.

2 Likes

Yes, and you can save multiple versions of each classifier (e.g. CD8) in the project and decide later which you want to use. Sometimes I create both a trained and a ‘single measurement’ classifier, and then I can try combining both when making the composite classifier.

1 Like

Yep, just wanted to make sure the last step to recombine them was taken :slight_smile: