What is coloc2 thresholding method? Results different from the ones I get with JaCoP

Dear all,

I have a few questions about the coloc2 plugin.

  1. What is the method used by coloc2 to define the “max threshold” for each channel?

I tried JaCoP on the same images, and the thresholds given by coloc2 are different from both the “automatic” thresholds and the Costes’ thresholds given by JaCoP.

  1. Are the “max thresholds” used for the calculation of the Manders’ coefficients by coloc2? Again, Manders’ coefficients from coloc2 are different from all the sets of Manders’s coefficients that I get with JaCoP.

And finally, a more general question: I have analyzed only a few images until now, but for all of them, and all my ROIs, I get a message saying that “The absolute y-intercept of the auto threshold regression line is too high”, and suggesting that I should use a ROI or do a background subtraction. However, the values of the y-intercept do not seem to me
excessively high; what I consider as background has a low mean value too, even inside ROIs. Also, I feel it strange to subtract a background before asking the plugin to calculate a threshold that is used to determine what “background” is. What is your opinion about that?

Thank you for your help !

Perhaps Ellen Arena (@etadobson), Dan White (@chalkie666) or Tom Kazimiers (invited to the thread) will have some suggestions.

Hey @Laure_Twyffels !!

I’m glad you found your way onto the Forum … I do hope others can chime in here regarding your questions - including @chalkie666 and possibly @oburri - as you have specific questions regarding differences between Coloc2 and JACoP.

All I can do at this moment is reiterate what I wrote you on the mailing list - hoping others can correct me when wrong.

  1. Again, as stated in the code regarding the Ch1 & Ch2 Max Thresholds … “A class implementing the automatic finding of a threshold used for Pearson colocalisation calculation.” So I believe Costes is in fact used here…

  2. Those same thresholds are used to calculate Manders coefficients - yes.

For those above two questions - I am not sure why the discrepancies between Coloc2/JACoP - but again - perhaps @chalkie666 and/or @oburri could provide some insight ??

Regarding background - again… even ‘low’ background levels can greatly affect the calculations for colocalization parameters. MCC are particularly sensitive to non-zero background - as background is assumed ‘0’ for these calculations. So in a way - the background subtraction that you carry out will determine the validity of MCC as a measure of colocalization. I know - this is not so straightforward an answer… and reveals the sensitivity in these colocalization measurements - especially at the time of acquisition if the offset is not set properly, etc. I would say - subtracting background is a necessary step in general for colocalization measurements - especially if you have this non-zero background. As long as you do so in a reproducible manner - and document the steps you carry out - it should be fine.

Again - others can chime in here to assist you better.

1 Like

@etadobson is correct in her reading of the situation here @Laure_Twyffels
Any difference between what JACOP does and what coloc2 does can only be understood by reading the source code. The auto threshold methods in both are as described in the Costes paper, but they are not exactly the same, and some small technical difference in the implementation of the equations and words in that paper may exist between the two different implementations.

Coloc2 actually has two ways to find the threshold, a fast way using a bisection search, and a slower way that just runs step by step down the histogram. I think Tom changed the default to the slow method as it more closely matched the description in the Costes paper. See the commit messages and discussion. But you can check the code yourself. It’s open source for a reason! If you think it’s wrong, do tell us!


Hello @etadobson and @chalkie666 !

Thank you very much for your answers (and also for showing me the way to this great forum, @etadobson )
Unfortunately I am not familiar with java, but this might be the right occasion to dive into it :slightly_smiling:


I have updated the coloc2 plugin and I can now choose between the two thresholding options (bisection or Costes), which is nice.

However, I have now tested Coloc2 in parallel with JaCoP for many pictures and I would like to stress that the two plugins sometimes give “Costes” threshold values that are really VERY different (e.g. 10x higher/lower), resulting in thresholded M1 and M2 that are in turn VERY different (e.g. ~0.5 for one plugin and 0.9 for the other for the same channel). I am not sure that this can be the result of small differences in implementation of the same calculation.

Unfortunately I am not able to read the code, but if someone more skilled than me decides one day to merge coloc2 and JaCoP, I think it is worth having a very close look at the way these thresholds are calculated.

1 Like

Yes. Here you saw the difference between an Algorithm on paper and two different real code implementations. Finding the difference is at least possible because they are open source. Thanks for pointing out that you see differences.

I used to think I could not read code either. But I learned easier than I thought. You might surprise yourself. :smile:

1 Like