Abstract
Immunofluorescent staining is widely utilized in biomedical research. However, reliable and reproducible quantification remains challenging and often depend on the experience of the raters heavily. As a result, variations caused by different raters or the same rater at different times confound quantitative interpretations. In this study, we propose a histogram-based analytical method to explore the sources of signals at various intensities and, subsequently, identify the signals of interest using the histograms as a reference. Our method aims to alleviate inter-rater and intra-rater inconsistencies and improve the quantification of microscope images with immunofluorescent staining.
-
•
Identification of signal sources for image pixels at different intensities
-
•
Reduction of quantification variations using the proposed histogram-based analysis
Keywords: Background signals, Gaussian fitting, Threshold, Pixel count, MATLAB
Method name: Histogram-fitting-based quantification of immunofluorescent images
Graphical abstract
Specifications table
Subject area: | Neuroscience |
More specific subject area: | Immunofluorescent imaging |
Name of your method: | Histogram-fitting-based quantification of immunofluorescent images |
Name and reference of original method: | N/A |
Resource availability: | MATLAB codes are shared with the link below: https://github.com/zyliamwei/HistoIF. |
Background
Immunofluorescent staining is a widely used technique in biomedical and cellular research for detecting and visualizing specific proteins, antigens, or other molecules within cells and tissues [1,2]. The specificity of antibodies, which are conjugated to fluorescent dyes, forms the technical foundation for immunofluorescent staining to obtain specific detections. When exposed to light at certain wavelengths, the dyes emit fluorescence to generate observable signals under a microscope. This powerful tool allows researchers to study the spatial distribution and co-localization of proteins and has been extensively applied to disease diagnosis, identification of biomarker expression, and the investigation of inter-protein interactions [3,4].
Concurrently with its versatility in various studies, immunofluorescence staining requires substantial effort throughout sample preparation, image scanning, and quantification to ensure reliable and reproducible result interpretation [5]. For instance, antigen retrieval or deliberate optimization should be applied to improve staining quality by enhancing specific binding while suppressing non-specific binding. When working with multiple targets using different fluorescent dyes (red fluorescent protein, RFP; green fluorescent protein, GFP; blue fluorescent protein, BFP; and near-infrared fluorescent protein, NIRFP), care must be taken to avoid photobleaching. Beyond the experimental stages, quantifying microscope images is not a trivial task. Visual inspection of images from individual mice involves substantial subjective inputs, which can lead to significant variations, particularly when multiple raters are involved in the same project. Therefore, our current method represents an effort to address this issue by alleviating rater-dependent variations in quantification.
Method details
Histogram features have been explored in medical image processing to reduce subjective biases [6,7]. Our proposed method utilizes histogram-based analyses to identify signal sources of image pixels at different intensities and to separate signals of interest based on histogram features, thus providing a consistent processing framework for various microscope images.
Neuroinflammation plays a crucial role in various diseases and is therefore extensively studied [8,9]. Iba1 is a widely used marker for visualizing microglial morphology and distribution in the brain [10], while CD68 is a lysosomal marker associated with phagocytic activity and commonly used to assess activated microglia [11]. Therefore, Iba1 and CD68 staining are demonstrated as examples. Signals from different channels (i.e., RFP, GFP, BFP) are processed separately (Fig. 1A-1C). For the RFP channel with Iba1-stained signals (Fig. 1D), the histogram plot exhibits two major components: a spike at an intensity of 0 and a Gaussian-like distribution above 0. A similar pattern is observed in the histogram of the CD68-stained image (Fig. 1E). Pixels with an intensity of 0 primarily correspond to blank regions within (i.e., left, right, and 3rd ventricles, Fig. 1F) or surrounding the brain tissue. Since these pixels do not carry tissue information, they are excluded from further histogram analysis.
Fig. 1.
Procedures of the histogram-fitting-based analysis for confocal microscope images. A representative microscope image of a male 5xFAD mouse is utilized for demonstration. The whole slice stained with Iba1 (A), CD68 (B), and DAPI (C) is displayed. (D) and (E) represent the histograms of Iba1- and CD68-stained signals; the x-axis represents pixel signal intensity, while the y-axis represents the pixel count. (F) Mask corresponding to the signal intensity of 0; (G) 1st Gaussian fitting for extracting background signals (µHisto1 = 17); (H) Mask corresponding to signal intensities ranging from 0 to 17; (I) Zoom-in vision of H overlaid on the Iba1-stained image; (J) 2nd Gaussian fitting for extracting signals of interest (µHisto2 = 49); (K) Mask corresponding to signal intensities larger than 49; (L) Zoom-in vision of K overlaid on the Iba1-stained image.
The histogram in Fig. 1D exhibits a shape resembling a normal distribution. Therefore, a Gaussian fitting (referred to as the 1st Gaussian fitting) is applied to model the signals with intensities greater than 0 [12], as shown in Fig. 1G. A Gaussian function centered at intensity = 17 (which may vary across images; this is just an example) is obtained. For image pixels with intensities ranging from 0 to 17, they are distributed throughout the entire brain section (Fig. 1H). Under a zoom-in vision (Fig. 1I), it is observed that these pixels correspond to background signals (bright dots) surrounding the Iba1+ regions (red dots).
From Fig. 1G, the 1st Gaussian fitting exhibits good agreement with the histogram at intensities below 17 but not above 17. By subtracting the 1st Gaussian fitting from the original histogram, we obtain a residual histogram, as shown in Fig. 1J. The residual histogram displays a Gaussian-like distribution, and a second Gaussian fitting (referred to as the 2nd Gaussian fitting) can be applied (Fig. 1J). The 2nd Gaussian fitting is centered at an intensity of 49 (which can vary across images). The pixels with intensities greater than 49 are distributed across the entire brain section (Fig. 1K), and the zoom-in view suggests that these pixels correspond primarily to Iba1+ signals (Fig. 1L). The threshold value for identifying signals of interest can be set as or , where K is a scaling factor, µ is the central value of the Gaussian function , and V0 denotes a compensatory offset [13]. Once the scaling factor and compensatory offset are determined, no further user-dependent input is required for the threshold value.
The GFP channel with CD68-stained signals is processed using the same procedures described above for the RFP channel. Once the scaling factor and compensatory offset for the GFP channel are determined, co-localization between RFP and GFP can be quantified. The ratio between the pixel counts of co-localization (i.e., Iba1+CD68+) and the RFP channel (Iba1+) represents the percentage of activated microglia and is often utilized as a marker for neuroinflammation [13,14].
The above procedures can be carried out using our developed graphical-user-interface tool based on the MATLAB (MathWorks, Natick, MA) platform. The feasibility of this method is not limited to Iba1 and CD68 staining. When applied to analyze microscope images with other types of staining, threshold values may need to be re-optimized.
Method validation
We collected images using a confocal microscope (Zeiss, Germany) from a cohort of 5xFAD mice (12 months old; N = 3 5xFAD and N = 3 littermate wild-type mice) under identical imaging conditions to validate the proposed quantification method. Mouse brains were extracted after transcardial perfusion, fixed with 4 % paraformaldehyde (PFA) solution, and dehydrated with 30 % sucrose [15]. Axial brain slices were sectioned at a thickness of 30 µm with a cryostat [14,16]. Float staining of Iba1 and CD68 was performed, and three representative brain sections were selected per mouse. Visual reading using the ZEN software (operating software of Zeiss microscopes) was carried out by two raters, with discussion to determine threshold values for extracting Iba1+ and CD68+ signals across all slices (3 slice per mouse, 18 slices in total). Correlations between the rater reading threshold values and histogram-based features were then explored.
Regarding the Iba1+ signals, there was a significant correlation between rater reading threshold and µHisto1 (Fig. 2A, R2 = 0.665, P < 0.0001), µHisto2 (Fig. 2B, R2 = 0.706, P < 0.0001), or µHisto2 - µHisto1 (Fig. 2C, R2 = 0.461, P = 0.002), suggesting that histogram-based features could potentially be used to determine threshold values. Comparing the coefficient of determination (R2), µHisto1 and µHisto2 performed better than their difference, i.e., µHisto2 - µHisto1. We further performed Pearson correlation analyses between µHisto1 and µHisto2 and found a significant correlation (Fig. 2D, R2 = 0.813, P < 0.0001). Therefore, estimating threshold values using µHisto1 and µHisto2 is equivalent. The equation describing the correlation between rater reading threshold and µHisto1 was: .
Fig. 2.
Correlations between rater reading threshold and center of 1st Gaussian fitting (µHisto1) (A and E), center of 2nd Gaussian fitting (µHisto2) (B and F), center difference between Gaussian fittings (µHisto2 - µHisto1) (C and G) and correlations between µHisto1 and µHisto2 (D and H). (A-D) correspond to Iba1 staining and (E-H) correspond to CD68 staining.
Similar correlations were observed in the CD68+ signals, including the correlation between rater reading threshold and µHisto1 (Fig. 2E, R2 = 0.484, P = 0.001), µHisto2 (Fig. 2F, R2 = 0.463, P = 0.002), or µHisto2 - µHisto1 (Fig. 2G, R2 = 0.305, P = 0.017), as well as the correlation between µHisto1 and µHisto2 (Fig. 2H, R2 = 0.936, P < 0.0001). Similar conclusions were reached, and the equation describing the correlation between the rater reading threshold and µHisto1 was: .
There were significant differences in the Iba1+CD68+/Iba1+ level between WT and 5xFAD mice under both the rater reading threshold (Fig. 3A, P = 0.017) and the histogram-based threshold (Fig. 3B, P = 0.016). Pearson correlation analysis revealed a significant correlation between Iba1+CD68+/Iba1+ levels under these two threshold schemes (Fig. 3C, P = 0.002). The coefficient of determination of unity line was 0.900, suggesting a good agreement between the quantitative results obtained using the different threshold schemes.
Fig. 3.
Global Iba1+CD68+/Iba1+ levels in the 5xFAD mouse model. Comparison of Iba1+CD68+/Iba1+ between WT and 5xFAD under the rater reading threshold (A) and histogram-based threshold (B). Correlation of Iba1+CD68+/Iba1+ levels between the histogram-fitting-based and rater-reading-based quantification (C). The solid line represents the unity line (i.e., y = x).
In principle, a two-step Gaussian fitting should be performed to extract the signals of interest. However, due to the correlation between the center values of the two Gaussian fittings, signal quantification can be equivalently achieved using the results of the first Gaussian fitting. Therefore, a single Gaussian fitting is ultimately used for simplicity.
Equations in the validation section were derived from the validation data of 12-month-old 5xFAD mice. If a different set of immunofluorescence images is used, the threshold equations may differ. If a staining other than Iba1 and CD68 is targeted, a new training dataset (can be part of the project data) is required. In such cases, image reading by multiple raters with discussion, as performed in the current study, is conducted alongside histogram fitting to determine the center values of Gaussian functions. This process enables the generation of a new set of threshold equations for subsequent image analyses.
In the literature, image reading by experienced rater(s) using image-processing software (e.g., ImageJ) is the most commonly used method for quantifying immunofluorescent images across studies [1,14,[17], [18], [19]]. To reduce subjective biases, a blinded scheme – where raters cannot access group information – may be implemented [20]. A method incorporating histogram analysis and two-dimensional plot profiling has been proposed for quantifying high-resolution panoramic images [21]. To the best of our knowledge, this study is the first to examine the signal sources of image pixels using Gaussian fitting and to leverage results of Gaussian fitting to guide the quantification of immunofluorescent images. The histogram-fitting-based method provides image-specific threshold values for quantifying immunofluorescent signals, which are traditionally determined through time-consuming discussions between at least two experienced raters. Once threshold equations are pre-obtained from a training dataset, this method standardizes the processing of immunofluorescent images. Compared to the conventional rater reading approach, the histogram-fitting-based method enhances processing efficiency by eliminating the need for multiple raters and reduces rater-dependent and time-dependent biases, ensuring consistent results regardless of the operator or timing.
Limitations
Our method relies on the Gaussian fitting to determine signal distributions in confocal microscope images. If immunofluorescent images are acquired using non-confocal microscopes, our method may not be effective in isolating signals of interest due to confounding signals from adjacent sample layers. A relatively small sample size was used for validation in this study. Despite achieving a decent coefficient of determination, considerable variability was observed among the three samples. The current validation study serves as a proof-of-principle demonstration of the histogram-fitting-based method. Future studies with a larger sample size will be essential for verifying its reliability and reproducibility. Additionally, the method may not work well when the microscope image has extremely low intensities (e.g., due to insufficient laser power). It is important to note that laser power optimization is typically performed before scanning confocal images. A general criterion for determining the suitability of performing histogram-fitting-based method is that: the histogram of a microscope image should contain more than half of the Gaussian function (see Figure S1 in the Supplementary Material).
Ethics statements
Experiments involved in this study were conducted in accordance with the National Institutes of Health guidelines for the care and use of laboratory animals and the ARRIVE guidelines and approved by the Johns Hopkins Medical Institution Animal Care and Use Committee.
CRediT author statement
Xiuli Yang: Conceptualization, Methodology, Software, Validation, Writing – original draft. Yuguo Li: Investigation, Writing – review & editing. Zhiliang Wei: Conceptualization, Methodology, Software, Resources, Data curation, Funding acquisition, Writing – review & editing.
Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgments
This work was supported by the National Institutes of Health [grant numbers R01 AG081932].
Footnotes
Related research article: None
For a published article: Han X, Liu G, Lee SS et al. Metabolic and vascular imaging markers for investigating Alzheimer's disease complicated by sleep fragmentation in mice. Front Physiol 2024; 15: 1456690
Supplementary material associated with this article can be found, in the online version, at doi:10.1016/j.mex.2025.103306.
Contributor Information
Xiuli Yang, Email: xyang91@jhmi.edu.
Zhiliang Wei, Email: zhiliang.wei@jhu.edu.
Appendix. Supplementary materials
Data availability
Data will be made available on request.
References
- 1.Liu G., Wang J., Wei Z., et al. Elevated PDGF-BB from bone impairs hippocampal vasculature by inducing pdgfrβ shedding from pericytes. Adv. Sci. 2023;10 doi: 10.1002/advs.202206938. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Wang J., Fang C.L., Noller K., et al. Bone-derived PDGF-BB drives brain vascular calcification in male mice. J. Clin. Invest. 2023;133(23) doi: 10.1172/JCI168447. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Kim C.K., Yang X.L., Kim Y.J., et al. Effect of long-term treatment with Fimasartan on transient focal ischemia in rat brain. Biomed. Res. Int. 2015;2015 doi: 10.1155/2015/295925. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Sevigny J., Chiao P., Bussiere T., et al. The antibody aducanumab reduces Abeta plaques in Alzheimer's disease. Nature. 2016;537(7618):50–56. doi: 10.1038/nature19323. [DOI] [PubMed] [Google Scholar]
- 5.Im K., Mareninov S., Diaz M.F.P., et al. An introduction to performing immunofluorescence staining. Methods Mol. Biol. 2019;1897:299–311. doi: 10.1007/978-1-4939-8935-5_26. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Waldenberg C., Hebelka H., Brisby H., et al. MRI histogram analysis enables objective and continuous classification of intervertebral disc degeneration. Eur. Spine J. 2018;27(5):1042–1048. doi: 10.1007/s00586-017-5264-7. [DOI] [PubMed] [Google Scholar]
- 7.Ren J., Yuan Y., Tao X. Histogram analysis of diffusion-weighted imaging and dynamic contrast-enhanced MRI for predicting occult lymph node metastasis in early-stage oral tongue squamous cell carcinoma. Eur. Radiol. 2022;32(4):2739–2747. doi: 10.1007/s00330-021-08310-0. [DOI] [PubMed] [Google Scholar]
- 8.Heneka M.T., Carson M.J., El Khoury J., et al. Neuroinflammation in Alzheimer's disease. Lancet Neurol. 2015;14(4):388–405. doi: 10.1016/S1474-4422(15)70016-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Alsbrook D.L., Di Napoli M., Bhatia K., et al. Neuroinflammation in acute ischemic and hemorrhagic stroke. Curr. Neurol. Neurosci. Rep. 2023;23(8):407–431. doi: 10.1007/s11910-023-01282-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.González Ibanez F., Picard K., Bordeleau M., et al. Immunofluorescence staining using IBA1 and TMEM119 for microglial density, morphology and peripheral myeloid cell infiltration analysis in mouse brain. J. Vis. Exp. 2019;152 doi: 10.3791/60510. [DOI] [PubMed] [Google Scholar]
- 11.Lier J., Streit W.J., Bechmann I. Beyond activation: characterizing microglial functional phenotypes. Cells. 2021;10(9):2236. doi: 10.3390/cells10092236. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Rost M., Favaretto M., De Clercq E. Normality in medicine: an empirical elucidation. Philos. Ethics Humanit. Med. 2022;17(1):15. doi: 10.1186/s13010-022-00127-z. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Han X., Liu G., Lee S.S., et al. Metabolic and vascular imaging markers for investigating Alzheimer's disease complicated by sleep fragmentation in mice. Front. Physiol. 2024;15 doi: 10.3389/fphys.2024.1456690. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Yao M., Wei Z., Nielsen J.S., et al. Senolytic therapy preserves blood-brain barrier integrity and promotes microglia homeostasis in a tauopathy model. Neurobiol. Dis. 2024;202 doi: 10.1016/j.nbd.2024.106711. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Liu H., Zhang C., Xu J., et al. Huntingtin silencing delays onset and slows progression of Huntington's disease: a biomarker study. Brain. 2021;144(10):3101–3113. doi: 10.1093/brain/awab190. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Liu H., Chen L., Zhang C., et al. Glymphatic influx and clearance are perturbed in Huntington's disease. JCI. Insight. 2024;9 doi: 10.1172/jci.insight.172286. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Chen C., Kumbhar R., Wang H., et al. Lymphocyte-activation gene 3 facilitates pathological tau neuron-to-neuron transmission. Adv. Sci. 2024;11(16) doi: 10.1002/advs.202303775. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Bussian T.J., Aziz A., Meyer C.F., et al. Clearance of senescent glial cells prevents tau-dependent pathology and cognitive decline. Nature. 2018;562(7728):578–582. doi: 10.1038/s41586-018-0543-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Harrison I.F., Ismail O., Machhada A., et al. Impaired glymphatic function and clearance of tau in an Alzheimer's disease model. Brain. 2020;143(8):2576–2593. doi: 10.1093/brain/awaa179. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Cothren S.D., Meyer J.N., Hartman J.H. Blinded visual scoring of images using the freely-available software blinder. Bio Protoc. 2018;8(23):e3103. doi: 10.21769/BioProtoc.3103. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Duplancic R., Kero D. Novel approach for quantification of multiple immunofluorescent signals using histograms and 2D plot profiling of whole-section panoramic images. Sci. Rep. 2021;11(1):8619. doi: 10.1038/s41598-021-88101-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
Data will be made available on request.