Help with child objects


I’d be grateful for your advice please (I’ve just started using CellProfiler)
I would like to be able to identify with an image the proportion of macrophage cytoplasm occupied by carbon after phagocytosis. ie. we feed the macrophages carbon, then take pictures.
I have a pipeline which identifies cells, and identifies carbon. I use IdentifyPrimAutomatic, then Relate the two. The child objects are carbon clumps, and the parent objects are cells. I can output this to Excel or SQL. Excel gives me two object tables (cells and carbon). SQL shows only one (cells), and I cannot find a table related to carbon.
I would like to calculate the sum total of area of carbon clumps, and divide this into cytoplasmic area, giving a per-cell output.
So I have two problems:

  1. I cannot find the column in the Excel file which identifies “this carbon belongs to this cell”- does it exist?
  2. A missing table in SQL file (child objects)

I’m using CellProfiler version 1.0.7522 on Windows Vista.
Pipeline is attached with a single image.

Many thanks in advance for your help. (1.46 KB)



To answer your questions:

(1) In the Excel spreadsheet for the Carbon objects, there is a column with the name Parent_Cells. This indicates which number Cell is the parent of the carbon object in that row (carbon objects with no parents have a value of 0 for this column). Also, in the Cell spreadsheet, there is a column with name Children_Carbon_Count, which indicates the number of carbon objects per cell.

(2) Since the number of children objects may vary from parent to parent, we had chosen not to export the child measurements. This is because this could lead to columns containing the child measurements of differing lengths in a single a per-object table. We recognize that this is sub-optimal and we are relaxing this restriction in the next release. In the meantime, if you are running the developer’s version, I can indicate which lines in the code to change to restore those objects.

Hope this helps!


Thanks very much for your help.
Could you please tell me the source code changes to allow export of child measurements, and I will make changes to the developer version with Matlab?



In the file CPconvertSQL.m in the CPsubfunctions directory, change lines 40 and 337 from:


In other words, remove the SubObjectFlag part.

Let us know if this doesn’t work.


I’ve done this, and it seems to work. The SQL output now has a single per_object table which contains info related to parent and child objects.
Is there a way of outputting two tables rather than just the one ie. parent objects table and child objects table which can then be linked by the _Parent_Cells column number?


Unfortunately, at this point no. However, we plan on having this option in the upcoming release of the Python-based CellProfiler 2.0.