NULL values in per_object

hi guys,
I have a pipeline involving two IdentifyPrimaryObjects modules, first to identify nuclei, second to identify nuclear foci.
I use the current version (r11710) on Win64.
After ExportToDatabase (MySQL / CSV) the per_object table holds NULL values.
What could be the reason for this?
What do you recommend for importing the data to mySQL (and to use CPA)? since now mySQL gives me an error. I use the SQL_SETUP file.




pipeline NULL values in per object.cp (14 KB)

Hi Jonathan,

The reason you are getting NULLs is that you are storing measurements between objects that do not have a one-to-one relationship, in this case, Nuclei vs. Masked_eu vs. exp_het.

If you had made measurements from het, exp_het and eu and saved only those to the database, you would not have NULLs since for every one het object, there is only one corresponding exp_het object and one corresponding eu object. This is the case with primary, secondary and terirary objects, or other objects created by module which change an object shape but neither create nor destroy object labels.

In this case, het objects are identified as a completely distinct set of objects from Nuclei, so there is no correspondence between them. Furthermore, MaskObjects creates another distinct set of objects from eu, so there is no correspodence there either. Measurements are then made on all of these and saved to the database.

The reason this procedure is creating NULLS so that only one object is stored per row in the per-object table, for all objects. If there are N members of Object 1 and M members of Object 2, where N > M, there will be M rows total to store all of Object 1 and 2, with NULLs filling in the (M-N) rows where Object 1 is not represented.

There are two possible workarounds:

  • If using “Single object table” in ExportToDatabase for the “Create one table per object or a single object table?” setting, select “Select…” for the “Export measurements for all objects…” and select only the objects that are one-to-one.
  • Select “One table per object type” for the “Create one table per object or a single object table?” setting. This will create a separate per-object table for each object.There will not be any NULLs but this leaves it to the user to establish the relationships between objects as a separate task outside of CellProfiler.

Regards,
-Mark