Identifying triple overlap between objects

cellprofiler

#1

Hello,

I have three channels (A, B, C), each a different color. I’m interested in identifying all A objects that also contact/overlap with B and C, i.e., a triple comparison. I’ve detected objects separately on each channel and have no difficulty comparing two channels (e.g. A to B, B to C, etc) using the “relate objects” module but it’s not clear how I can compare all three channels. Mainly, I’d like to know of all the A objects that contact/overlap B, how many of these also contact/overlap C.

In the relate objects image window, it shows me all the A objects that contact B. If I could somehow rename this subset of objects and point to them, I could perhaps relate them to C.

Here is the biology if anyone is interested… A=postsynaptic protein (some contained within B), B= cell plasma membrane protein (outline of cell), C=presynaptic protein (some contacting A). I want to find the postsynaptic proteins (A) within a cell’s membrane (B), that receive presynaptic input (contact or overlap with C).

Any help would be much appreciated. I love this software but am a total newb!

Cheers


#2

Hi @Steve1,

I’m not familiar with the relate objects module, but if you have the objects as thresholdable images in an image, convert that image to a stack, appropriately threshold the whole stack (pixels in 3 channels each become 0 for background or 255 for object), divide by 255 so object pixels become grey value 1 and z-project the stack with adding slices so 0 means no object and 3 means all 3 objects are present in a pixel, then convert to 8-bit, then apply a proper LUT. See this posting.


#3

That’s clever. Thanks for the idea elijonco, but because I’m looking for adjacent (juxtapose or contact) areas in some cases (i.e., things that don’t necessarily overlap) I don’t think this method would be ideal for me. The relate objects module seems perfect but I can’t find a way to compare more than two sets of objects. There must be a way to compare three.

Anyone know how to call up the subset of parent/child objects in the “relate objects” module?

Any help would be greatly appreciated.

Thanks


#4

Hi Steve,

A possibility might be too use one or a couple of FilterObjects modules. Using this you can filter based on the number of child objects a parent object has (i.e at least one). So if you do that between your first two object sets and then do another RelateObjects for your filtered set and the remaining third set of objects?

You might need a couple of to cover all the overlapping scenarios though.

Hope that helps,
Laura


#5

Thanks Laura,

This looks like exactly like what I’m looking for! After attempting, I’m not sure I’m running the “FilterObjects” module correctly. I either filter no objects or all objects but one… I know this isn’t correct because if I relate the two objects it shows hundreds of children.

Right now I have one merged object which is a single cell’s plasma membrane (“green”). The other objects are synapses (“red”), only some contact my cell’s plasma membrane. I want to create a subclass of red objects that only contact green.

Which setting should I use for the “select filtering method” to select objects that have 1 or more child?

In the filter objects module I’m selecting the red objects; filtering mode=“measurements”; Overlapping child to “both parents”; Filter by category: “parent”.

Do I need to relate the objects before filtering them as you described? If this is the case, should green be the parent or child?


#6

Hi Steve,

Happy to have a look but might be easier if you share an example image and your pipeline so far so I can try and help in the context of your analysis

Laura


#7

Hi Steve,

I agree with @lmurphy that posting a pipeline is always the best way to go, but I think what you actually need is the MaskObjects module- you can run it once to mask how many As touch Bs (call those ABs), then how many ABs touch Cs.


#8

Sorry for the delay in getting back. It seems to be working using the “filter objects” method mentioned by Laura. I think I was getting confused about the parent/child relationship established in the ‘relate objects module’ and how it changed the available filters. My filter settings were: ‘measurements’, ‘limits’, and filtered using a ‘minimal value’ which I set to 1.0, so hopefully it is filtering all objects that contact one or more objects on the other channel.

I am also curious about this ‘mask objects’ approach stated by @bsimini. I’ll give this a try and compare the results.

Love this software. Thanks guys.