Microscopy colocalization theoretical background

The purpose of a Colocalization coefficient is to characterize the degree of overlap between two channels in a microscopy image. Several of these coefficients are widely used in literature and lend themselves in principle for comparison of results obtained in different studies. Therefore SVI's Colocalization Analyzer focusses on these established coefficients. Still, it should be remarked at this point that the specific properties of the coefficients, especially properties related to the image background, make cross-study comparison problematic.

Generally the colocalization coefficients depend much on correct estimation of the image background and resolution. For these reasons we strongly recommend to compute colocalization coefficients only on deconvolved images. Deconvolution has proved to sensibly enhance colocalization analysis ( 1, 2 ), see Blur And Noise Affect Colocalization. In case the coefficients need to be computed from raw data it is possible to have this function compute the image background on a frame by frame basis.

If the image is affected by Color Shift, it must also be corrected as part of the Image Restoration procedure.

See Colocalization Basics for illustrations of the experimental difficulties that affect colocalization.

In the definitions of the coefficients below we follow the naming convention for the two compared channels: R for the first channel, G for the second channel. The pixel values in the channels are Ri and Gi, respectively with i the pixel index. Since the coefficients do not take spatial relations into account they hold for 2D and 3D images, the index i running from zero to N - 1 , N the total number of image elements.

For a discussion on the interpretation of colocalization coefficients, see ( 3 ).

Coefficients and maps

The coefficients as defined below parametrize the full image, while the maps parametrize the colocalization locally. A single value is calculated per Voxel creating a 3D map, that can be represented in a 3D image. The Colocalization Analyzer plots maps in the form of iso-colocalization surfaces, with all points with a given colocalization level joined forming 3D surfaces. In this way regions in which the degree of colocalization exceeds a threshold become objects that can be analyzed independently.

Conventionally, the two data channels under comparison are called R and G. They are also know as red and green channels, independently of the WaveLength they have actually registered.

Pearson's colocalization coefficient

Pearson's linear correlation coefficient can be used to measure the overlap of the pixels. It is defined as follows:

r_p =  \frac {\sum ((R_i - R_{avg}) (G_i - G_{avg}))} {\sqrt{\sum (R_i-R_{avg})^2 \sum (G_i - G_{avg})^2}}

with Ravg and Gavg the averages of the R and G channel respectively and the summations with index i are over all the image voxels. The value of rp is between -1 and 1. Negative values occur when on majority values of R above Ravg coincide with values of G below Gavg. The inclusion of the averages makes this coefficient independent from the image background.

A Pearson colocalization map MP consists of the following values:

M_{P,i} = \frac {(R_i - R_{avg}) (G_i - G_{avg})}  {\sqrt{\sum (R_i - R_{avg})^2 \sum (G_i - G_{avg})^2}}

For a discussion see Pearsons Interpretation. It is recommended to understand how to interpret this basic parameter to see what improvements introduce the other ones coming below.

Object Pearson's coefficient

This new Pearson's coefficient is available from Huygens version 3.6 and higher. It is the same as the Pearson's coefficient explained above, but with Ravg and Gavg the averages of Ri and Gi values respectively, with index i over the object voxels only, i.e. for i where Ri or Gi is larger than the background. In this way the Object Pearson coefficient is not biased anymore by large background areas.

r_{op} =  \frac {\sum_i ((R_i - R_{avg}) (G_i - G_{avg}))} {\sqrt{\sum_i (R_i-R_{avg})^2 \sum_i (G_i - G_{avg})^2}}, such that Ri > Rthresh \vee Gi > Gthresh

Spearman coefficient

The Spearman coefficient can be found in the Colocalization Analyzer in Huygens version 3.7 and higher and it is equal to the Pearson, but then based on the intensity ranks, instead of intensity values. It is this difference that gives the spearman the extra property that it can measure all monotonic depencies between two channels, while the Pearson only measures linear dependencies.

The intensity rank (Rr or Gr) of an intensity value (Ri or Gi) is determined by the position of this value, if all the image intensities of the channel were ordered. It will not matter if this is in decreasing or increasing order, since the ranks are compared with the average rank. In Huygens the highest intensity value gets the highest rank (=1).

If there are ties, the rank of these intensities is the average position in the ordered list of image intensities. The Spearman coefficient is then defined as:

r_s =  \frac {\sum ((R_r - R_{avgr}) (G_r - G_{avgr}))} {\sqrt{\sum (R_r-R_{avgr})^2 \sum (G_r - G_{avgr})^2}}

with Ravgr = Gavgr = \frac{n+1}{2}, with n the image volume (total number of voxels).

The corresponding Spearman colocalization map is then determined by the folowing values:

M_{S,i} = \frac {(R_r - R_{avgr}) (G_r - G_{avgr})}  {\sqrt{\sum (R_r - R_{avgr})^2 \sum (G_r - G_{avgr})^2}}

For an example of the Spearman coefficient, see Wikipedia Spearman's rank correlation coefficient

Object Spearman coefficient

This new Spearman's coefficient is available from Huygens version 3.7 and higher. It is the same as the Spearman's coefficient explained above, but with Ravgr and Gavgr the averages of image rankings Rr and Gr of the voxels that belong to the object (i.e. not part of the background). Like the Object Pearson, the Object Spearman coefficient is not biased anymore by large background areas.

r_{os} =  \frac {\sum_r ((R_r - R_{avgr}) (G_r - G_{avgr}))} {\sqrt{\sum_r (R_r-R_{avgr})^2 \sum_r (G_r - G_{avgr})^2}}, such that Rr > Rbgr\vee Gr > Gbgr

Background handling

In principle the Pearson's coefficient is unaffected when a constant value (background) is added to either of the channels. However, to handle specified background settings in a consistent manner across all coefficients computed by the Colocalization Analyzer background settings are taken into account.
See Pearsons Interpretation for more information.


Because the negative values in rp are not so easy to interpret the subtraction of the averages can be omitted to create an overlap coefficient as follows:

r_o = \frac {\sum (R_i\ G_i) }  {\sqrt{\sum R_i^2 \sum G_i ^2}}

The value of ro is between 0 and 1. As with the Pearson's, this coefficient is not dependent on the relative strengths of the channels, but does depend on the background.

The overlap colocalization map Mo consists of the following values:

M_{o,i} = \frac {R_i\ G_i}  {\sqrt{\sum R_i^2 \sum G_i ^2}}

Manders' coefficients

A consequence of the symmetry of the way both channels contribute to ro is that it can not distinguish between situations when not colocalized signal is added to the R channel versus the G channel.

We may be interested in knowing how well the red pixels colocalize with the green ones, and vice versa. It may happen, for example, that all the red pixels overlap with green pixels but many of the green ones are "alone", in regions where no red signal is present. (See e.g. the first example in Two Channel Histogram).

To make this distinction ro can be split in the following coefficients:

k_1 = \frac {\sum (R_i\ G_i)}  {\sum R_i^2}


k_2 = \frac {\sum (R_i\ G_i)}  {\sum G_i^2}

These coefficients allow distinction between the cases outlined above: addition of not colocalized signal to G will not affect k1 but will affect k2 .

Still also these coefficients are not without disadvantages: k1 will scale proportional with an increase of signal strength in G, k2 likewise to an increase in R.

A possibility to render independent of scaling effect is to replace Gi in the definition of k1 by 0 if Gi = 0; 1 otherwise. In effect this means taking the sum over all Ri for which Gi > 0. This yields the following coefficients:

M_1 = \frac {\sum R_{i,coloc}}  {\sum R_i}


M_2 = \frac {\sum G_{i,coloc}}  {\sum G_i}

(Mind that this upper-case M coefficient doesn't mean 'map' but 'Manders'). The colocalization maps of the k1, k2, M1, M2 coefficients are constructed in the same fashion as for the Pearson and overlap case. For example the colocalization map MM1 for the M1 coefficient is defined as:

M_{M1} = \frac {R_{i,coloc}}  {G_{maxRobust} \sum R_i}

Background correction

As the Manders coefficients as defined above are all sensitive to a background value, Ri and Gi should be corrected for the background. You can do this in the Colocalization Analyzer by setting the background values. In Huygens Professional and Huygens Scripting the colocalization tool (command) can do this automatically by computing the image background, or manually by a fixed set of background values.

In the computation of all the above coefficients the per-channel per-time-frame background is subtracted from all pixel values. In cases were this yields a negative value the pixel value is set to zero.

Intersection coefficients

All the above explained coefficients are based on voxel intensities, but in some situations these may be difficult to interpret. Simpler (but probably more unstable) coefficients can be calculated based just on whether there is some signal in a voxel or not, independently of its actual intensity value. For some illustrations on how these new coefficients arise, see Colocalization Coefficients with practical examples.

A voxel can be considered to have some interesting signal once its value is above certain background level. In such a case it is accounted as 1, independently of its actual intensity, otherwise it is 0. This in fact implies defining a red binary image Rth with intensity at voxel i (Rthi) based on the real red intensity Ri and a red background Rbg as:

Rth_i=\begin{cases}0 & \text{ if } R_i\ \leq\ R_{bg} \\ 
1 & \text{ if } R_i\ >\ R_{bg} \end{cases}

and similarly for Gthi, based on Gi and the green background Gbg.

With noisy images this can generate quickly fluctuating 0-1 values around the background when intensities are close to Rbg and Gbg. To have smoother transitions around the background a Soft Threshold can be defined in such way that, inside certain range, a partial contribution between 0 and 1 is accounted for some voxels:

Rth_i=\begin{cases}0 & \text{ if } R_i\ \leq\ (R_{bg}\ -\ range/2)\\
f(R_i) & \text{ if } (R_{bg}\ -\ range/2)\ \lt\ R_i\ \leq\ (R_{bg}\ +\ range/2)\\
1 & \text{ if } R_i\ >\ (R_{bg}\ +\ range/2) \end{cases}

The simplest function f(x) is a first order polynomial: intensities Ri are linearly mapped between the range limits to Rthi values between 0 and 1. Now the Rth and Gth images are not binary anymore, but gray-valued with intensities between 0 and 1.

The intersection contribution of a given voxel can be defined as the product of Rthi and Gthi. The simplest case (hard threshold) implies that these contributions are always zero or one. In the soft threshold case, some pixels will contribute partially to the total coefficient with values between 0 and 1. In any case, the intersection coefficient is defined as

intersection = \frac {\sum (Rth_i\ Gth_i)}  {\sum Rth_i + \sum Gth_i - \sum(Rth_i Gth_i) }

In the numerator: the total intersecting volume (voxels with intensities in both channels). In the denominator: the total volume of both channels together, which is calculated as the total red volume plus the total green volume minus the intersection volume (to avoid accounting for it twice).

We can also split the intersection coefficient to report what portion of the red and green volumes are intersecting:

i_1 = \frac {\sum (Rth_i Gth_i)}  {\sum Rth_i }
i_2 = \frac {\sum (Rth_i Gth_i)}  {\sum Gth_i }

This soft threshold is also applied by the colocalization analyzer to the Manders M1 and M2 coefficients, for experimental reasons. Set the ranges to zero to retrieve Manders' original definition, otherwise each element will be calculated as follows:

R_{i,coloc} = R_i \ Gth_i
G_{i,coloc} = G_i \ Rth_i

To see all these coefficients in action, please read Colocalization Coefficients.

Scaling affects ratiometry

As explained above, most of the colocalization parameters are not affected by scaling the relative strengths of the channels. This does not apply for direct channel ratios, of course. See Ratiometric Images for further information.

Colocalization in the Huygens Software

See the Tcl Huygens command coloc.

See also Cooccurence Theory.


[1] Analysis of protein co-localization using wide-field fluorescence microscopy and image-restoration for co-visualisation of CFP and YFP conjugated signalling proteins inside living cells. J. Weitzman, R. Lizundia, B. Blumen, M. Marchand, S. Shorte. http://www.pasteur.fr/recherche/unites/Pfid/html/un_coloc/?en

[2] Deconvolution improves colocalization analysis of multiple fluorochromes in 3D confocal data sets more than filtering techniques. L. Landmann. Journal of Microscopy 208:2, 134 (2002).

[3] Measurement of co-localization of object in dual-colour confocal images. E.M.M. Manders, F.J. Verbeek and J.A. Aten. Journal of Microscopy 169, 375-382 (1993).

Read more

Contact Information

Scientific Volume Imaging B.V.

Laapersveld 63
1213 VB Hilversum
The Netherlands

Phone: +31 (0)35 64216 26
Fax: +31 (0)35 683 7971
E-mail: info at svi.nl

Image Image Image Image Image Image