Immuno quantification

Hi fellas…Im trying to edit a macro that help me to analyse several imunofluorescence images. So I want to open some images at the same time, quantify in gray scale the intensity, set up the same scale for all images I’ve opened and see the quantification. However, I cannot make the macro run again…It works only for one slide. Someone can help me?? Thanks in advance

You cannot really quantify immunostain intensity as a measure of “expression” because the lack of stoichiometry of the immunstain amplification steps.


Just post your macro and sample images here. It will be the best way to get help… And try to be as specific as you can regarding what you want to measure and why - the more details, the better the help in the end.

eta :slight_smile:

Hi Gabirel, Yes the intention is not to measure the “expression”, is to observe the otical density and try to correlate with the protein expression in the tissue.

Hi @EFSANCHES and @gabriel

In the original post you refer to immunofluorescence and I think @gabriel refers to immunohistochemical staining (if I interpret the posts correctly). Quantification wise that would make a difference. For IHC, as gabriel mentioned… a relation between density and product amount is not really possible.
Fluorescence quantification would rather be in the “range of possible” but this massively depends on the complete experimental conditions, the dyes (e.g. multiple or single staining,…), suitable controls, tested imaging equipment (e.g. for stable and equal illumination and abberations), potentially a normalization sample (e.g. fluorescent beads),…
But I think the setup and feasibility of such a measurement is one thing you either already know, or you can read on (Quantitative Imaging in Cell Biology, or other sources) since this is beyond the scope of your question but worthwhile to think about.

Regarding the help on your macro, as @etadobson mentioned please post some code of the not working part or the complete macro to enable us to give potential solutions.

One question still on your post… what exactly do you mean with “the same scale” for all images. Is this referring to spatial scaling (e.g. µm) or something else?

1 Like

Hello…Thanks for the support
Im recording my steps and trying to use the same steps for all images in a folder.
I have already e2 or 3 macros as you can notice. At the end I will discount the background for all the animals…
Concerning the scale (is just because all the images were acquired with the same magnification, so for saving time I would like to have a line and just change the parameters…
Thanks for the help

run(“Set Scale…”, “distance=222 known=100 pixel=1 unit=unit”);
runMacro(“C:\Macro 20x20.roi”);
runMacro(“C:\Macro Imuno Quant.ijm”);

Since you mentioned that it runs on one slide only the problem will be most likely in the last macro you call “Macro Imuno Quant.ijm” as far as I guess or is it stopping already before or while opening the ROI? So, this is the one you would need to post to provide further help on the topic.

I just dont know how to write in the last macro (or outise since I, rewritting a macro (with some macros inside) how to do the loop to perform the measurement for the other slides…It should be possible to insert at the end, no? (***)
run(“Set Scale…”, “distance=222 known=100 pixel=1 unit=unit”);
runMacro(“C:\Macro 20x20.roi”);
runMacro(“C:\Macro Imuno Quant.ijm”);

Are your images in one stack or do you want to loop over different images in a folder? Depending on your input it decides how you loop through your images

They are different images

The problem is often ignored: how comparable is the emission or optical density (depending on what method you use) to the amount of protein present?
We assume that Ab will bind if there is Ag, but the amount of Ab binding is not just a function of the amount of Ag in the sample. The simplistic view that it is 1 to 1 does not hold. So we do not know what is the relation of so-much fluorescence with so-much Ag. This boils down to the question of “what are we really measuring?”.

The issue is very problematic in immunostains because of the amplification steps, but even in immuno-fluorescence it is essential for the whole quantification effort to have a measure of how many antibody molecules attach to a given epitope. That is the issue of stoichiometry mentioned. For example this page explains 5 difference forces that influence Ab-Ag reaction and make it non-stoichiometric.
There are more issues (Ab batch variation, sample processing, plus experimental conditions), so I do see a problem in extracting numbers this way and then computing statistics and making further claims.

This is quite an important problem and there are no easy solutions. IHC and IF have been invaluable for all sorts of investigations (just to mention one: tumour typing) but my take is that, although tempting, it cannot be used for fine quantification in that particular sense. It is more of a “yes or not” Ag at a given Ab dilution. Maybe that is enough to detect cells or tissues, etc, but claiming that e.g. this cell/sample has 3.2 times more antigen expression than another is something that is not supported by what is known about the Ab-Ag reaction. It is not the imaging or the stats, it is the nature of the Ab-Ag reaction.
I thought it is worth mentioning this and hope it is useful.



besides the considerations @gabriel and I mentioned, here a technical macro solution for recursive file prowsing and execution of your macros per image. Therefore, I borrowed some code from @Wayne’s example from the Build-in macro functions

dir = getDirectory("Choose a Directory ");

function processFiles(dir) {
	list = getFileList(dir);
		for (i=0; i<list.length; i++) {
			if (endsWith(list[i], "/")) {
			} else {
				run("Set Scale...", "distance=222 known=100 pixel=1 unit=unit");
				runMacro("C:\Macro 20x20.roi");
				runMacro("C:\Macro Imuno Quant.ijm");