Difference between revisions of "Colocalization Analysis"

(Add a section mentioning why scatter plots are needed)
(Colocalization Analysis - Using the methods of Manders and Costes, for spatial intensity correlation analysis, automatic thresholding and statistical significance testing.: closed parentheses)
Line 51: Line 51:
This plugin performs several functions for you in one go. With the "green" and "red" stacks of the [http://pacific.mpi-cbg.de/samples/colocsample1bRGB_BG.tif colocsample1bRGB_BG.tif] dataset open and the channels split (see above) choose the menu item "Analyze-Colocalization-Colocalization Threshold". Next select the right stacks for the analysis in Channel1 and Channel2. You can use a region of interest (ROI) if you like, which should be defined before you run the plugin. Check on "Show Colocalized Pixels" and "Show Scatter Plot" (see also [[#Why_scatter_plots.3F|Why scatter plots?]], and others off. You can explore the options in Set options. Turn ALL the options on the first time you use it, so you see what it can do.  
This plugin performs several functions for you in one go. With the "green" and "red" stacks of the [http://pacific.mpi-cbg.de/samples/colocsample1bRGB_BG.tif colocsample1bRGB_BG.tif] dataset open and the channels split (see above) choose the menu item "Analyze-Colocalization-Colocalization Threshold". Next select the right stacks for the analysis in Channel1 and Channel2. You can use a region of interest (ROI) if you like, which should be defined before you run the plugin. Check on "Show Colocalized Pixels" and "Show Scatter Plot" (see also [[#Why_scatter_plots.3F|Why scatter plots?]]), and others off. You can explore the options in Set options. Turn ALL the options on the first time you use it, so you see what it can do.  
Line 192: Line 192:
== Why scatter plots? ==
== Why scatter plots? ==

Revision as of 07:07, 10 September 2009

Colocalization Analysis - What is Colocalization anyway?

Suppose you are given some images by a colleague, or have some images of your own, and you want to measure the amount of colocalization between two of the dyes or stains in the images. First you have to define what you mean by colocalization, and that is not trivial. One place to start reading about coloclaization is here: QuantitativeColocAnalysis and for how to correctly capture quantitative fluorescence microscopy images suitable for colocalization analysis, look here: Quantitative Imaging

There are two basic methods for colocalisation analysis:

  1. Pixel intensity Spatial Correlation Analysis (which is covered in this tutorial)
  2. Object Based Overlap Analysis (not covered in this tutorial, since it requires segmenting the image into objects and background, and thats a whole branch of image processing in itself).

At some point (preferably before you start), you should read these 2 papers very carefully: File:Manders.pdf and File:Costes etalColoc.pdf, since we are going to use these methods for the analysis in this tutorial. Don't be scared by the maths, its actually very simple :-)

First, lets open a sample data set that we know should have very good colocalization because the 2 subunits of a dimeric protein are dyes with green and red dyes respectively. The methods of Manders and Costes should work very well for this sample, but maybe we can see some problems with the data? Maybe we can decide if the data is suitable for this analysis or not?

Open this sample data file colocsample1bRGB_BG.tif. Then use the "Image-Color-Split Channels" menu command to get a separate z stack for the 2 dyes (you can throw the blue one away!).

If you like, you can change the look up tables of the images (LUTs) so one is "green" and one is "red". Of course the colours here are always false, and only useful to use as apes with trichomatic vision to tell which channel is which: We are evolved to find red fruit in green trees. The detectors we use only see photons, and don't know what colour they are... that is determined by the fluorescence emission filters we use. There is no such thing as a green dye or a red dye, since they have broad emission spectra not a single wavelength corresponding to a certain "colour".


Questions you should ask before attempting colocalization analysis from 2 colour channel images, using the pixel intensity spatial correlation methods of Manders and Costes:

  • Q) Has there been lossy compression?
  • Q) Is the intensity information saturated / clipped / overexposed?
  • Q) Is there a problem with uniform background / detector offset?

To Begin with, we should check the images for problems that might make the colocalisation analysis methods fail or be unreliable. We should look for wrong offset / high background (since this confuses the auto threshold method, since zero signal is not zero pixel intensity but some larger number, see below), clipping/saturation (pixel intensity correlation measurements rely on the pixel intensities being true and not clipped to 255 when they were really higher!). We did this in the DetectInformationLoss tutorial, so do that first if you didn't already!

Are the images spatially calibrated? If not then we need to calibrate them so we know the spatial sampling rate (think pixel or voxel size) in x, y and z. See the SpatialCalibration tutorial for how to do that. We need the images to be spatially calibrated in order for the Costes statistical significance test (below) method to work properly,

We need to think carefully about the correct or adequate spatial resolution in x, y and probably z. This depends on the Numerical Aperture of the objective lens. You can calculate the correct pixel or voxel sizes for the objective lens you are using, to get the maximum resolution that that objective lens can really see: Nyquist Calculator]. Essentially the pixels / voxels should be about 3 times smaller then the resolution of the lens. On the other hand, if you are only interested in larger objects, and not the smallest details the objective can see, it makes sense to have larger pixels or voxels. Again, these should be about 3 times smaller than the smallest feature you want to resolve.

Nyqvist tells us the spatial sampling should be about three times smaller then the smallest object we want to resolve. Remember, spatial intensity correlation analysis, as we will perform here, can not tell you that 2 proteins are bound together in some biophysical bonding interaction. However, it might suggest that the 2 molecules occur with the same relative amounts when they are present in the set of spatial samples (pixels or voxels) with intensities above the thresholds we will calculate below. In any case, it might be a hint that "maybe they are binding partners or in the same macromolecular complex". You SHOULD follow up by determining true binding using FLIM, FRET and biochemical methods like Immuno co-Precipitation etc.

There is another (badly behaved) sample data file here which we will use later: 150707_WTstack.lsm.

Colocalization Analysis - Using the methods of Manders and Costes, for spatial intensity correlation analysis, automatic thresholding and statistical significance testing.

  1. Colocalization Threshold plugin:

    This plugin performs several functions for you in one go. With the "green" and "red" stacks of the colocsample1bRGB_BG.tif dataset open and the channels split (see above) choose the menu item "Analyze-Colocalization-Colocalization Threshold". Next select the right stacks for the analysis in Channel1 and Channel2. You can use a region of interest (ROI) if you like, which should be defined before you run the plugin. Check on "Show Colocalized Pixels" and "Show Scatter Plot" (see also Why scatter plots?), and others off. You can explore the options in Set options. Turn ALL the options on the first time you use it, so you see what it can do.

    Coloc1.png Coloc1b.png Coloc2.png <\p>

    1. It generates a 2D Histogram / Scatterplot / Fluorogram. this is a really good way to visualise the correlation of the pixel intensities, over all pixels/voxels in the image, and can tell you immediately about problems such as intensity saturation/clipping, wrong offset, emission bleedthrough (fluorescence signal from the wrong dye in the detection channel), and even if there are multiple populations of coloclaizing species with different ratios of dyes in the same sample. Think of it just like a FACS or Flow cytometry scatter plot; indeed it is very similar.
    2. It makes a linear regression fit of the data in the scatter plot. That is the diagonal white line in the scatter plot, the gradient of which is the ratio of the intensities of the 2 channels.
    3. It does the Costes method auto threshold determination. The thresholds are the intensity levels above which for both channels you say the two dyes are "colocalized". This method uses an iterative procedure to determine what pair of thresholds for the 2 channels of the scatterplot give a Pearson's correlation coefficient (r) of zero for the pixels below the thresholds. That means that all the pixels which have intensities above the two thresholds have greater than zero correlation, and the pixels below the thresholds have none or anti correlated intensities. The method is pretty robust (so long as you don't stupidly defeat it, ie. with image data with high offsets / background), and is fully reproducible, meaning you will always get the same thresholds for the same data set, and similar thresholds for similar datasets. Threshold setting is a big problem in colocalization analysis. If you use a tool that allows you to manually set the thresholds, obviously you can get any result you like, since you are subjectively deciding what is colocalized and what isn't. This might please your boss, but it's not very scientific is it? So don't do that! Use the Costes auto threshold instead! Some people say the Costes method sets the thresholds too low, and lower than they would set them by eye. That might be true, but manual methods are subjective and totally unreliable. THe thresholds that Costes method sets always mean the correlation below the thresholds is zero. Thats a good thing.
    4. The plugin finally sends a bunch of statistics and results to the results window. You need to turn them all on using the "set options" checkbox of the plugin GUI. Some of these resutls are pretty uninformative. They are listed here, in arguably order of usefullness:
      1. The thresholded Mander's split colocalisation coefficients (zero is no colocalization, one means perfect colocalization. There is one coefficient per channel, which tells you the proportion of signal in that channels that colocalizes with the other channel. Of course this might be different for the two channels! The thresholded Mander's coefficients are probably the numbers you would publish (not the Pearson's coefficients as these are less informative).
      2. The thresholds that were set by the Costes Auto threshold method.
      3. The Pearson's coefficients for: the whole image, image above thresholds (should be close to 1 for very good colocalizing dyes) and image below thresholds (should be around zero, because that's how the Costes auto threshold method tries to set them... so if it is not close to zero, something went wrong!)
      4. Linear regression solution: If the image data are close to ideal, with comparable total intensity in both channels and no problems with offset/background, then by definition, the gradient of the regression line will be close to 0.5 and the intercept will be close to zero. These are both good things for the quality of the result. This information might be less useful in other situations, eg where there is only sparse data in one channel, or there are multiple colocalizing populations of signals (several clearly independent patches/blobs in the scatterplot).
      5. The % volume and intensity colocalized values are pretty useless as they are very dependent on how much background there is in the image, and you will get totally different values for different images of the same sample, that happen to have different areas of background. Maybe % intensity above threshold colocalized might be useful..?

  2. Real problems and pitfalls using the Manders and Costes methods for colocalization analysis.
    1. The auto threshold calculation method can fail if you feed it inappropriate information. That means it does not like images with high offset / high flat background, which adds a constant number to the "real proportional" intensity relationship to the abundance of the dye. If pixels that contain no real signal have large intensity values, the algorithm has no way of knowing that, and can reach a result for the thresholds where one or both of them is below the value of the lowest intensity value present in that channels of the image. This means that ALL of that channel's pixels are considered to be colocalised, then the Manders Coefficients that you get will reflect that aberrant situation. In these cases, the background / offset should be carefully removed/subtracted before running the Colocalization Threshold plugin. The images below are an example of this situation, using the badly behaved data set:150707_WTstack.lsm. Note that the vaules for M1 and tM1 are the same! This should not be the case. You can see the green channel threshold is wrongly set below the intensity where the image data actually starts :-O BadOffsetConfusesCostesAutoThreshold.png
    2. Effect of noise on Manders Coefficients. In the case of perfect colocalization, where the intensities of the 2 channels are always the same: Low red with low green, and high green with high red, the scatterplot would have all teh data point falling on a straight diagonal line, since the green intensity would always bee the same as that of the red! however, that is the ideal case and real biological data is noisy! Noise (be it from the dyes not staining every single molecule, or from statistical photon shot noise from recording the signal from too few photons, or from other noise sources) will cause the pixel intensities to deviate from the perfect case, to be lower or higher than they really are on average. This causes scatter in the distribution of the datapoint in the scatterplot perpendicular to the line of regression fit. So you can see the noise by looking at how spread or tight the scatterplot points are. Also, since Manders coefficients are measuring correlation, and noise lowers the similarity of two identical signals, noise lowers the Manders coefficients to less than they should be for an image with very low noise. So for the same object under the microscope, a nosier images will appear to give less colocalization than a clean low noise image. That means you cant compare different images with different sigjnal:noise levels, unless you have some way of estimating the noise and correcting for it.
    3. Fluorescence Emission Bleed Through Looks Like Perfect Colocalization!!! As is often true for DAPI nuclear stain and GFP dye pairs, when images are captured at the same time, with both dyes being excited and detected simultaneously, fluorescence emission bleed through gives misleading results, as the signal from the DAPI also appears also in the GFP detection channel! Where there is more DAPI, there is also more signal in the GFP channel. This looks like really good coloclaization, but of course it is totally false! It is a problem with the imaging systems not being set up correctly or not used correctly. This can also happen with many other dye combinations, if they have overlapping emission spectra. Always check your spectra. You can do that here: Invitrogen Fluorescent Dye Spectra Viewer]. To be safe, check your emission filter sets don't allow in the wrong signal, and do "sequential imaging", so you only excite and image one dye at a time. ColocBleedThru.png

    4. Next is the topic: Regions of Interest (ROIs), and wether or not to consider zero - zero pixels as part of the interesting data for the algorithms to deal with. If you think about it, in a fluorescence image there is typically quite a large area which is black in both channels... for instance where there is space between cells, or just no signal in either channel since that area is not part of an interesting area of the sample. A philosophical point... but a significant one: Why bother taking images of black areas? Why bother analyzing black areas for colocalization? Surely you are not interested in those regions, as they contain no information of use to you? If you perform these pixel intensity correlation methods and include zero zero pixels, then of course these pixels have a very high correlation! They have the same value. But they are totally uninteresting! Sure, the auto threshold method excludes them from the tM1 and tM2 figures, but why include them in the first place? Probably better not to include them unless there is a good reason to do that. Why not just image the area, or just analyze the area where your biology is happening? If you analyse an image with large areas of close to zero and zero intensities, then the autothreshold method will tend to lower the thresholds to include more of that non interesting background. If you image the same sample, but only image a patch of the interesting part, say cytoplasm, then the autothreshold will probably give higher thresholds, and exclude more non interesting background, so the thresholded Manders coefficients will better reflect the biologically interesting parts of the image data - right? You can analyze only a region of interest by making an ROI then selecting the use ROI option in the plugin. You can use a regualr shape (rectangle or ellipse) or even a freehand ROI to manually select the interesting part of the image and ignore the part you know is background. Yes, this is a subjective decision, so be careful! You can see in the following example screenshot that for the same misbehaving dataset, using an ROI which roughly gets just the cell, the thresholds were calculated properly and the tM1 and tM2 are sensible and lower then 1.00: ColocWithROI.png

  3. Colocalization Test plugin:

    To perform the Costes test for statistical significance (which you should ALWAYS do after calculating the thresholded Manders coefficients and the scatterplot), choose menu item: "Analyse-Colocalization-Colocalization Test"


    Choose the correct Channel 1 and Channel 2 images stacks from the drop down lists. Make sure "Current Slice Only" is off, and "Keep Example Randomized Image" and Show All R values" are on. Then click "OK"


    The results window will then display the calculated P-value, and some other details of the test calculation.


    The Costes method for [Statistical Significance] relies on the spatial calibration of the image, knowledge of the [Numerical Aperture (N.A.)] of the objective lens, and the fluorescence emission wavelength to calculate how many pixels the point spread function covers in the image. Then it takes the image in one of the channels, and randomizes it by moving PSF sized chunks of the image to random locations in a new random test image. Then it calculates the [Pearson's correlation coefficient (r)] between the randomized image and the original image of the other channel. If the correlation of the randomized image with the real image of the other channel is as good as or better then the correlation betwen the two real images, then any correlation that you measure is no better then what you would have got by chance for this image. This test is performed many (100) times, and the P-value is output, which is the proportion of random images that had better correlation than the real image. A P-value of 1.00 means that nono of the randomized images had better correlation. 0.95 is the normal statistical confidence limit of 95%. Anything lower than that, and the correlation / colocalization that you measure in the real images is not likely to be better than random chance, and thus is probably not interesting.

    In this case the P-value should be 1.00. Since you told it to display the Pearsons correlation (r) values (R values here), they are in another window. You can see they are all close to zero, and in the results you can see that on average the randomized R value is about zers, meaning that the randomized images all had no correlation wioth the real image. Which is a good thing!

    Other available methods, such as Fay and Van Steensel, do the same thing but randomize the image in less rigorous but very simple ways, which may lead to errors such as over or under estimation of the P-value. However, they are faster than the Costes method.

    Again, as for the Colocalization Threshold plugin, using an ROI here may well make very good sense, as you are only interested in the correlation between the 2 colour channels in parts of the image where the biology you are interested in is located. Background its typically uninteresting, and you can exclude it from the analysis. Its probably sensible to to use the same ROI as you used in the Colocalization Threshold plugin!

Why scatter plots?

Sometimes composite images of red and green channels are considered enough to demonstrate colocalization. The ramifications with regards to color-blind people aside, there is another very good reason to require scatter plots: the perception of human eyes can be fooled easily. Just have a look at this image:


Most people might think that the prominent spirals are in shades of green and blue, but they actually have exactly the same color!

You can verify this yourself by getting the macro from http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=fiji.git;a=blob_plain;f=macros/spirals.txt via Fiji's File>Import>URL....