Objects within objects


I want to use CPA to classify autophagic and normal cells that have been stained with LC3B immunostaining. This procedure results in apparition of small bright dots in the cytoplasm of autophagic cells and homogenous staining in normal cells (image sample in attachment). In my CP pipeline, I identified nucleus and cytoplasm with IdentifyPrimary and Secondary objects. After image processing, I identify autophagosomes (small bright dots in autophagic cells) with IdentifyPrimaryObjects. Then, I relate autophagosomes with cytoplasm objects as I am only interested in autophagosomes detected inside cells (CP pipeline in attachment).

With this method, I have different issues when I try to use CPA. Images are not loaded when I fetch the classifier, sometimes one or two cells are loaded but after the classifier stops loading images. When I use ImageViewer tool, the image loads correctly but when I click on the image to select an object CPA bugs and I have to quit the program.

I think the problem might append due to different number of autophagosomes and cells in an image. In fact, I looked at the SQLite database and when there are more cells than autophagosomes in an image, the autophagosomes measurements are filled with “None” and vice-versa (database printscreens in attachment). Maybe this non-numeric values are causing the bug. Is there a way to tell CP that autophagosomes are not really primary objects but that they’re link to cytoplasm?

Do you have a solution to this problem?

I have also an other small issue that has nothing to do with the previous described. When I use the classifier, I’m not able to fetch cells of a specific class after finding rules. The classifier says that it didn’t find any cells of this class after 10013 attempts, I am only able to fetch random cells. However when I score all, the classification seems to append correctly. Do you know where this problem comes from?

Thank you!

Attachment.zip (5.85 MB)

Hi Julien,

First, let me ask you: In ExportToDatabase within CP, is the setting “Create one table…” set to “Single object table”? If so, then much of your problem will be solved by changing the setting to “One table per object type”. If not, then we can look into this further.
So, here’s why:
Objects with a variable number of “child” objects are not well handled by a flat, single table database. Each row corresponds to a single object’s measurements, but if there is not a one-to-one relationship (e.g. more children than parents), then some rows will have empty values. You can deal with this on the database side manually, but we instituted a simpler solution and that is to output multiple object tables.

For your second question, this could happen if you are classifying a very rare phenotype. Try a random assortment of 10 objects in each of 2 bins, and see if this is still the case. If so:

  • Which version of CPA are you using? Latest compiled from the website, 10530?
  • Does this behavior occur with the example CPA database? cellprofiler.org/examples.shtml#cpa_examples
    If you are still having trouble, post your properties file.