Quantify contact between two types of cells (red and green)


First, I would like to thank you for this nice software and ask for your kind help.

I am studying Horizontal Gene Trasfer. I have managed easily to create a pipeline to count cells ( donors in red, recipients in yellow and transconjugant both green and yellow). I would like to have your opinion in 2 different kind of analysis, considering I am producing time series containing images as the attached one:

Can we track a single object along a movie? if so, could you suggest me how?

Can we count only the number of red cells which are in contact with green or yellow cells? no clue either how to get started.

Finally, I would also like to use the orientation data available for the individual objects. However, I am just obtaining values like 2*1000 etc. which make no sense for an angle, althought number of cells and other results seems to make sense.Any idea about what could be wrong?

Thans a lot,


Hi Jose,

Answers to your questions follow:

Have a look at the TrackObjects module in the Measurement category. This allows you to track a set of objects according to a variety of measures; we find tracking by “Overlap” works well if the cells aren’t jumping around too much. However, at this point, we don’t a record of splits or merges (but we’re working on it). Also, any tracking algorithm relies on the objects being accurately identified beforehand. Your images look grainy so be attentive to good object segmentation.

If you are able to distinguish the red vs. green/yellow cells (i.e., you have identified separate objects for each label), you can try the following:

  • ExpandOrShrink: Expand the green/yellow objects by a couple of pixels for the next step

  • Relate: This module establishes a relationship between “children” objects and the “parent” objects that contain them. In this case, an object is a child of another even if it’s not fully enclosed but only overlaps by some amount. So set the green/yellow objects as the children and the red objects as the parents, and this will establish which green/yellow objects are partly in contact with the red ones. The expansion in the previous step insures that contact is made, if not already.

  • ClassifyObjects: Set teh red objects as the objects to classify, “Children” as the measurement and “1” as the feature (this is the child count, an undocumented feature). Set the bin type as “Custon-defined”, the bin value as 0.5, and names as “NoContact,Contact” (or something similar). What this will do is classify the red objects on the basis of whether they have zero children (i.e, no neighbors) or more (contacting neighbors).

  • ExportToExcel: If you export “Image” and look at the resultant file, you will see a column named “ClassifyObjects_ContactObjectsPerBin” (if you used the nomenclature above); this has the number of red objects that had a yellow/green neighbor.

I’m not sure about this one. With the image file you sent, I seem to get values that look normal. What version of CelProfiler are you using?

Hope this helps!

Hi Mark!

Than you for your rapid answer, it was really helpful!

Regarding the orientation, I have attached the image and results obtained from a pipeline like this but I don’t know how to interprete them…(probably is just a rookie question but I don’t figure this out :confused: )

Load images- Id prim autom (manual treshold)-Measure object area shape-measure image area-overlay outputs-export to excel


Hmmm, I’ll have to look further. But in reference to my prior post, finding out what version of CellProfiler you’re using would be helpful. You can find that by going to Help > Getting Started and providing the number next to “CellProfiler version”.

Hi Mark,

Sorry, i completely forgot to include that in y previos post. The version number is 1.0.5811 (the last one I presume because I have just downloaded it a few days ago). i have also used a manual selection of the cells (with the point in the middle) just to help the identification of every cell as much as possible, but that did not change anything.

Thank you very much for your help and fo this nice work you are doing here.

Have a nice weekend,


The latest version is actually 1.0.7522, which you can get from the download page. I’m not sure if it will solve the problem, but it can’t hurt to have the most recent installation.


Hi Mark,

Just to let you know that the latest version has no solved the problem. I have been able to reproduce it also in a different computer.

Thank you very much one more time for your help and time.