Use of classifier rules in Cellprofiler - problem

Hello,
I defined some rules to segment a specific type of cells using CPA using about 40 rules. I am able to detect the phenotype that I want in cellprofiler analyst. However when I use these rules in cellprofiler to filter an object, it does not do a good job, there are a lot of cells that I would like to be negative (false-positive). Then I go back to cellprofiler analyst and try to fetch these false-positive cells (to put them in the negative bin) but it does not return them back to me. In brief, it looks like cellprofiler does not use the rules defined by cellprofiler analyst very well because there are some discrepancies between the positive cells returned by both programs on the same image.
What should I do?
Thanks,

Hugues, LSU-SVM

Hi,

We’re not clear exactly where your problem lies. Let’s first make sure that CPA is working well enough for you.

Once you Find Rules on your training set, and then Fetch Negative and/or Positive objects, does the classifier return decent results? i.e. is the false negative and false positive rate sufficiently low? Basically, you need to be very sure that the classifier works across your whole data set.

[quote]Then I go back to cellprofiler analyst and try to fetch these false-positive cells (to put them in the negative bin) but it does not return them back to me
[/quote]

Note that fetching cells from the negative bin returns a random sampling of objects that the classifier currently assesses as negative. Are you expecting that it will return particular cells? You can choose a particular image (if you know its ImageNumber) and drag particular cells into the negative bin if you like.
Or in CP you can, in Test Mode, choose a particular image set which you know you have classified some cells for and look at CP’s FilterObjects output for that particular image.

** NOTE though**, just because a particular object was placed in, say, the negative bin, once the rules are applied, it is possible that it could be classified as positive, depending on how hard your classification is and how close the cell lies to the classifier’s decision boundary.

In general, please note that CP’s FilterObjects simply uses CPA’s rules as a sort of specialized filter, and that the interplay between the two software packages is almost all from CP -> CPA, except for this singular case where rules can be fed back into FilterObjects.

Does this help?
-David

Thanks David for your quick reply,
CPA seems to be working pretty good, I have low false positive and false negative rates with both bins.
When I use the rules that I made with CPA on cellprofiler for filtering an object, I can see the false-positive objects on the output window. I then try to fetch those false-positive cells with CPA using the image number but it does return me only true-positive objects even though I know they are false-positive cells from running cellprofiler in step mode for that particular image. Hope my explanations are understandable.
I am trying to develop a methodology for automatizing CBC in birds using image cytometry because laboratory analyzers cannot do that because avian red blood cells are nucleated. Image cytometry using cellprofiler and CPA have the potentials to significantly improve and change the field of hematology in pet and wild birds in my opinion (and I am thankful for these open-source softwares). I got 50 blood smears that I scanned with a nanozoomer (0.23 µm/pixel) and I segmented the red blood cells pretty well using a combination of CPA and cellprofiler. It becomes quite difficult for the white blood cells because they have a very variable “digital” phenotype depending on staining variation, diseases of the birds, and the species. I did all measurements possible and exported it to CPA with the hope that I could segment these different types of cells with high-throughput analysis. I feel I am almost there but get stuck on segmenting the different white blood cells. I am trying to segment them using about 40 rules as recommended in one of your paper to differentiate complex cell phenotypes. The method worked very well for red blood cells so far.
I am trying a different pipeline strategy to define other kind of rules and see if the problem persists.
Thanks a lot,
Hugues, LSU-SVM

I actually forgot to mention something. The pipeline on my last runs did not finish correctly because I got a memory error at 3500 images (out of 4500). Since the database file exported from CellProfiler was there, I just wrote a CPA properties file to use that database anyway. Maybe there is something wrong with the databases when CellProfiler does not finish a pipeline properly (maybe the cells that appear on CPA are classified on measurements obtained on other cells like some measures are shifted).
Since I cannot get this run done on 5000 images with several computers I have tried, I decided to reduce the number of images and try again. Maybe if the pipeline finished properly, the rules I get from CPA with that exported database will work better.
Is that possible?
Thanks for your help,

Hugues, LSU-SVM

While I’m not the best person to answer questions about the filterobjects module in CellProfiler, I’ve talked with some people in the group and they do use it and can testify that it works as it says it does. Looking at the code now, I can tell you that it’s definitely not possible for measures to get shifted because the measurements stored in the rules are matched to the measurements taken in CP based on their names. However, if you change your pipeline at all, then there’s obviously no guarantee that the rules will apply the same.

This is tough for us to help you with unless you can send us something that will allow us to reproduce what you’re seeing (ie: a pipeline, image, and a rule set).