Simple way of matching nexted ROIs (Cell, Nucleus) for Localization studies

Sample image and/or code

Background

I am trying to look an nuclear localization of a transcription factor in response to IGF1. These are fixed and labeled with GFP. I also have a dapi stain. Also the cells are embedded in agarose so they are 3D spherical objects. I do have a membrane stain but I forgot to apply it. I will redo this experiment but I wanted to see how far I can get with what I have.

Analysis goals

I would like to get the ratio of GFP intensity of nucleus to the cytosol. Activation would be a higher ratio and low the opposite.

What I have tried

So I am new to ICY and I have been working with the HK Means plugin to get my ROIs. I have a good handle on that. What I have so far is a manual process where I extract the channels, do a z projection and do the ROI identification on each separately, so I have a list of nucleus and cells in some random order. When I cut and paste they are sort of matched up but not quite. I have been trying to manually click through and notate which ones are the pairs. This is not a sustainable path forward.

Ideally I am looking for something akin to cell profiler where you could look inside an existing ROI to find the nucleus so there is some linkage. I have never looked in separate channels in cell profiler so I am not sure it has this ability. I would be willing to try and make my own plug in for it. the pseudo code would be

  1. take image
  2. Pre process if necessary ( smooth sharpen etc…)
  1. look in Channel 1 to identify cells
  2. Lookin Channel 2 to identify nuclei in each of said cells
  3. calculate the intensity of Channel 3 in just the nuclei
  4. calculate the intesnity of the cells indentified in step 3 minus the nuclei in step 4

I would need some way of pairing the two ROIs so I would not have to manualy pick and do binary operations to get what I want.

Thanks in advance for the help!

Dear Matt,

I am afraid there is no “simple” way to do what you would like to do in Icy, but there is a way :slight_smile:
I would do an Icy “protocol”. Icy protocols are graphical programming tools to design advanced bioimage analysis workflows and/or automate a task. You don’t need to know how to program in order to create a protocol.

The protocols editor is located in the Tools tab. You can load an existing .protocol file with the Load button and create a new protocol with the New button. To get started with protocols, I recommend reading the Icy protocols documentation.

I created the following protocol:protocol_associate_ROIs.protocol (23.7 KB)
It won’t work directly: you need to modify file paths, add a block to project the 3D stack in 2D (Intensity Projection block), HK-Means parameters are not the same as yours etc.

It is made of 5 parts:
a) and b) are HK-Means segmentations on channel 1 and channel 2 (actually channel 0 and channel 1, because channels start at 0 in Icy)
c) adds information in the name of the nuclei ROIs to identify the cytoplasm they belong to
d) creates cytoplasm ROIs without the nucleus
e) gets all fluorescence intensity measures and saves them in an Excel spreadsheet

For steps c) and d), it loops over each nucleus and each cytoplasm to find correspondance between ROIs that are intersecting. I didn’t put “contained” in case the nucleus is sometimes on the edge of the cytoplasm and not all pixels of the nucleus ROI are contained in the cytoplasmic ROI. Step d) does the exclusive union when there is a match, in order to create the cytoplasmic ROI without the nucleus.

I hope this helps.

Best regards,
Marion

2 Likes

Thank you so much. Is there a plugin developer IRC channel or google group? I would be willing to try and code up a plugin that would keep track of related sub components. I am not super skilled but I have some coding experience.

1 Like

You’re welcome!
All communication between Icy users is centralised here on the image.sc forum.
To discuss about Icy plugin development, choose the “Development” category and add the tag “icy”.

To get started with Icy plugin development, you can watch the video of the tutorial “Developing your own Icy plugins” that was given by @Stephane and @dgonzale for the I2K 2020 online conference and have a look at the associated slides.

Note that, depending on your coding experience and the language(s) you are familiar with (and time you can dedicate to create you bioimage analysis workflow), an alternative to writing a plugin would be to add JavaScript or PythonScript blocks to a protocol.

Have fun with Icy!
Best regards,
Marion

Hi Matt,

Marion already made a pretty complete reply :slight_smile:
Still i think you can find attached nuclei ROI by using block like Logical operation ROI, which allow to filter ROIs on intersection or contain test, you also have the ROI Inclusion analysis block, it won’t be useful in the current case but always good to know that exits :slight_smile:

Best,

– Stephane

1 Like

Useful discussion not only for me but I think others see this useful discussion for them as well, thank you all! :handshake:

1 Like