CellProfiler to CellProfilerAnalyst

Hi, I have not used CellProfiler much before. However I have managed to find the objects I want in my image (Cells and nuclei). Now I want to train the classifier in CellProfilerAnalyst to count the cells which have more than three nuceli.

I have struggled with getting CPA to work as I would like. In CP I have done a lot of measurements of my objects. I also here make the properties file for CPA and the database file. When I open CPA I chose the properties file that I have just created. When I open the classifier tool and select Fetch 20 random objects, it does fetch 20 objects. However, all of the images of the individual fetched objects does not appear in the unclassified area. They only appear as black squares. When I try to open the whole image for that object I get an error message.


When I check the table they ask for, and look for coordinated to the Cell locations, I see that some of the does not have coordinates:


I don’t understand why CP can’t find a location for some of the cell objects?
I also see that these cells (without location) has no children (Nuclei), described as None. However another cell with location, has 0 children :

When I check the PerObject table I see that I have many cell objects without location. In total I have 2157 cell objects, but only 1507 of them have a location.

Is there a way to remove these cell objects without location? Or is there a way to find their location? When I get the coordinates for the cell objects into CPA, I can distinguish the objects myself with the classifier tool, and put the nuclei-less objects in the negative area :slight_smile: Might it be that I need to improve IdentifyPrimaryObjects of the Cells in CP?

Thank you for advise! Let me know if you want me to send some files or images :slight_smile:

Just to check before we start fiddling with CPA files - did you export a table of just the cells, or did you export a combined object table in which there are also nuclei? If you chose the latter you may instead find measurements for nuclei position rather than cell position.

Previously I exported a combined object table, with both cells and nuclei. I have tried now to export separate tables for both objects and that works. It might be that the program had some error as the cell objects and the nuclei objects are not equal in number. Thank you!

I now ended up with 3 different properties files, and chose the one for the cell objects. After assigning objects into the correct categories for some time, I trained the classifier once and got 5 rules. I then wanted to use the classifier to find positive objects, but then I get this error:
What is the problem here?

I also have another question: When I open the large image to see where one cell object is located in the image. Is there a way for CPA to immediately jump to its location, or do I always have to move around in the image (scroll) and search for the cell marked with a square myself? :slight_smile:

Could I check which classifier type you’re using? Trying ‘fast gentle boosting’ might be a work around for this kind of error.

Unfortunately there’s no way to jump to a location in the current versions of CPA. That might be a good idea for a feature to add in the future though!

Thank you! That worked nicely! :slight_smile:

I was wondering something else too. When the classifier finds 20 new cell object in the image, a small image of the cell objects chosen shows up in the unclassified window. As my cell objects vary a lot in size, I often do not see the whole cell in the small image of the cell object. Is there a way to adjust the size of this small window to fit the object it is showing? Or to in general increase the size of this small window for all cell object?

Unfortunately I don’t think it’s possible to change the thumbnail size at this point in time, but you can make the individual thumbnails a bit bigger using the image controls screen accessed from the top menu. Hopefully that might help a little.

Edit: Apparently there is indeed a way! Thanks to @lmurphy

Hi @tonjenedal,

I have to do this quite often, try opening your properties file in a text editor, scrolling down till you find the tile size and increasing the number found there. Then save the properties file and reopen and see if that solves your issue.

==== Other ====

Specify the approximate diameter of your objects in pixels here.

image_tile_size = 50

1 Like