Colocalization Analysis

Revision as of 09:59, 11 February 2020 by Rueden (talk | contribs) (Expand this page to include plugins other than Coloc 2)

Getting Started
User Guides
Tips and Tricks
All Techniques
User input
Basics of script writing
How to use the Javadoc
Batch processing
Script Editor
Auto Imports
Running headlessly
Multithreading in Clojure
Multithreading in JavaScript
Chess in Jython
ImageJ Macro
Lisp (Clojure)
Python (Jython)
R (Renjin)
Ruby (JRuby)

What is colocalization?

Suppose you are given some images by a colleague, or have some images of your own, and you want to measure the amount of colocalisation between two of the dyes or stains in the images. First you have to define what you mean by colocalisation, and that is not trivial. For one place to start reading about colocalisation and for how to correctly capture quantitative fluorescence microscopy images suitable for colocalisation analysis, look here: Image Processing Courses at BioDIP, Dresden. A recent review is by Dunn in 2011.

Methods of colocalization analysis

Pixel intensity spatial correlation analysis

Here just are two of many colocalization coefficients to express the intensity correlation of colocalizing objects in each component of a dual-color image:

  1. Pearson's correlation coefficient. It is not sensitive to differences in mean signal intensities or range, or a zero offset between the two components. The result is +1 for perfect correlation, 0 for no correlation, and -1 for perfect anti-correlation. Noise makes the value closer to 0 than it should be.
  2. Manders split coefficients. Proportional to the amount of fluorescence of the colocalizing pixels or voxels in each colour channel. You can get more details in Manders et al. Values range from 0 to 1, expressing the fraction of intensity in a channel that is located in pixels where there is above zero (or threshold) intensity in the other colour channel.

These coefficients measure the amount or degree of colocalization, or rather correlation and co-occurrence respectively (but should not be expressed as % values, because that is not how they are defined). But if there is nothing to compare them to, what do they mean? A statistical significance test was derived by Costses to evaluate the probability that the measured value of Pearson's correlation, r between the two colour channels is significantly greater than values of r that would be calculated if there was only random overlap of the same information. This test is performed by randomly scrambling the blocks of pixels (instead of individual pixels, because each pixel's intensity is correlated with its neighboring pixels) in one image, and then measuring the correlation of this image with the other (unscrambled) image. You can get more details in Costes et al. The result of this tests tell us if the Pearsons r and split Manders' coefficients we measure are better than pure chance or not.

Other coefficients include ranked correlations such as Spearman and Kendal's Tau, Li's ICQ and the % of intensities or area (volume) above one or both thresholds (coming soon to Coloc_2). Some others are described in the literature that have been used in publications, but that have been refuted as insensitive, such as the overlap coefficient from the Manders paper, which J. Adler et al. showed to have large problems in interpretation compared to Pearson's r and Manders' split coefficients.

Other methods include ICCS (image cross correlation spectroscopy) and a derivative of that called PPI (protein proximity index, original article).

Object-based overlap analysis

This cookbook does not cover object-based overlap analysis, since it requires segmenting the image into objects and background, and that is a whole branch of image processing in itself. See the JACoP imageJ plugin for object based methods.

Do state the spatial resolution explicitly!

The Pauli exclusion principle states that two particles can not have the same quantum numbers so they can not be in the same place. So, actually nothing is "really" colocalised. At the other extreme, a universe of one voxel (not cubic of course) is completely colocalised - everything is inside it. Practically, our situation lies between the two extremes. We must colocalise at some defined and explicit spatial scale: In our case the optical resolution or image pixel spacing, whichever is the larger value in nm, micrometers, mm, meters, km, etc. The colocalization measurement we make only means anything in relation to the spatial scale we are working at, so it needs to be explicitly stated. You can find more details about optical resolution and image pixel spacing in the following sections.

Why scatter plots instead of colour merge images?



Most people might think that the image contains 4 distinct colours: 2 sets of thin spirals are in dark red and dark green, and 2 thick prominent spirals of yellow-green and yellow. However, the yellow and yellow-green actually have exactly the same color! You can verify this yourself by calling File  › Open Samples  › Spirals (Macro) in Fiji.


Here is another one. The two circles look like different colours, but they are exactly the same if you measure the pixel values.

So... now, how do you feel about determining colocalization by looking for yellow blobs? Doesn't make much sense does it? We notice that the shades and hues of colours look different according to what other colours they are next to! So, you need to measure something from the pixel values, not simply subjectively "look at" a red/green colour merge image.


Ch1coloc.gif Ch2coloc.jpg Scatterplotcoloc.jpg ColocQuadrants.jpg

In the scatterplot or 2D Histogram (Thanks Tony Collins for this nice figure) the two intensity values for each pixel or voxel are plotted against each other, and the brighter the colour, the more pixels or voxel have those two intensity values for their two colour channels. Here we see if there is correlation immediately by eye, in the presence of a cloud of information in the middle of the 2D histogram. We can fit that cloud with a linear regression and measure correlation coefficients.

After setting thresholds in both colour channels, we see the scatterplot or 2D Histogram is split into 4 areas, quadrants. The contents of each can be used to calculate different colcoalization results.

A sample dataset

Let's open a sample data set that we know should have very good colocalization because the 2 subunits of a dimeric protein are stained with green and red dyes respectively. The methods of Pearson, Manders, Costes and Li 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?


If you like, you can change the look up tables of the images (LUTs) so one is "green" and one is "magenta". Of course the colors here are always false. These false colors are only useful to tell which channel is which. The optoelectronic detectors we use only see photons, and don't know what color 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 "color". If I want to show DAPI in green and EGFP as magenta, there is nothing "wrong" about that.


ImageJ plugins for colocalization analysis

There are several plugins available for performing colocalization analysis. In addition to the options described below, see also the index of pages related to colocalization.

Coloc 2


None of this gives sensible results unless you have your imaging hardware set up appropriately and have acquired images properly, and have performed appropriate controls for bleed-through and chromatic shift etc. See here for hardware set up guidelines.

This plugin supersedes the Colocalization Threshold and Colocalization Test plugins, which unfortunately were buggy and hard to maintain. So we started from scratch with a carefully planned and designed new plugin. While the old plugins are described below as well, we recommend that you use Coloc 2 instead.

One main feature of Coloc 2 is the standardised PDF output, which is intended to make the results of different colocalization experiments comparable.

Please see the Coloc2 page for complete instructions on using the Coloc 2 plugin, including common pitfalls of the pixel intensity spatial correlation methods that it employs.


JaCoP is a compilation of co-localization tools:

  • Calculating a set of commonly used co-localization indicators:
    • Pearson's coefficient
    • Overlap coefficient
    • k1 & k2 coefficients
    • Manders' coefficient
  • Generating commonly used visualizations:
    • Cytofluorogram
  • Having access to more recently published methods:
    • Costes' automatic threshold
    • Li's ICA
    • Costes' randomization
    • Objects based methods (2 methods: distances between centres and centre-particle coincidence)

All methods are implemented to work on 3D datasets.

See the JaCoP page for full details.

Colocalization Finder

The Colocalization Finder plugin displays a correlation diagram (called scatterPlot picture) from two initial pictures having the same size together with a RGB overlap of the original images (called Composite picture).

See the Colocalization Finder web page for further details.

Precautions and notes

Check image data for problems and suitability for analysis


  1. Is the image data noisy?
  2. Has there been lossy compression?
  3. Is the intensity information saturated / clipped / overexposed?
  4. Is there a problem with uniform background / detector offset?
  5. What is the spatial resolution?


  3. Intensity clipping/saturation is bad news. Pixel intensity correlation measurements rely on the pixel intensities being true and not clipped to 255 when they were really higher! See the Detect Information Loss tutorial for details on how to detect such problems.
  5. Spatial resolution






Further reading

Older colocalization plugins

Colocalization Threshold

Note: this plugin is no longer under active development and support. Use Coloc 2 instead, which does the same thing, only better.


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

    5. The % volume and intensity colocalised values are pretty useless, unless you use a biologically relevant region of interest, as they are very dependent on how much stuff and how much background there is in a certain image, and you will get totally different values for different images of the same sample, that happen to have different areas of background. In images that have no empty regions, like tissue samples, it might then be a useful number. Maybe % intensity above threshold colocalised might be a useful value in some cases? See section 6.3 at for more explanation of what the different measurements exactly are, or look at the code.

    Colocalization Test

    Note: This plugin is no longer actively developed or supported. Use Coloc 2 instead, which does the same thing, only more correctly, and as described in the original publication by Costes, instead of making a nasty assumption and shortcut.

    The Colocalization Test plugin performs the Costes test for statistical significance (which you should ALWAYS do after calculating the thresholded Manders coefficients and the scatterplot). It is in the menus at Analyze  › Colocalization  › Colocalization Test






    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 than the correlation between 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 none of the randomised images had better correlation. 0.95 is the normal statistical confidence limit of 95%. Anything lower than that, and the correlation / colocalisation that you measure in the real images is not likely to be better than random chance, and thus is probably not interesting.


