written by cail • posted in Experiment • 6,150 views 1 comment

2011-11-23: google is closing knol, so I move it here.


a way to quantify protein localization based on its fluorescence intensity distribution

Authors: Liang Cai
Published: Creative Commons Attribution-Noncommercial 3.0 License
Version: 9
Last edited: 05 Oct 2011
Exported: 23 Nov 2011
Original URL: http://knol.google.com/k/-/-/3ez005w9gduud/4

Prepare files for the analysis

The file EdgeRatio.txt is the ImageJ macro written for this specific purpose, which is attached at the end of this page. This macro can also be download from my homepage - code section.

Before using the macro, one value in EdgeRatio.txt need to be adjusted. Looking into the file, and change the 787 to an appropriate value. With the demo-RGB-file.tif capture condition, 787 pixel equals to 50 micron.
// 787 pix == 50 um
xValues = ((i - realpair) * steppix) * 50 / 787;

Here is an example image demo-RGB-file.tif. (It was in the tif format. Due to the size limit, I uploaded it as png format. Please convert it back to RGB tif file in ImageJ.)
3ez005w9gduud-uthw9d-demo-rgb-file.png

Edge detection process

Open any file in RGB format in ImageJ, and run the macro EdgeRatio.txt by Plugins->Macros->Run...
3ez005w9gduud-uthw9d-step1.png

As shown above, a window pops up. Step pixel is the step the mask dilating or shrinking in each measurement. Total pixel distance is how far inside the cell will be measured. With the demo-RGB-file.tif, input 36 pixel will measure about 2.29 micron inside the cell.

OK to proceed.
3ez005w9gduud-uthw9d-step2.png

As shown above, ImageJ will open many windows automatically. So, this macro cannot be run in batch mode. The polygon selections tool is enabled. Outline the area of interested. Make sure enough space is left inside and outside of the cell. The yellow line show the ROI for lamellipodial measure, which covers the major protrusion on the right and avoid the ruffle in the middle. Convert the selection to mask by Edit->Selection->Create Mask.
3ez005w9gduud-uthw9d-step3.png

The wand tool is selected now. Using Image->Adjust->Threshold to set the image as a binary image (usually, single press "Auto" will do the trick; no need to "Apply" or "Set"; occasionally, drag the bar to get it precise). Use the wand tool to select the outline of the cell, as shown below.

To archive a good outline for the cell edge, which is the critical step in the whole process, adjusting the bars in the Threshold windows helps. Only the region within the ROI needs to be precise. It is OK to use the Paintbrush tool to fill some gaps or smooth the regions outside the ROI to help the selection. Using the wand tool NOT the freehand tool to generate the outline, which minimizes the bias.
3ez005w9gduud-uthw9d-step4.png

Once select the cell with its cell boundary highlighted, please create the second mask (Edit->Selection->Create Mask).

From this point, the macro starts running by itself, and many windows are open and close. DO NOT INTERRUPT! NO MOUSE MOVING OR KEYBOARD CLICK. The progression bar in ImageJ shows the status of each dilating/shrinking operation, which takes most of the calculation time.
3ez005w9gduud-uthw9d-step5.png

After a while, all the images are close and only the Results window left in ImageJ. This result table is stored as CVS format with a name end with .xls, which means it can be opened with Excel etc. No more operation is need in ImageJ. The content of Results window will be flushed when the macro starts running.

Check the result file

3ez005w9gduud-uthw9d-step6.png
In the xls file, RGB/rgb means the red, green and blue. 0/1/2 = r/g/b. Distance is the real distance in micron, with "-" means inside the cell. Intensity is the raw value of the channel, which is averaged over the edge within ROI. SemOfInt is the standard error of the mean of the raw value, which is calculated from the thousands point of the edge. PercInt is the percentage value of the intensity, with the maximal raw value as 1 and the minimal raw value as 0. The PercInt is the most consistent value between different cells. Group different cells and a new SEM can be calculated to show the variance between cells. B2g-Ratio is (raw value of blue channel) / (raw value of red channel), etc. Exact the same microscopy setting is required for the ratio and raw value meaningful between different cells.

ImageJ macro for the analysis

The macro is now in github EdgeRatio.ijm.

It fix a NaN bug. The script from my homepage doesn't have this fix.

Previous:
Next:

Leave a Reply