CellProfiler Analyst failure to locate modified object

Hello Everyone,

I am facing this issue where my primary identified objects, which are further merged to new bigger objects are not located by cellprofiler analyst classifier.

In the “exporttodatabase” module, I indicated the new objects be used for locations. Still, when I fetch objects in the classifier, it fails to fetch all modified objects, and clicking on empty objects shows error, “Failed to load coordinates for object key ImageNumber1”. It appears that either it still uses primary objects for coordinates or probably the lots of “None” in the Per_Object table rows corresponding to the new objects are causing this issue.

I added “Relateobject” module and indicating in “Exportotdatabse” module that related objects should be taken for location. This solves the error but objects loaded in classifier are not the merged ones but rather primary children objects only.

I also tried removing extra rows from the Per_Object table that have None but that also did not work.

Am I missing something important needed for the Classifier to pick new object cordinates?

Thanks for any suggestions to this frustrating issue,

Hi @vp21,

Based on what you’ve described, it seems likely that this error arises due to the parent and child objects not being in a 1:1 relationship but the data being contained within the same table (resulting in empty rows).

In order to avoid these errors, the data for each object must be contained within its own table. You can select this option in the ExportToDatabase module under “Create one table per object, a single object, or a single object view” - you want “One table per object type.”

If this solution doesn’t help, we’d be happy to take a look at an example pipeline and image that leads to these errors.


Hi Pearl,

Thanks for the suggestion. I tried “One table per object type” as you suggested, then opened .properties file of final merged object, unfortunately the error still persists.

Based on the direction of your suggestion, I also tried “export measurements for only the final merged object”, but the error stil persists. The classifier and image viewer still has objects with no coordinates, with the error (attached).

I will be happy to send an example pipeline with an image set right away.

Thanks and best,

[Note - I’m reposting this direct message from January 29, 2021 so that others can learn from the solution]:

I was able to reproduce your error in CellProfiler version 3.1.9. I think what was happening is that the ExpandOrShrinkObjects module was shrinking some objects to an area of 0, but the objects were being retained in the data table and CPA can’t display anything that has an area of 0 – hence the error.

When running this same pipeline in CellProfiler version 4.0.7, no objects with an area of 0 are exported and CPA doesn’t throw any errors. If you’d like to switch your pipeline to CP4.0.7, you can download the latest version here: Download | CellProfiler. Note that for your pipeline in particular, you’ll need to delete the LoadImages module (it’s not available in CP4) and then export the pipeline from CP3. You should be able to load that pipeline into CP4 without error at that point. If you can, I’d encourage you to switch to CP4, since there are new features, it’s faster, and bugs have been fixed compared to CP3. For loading images, I used these rules:

If you need to continue using your current version of CP, then you could add a FilterObjects module after your measurements modules to filter the result of your ExpandOrShrinkObjects module to exclude anything with an area of 0. Exporting those filtered objects to the database should work by my tests.

Hope this helps!