Skip to main content
JID Innovations logoLink to JID Innovations
. 2024 Feb 16;4(3):100270. doi: 10.1016/j.xjidi.2024.100270

An Optimized and Advanced Algorithm for the Quantification of Immunohistochemical Biomarkers in Keratinocytes

Lindsey G Siegfried 1, Sophie M Bilik 1, Jamie L Burgess 1, Paola Catanuto 1, Ivan Jozic 1, Irena Pastar 1, Rivka C Stone 1,∗,2, Marjana Tomic-Canic 1,∗,2
PMCID: PMC11097113  PMID: 38756235

Abstract

Advancements in pathology have given rise to software applications intended to minimize human error and improve efficacy of image analysis. Still, the subjectivity of image quantification performed manually and the limitations of the most ubiquitous tissue stain analysis software requiring parameters tuned by the observer, reveal the need for a highly accurate, automated nuclear quantification software specific to immunohistochemistry, with improved precision and efficiency compared with the methods currently in use. We present a method for the quantification of immunohistochemical biomarkers in keratinocyte nuclei proposed to overcome these limitations, contributing sensitive shape-focused segmentation, accurate nuclear detection, and automated device-independent color assessment, without observer-dependent analysis parameters.

Keywords: Automated digital pathology, Biomarker, Epidermal structures, Immunohistochemistry, Quantification

Introduction

Immunohistochemistry (IHC) has widespread usage for reliable, cost-effective protein expression visualization and analysis in clinical diagnostics as well as biomarker research. The fundamental chemistry of IHC is based on the deposition of a chromogen such as diaminobenzidine (DAB) in the location of an antigen–antibody complex on slide-mounted tissue sections, producing pigmentation in the areas where a protein of interest is expressed (Sukswai and Khoury, 2019). The evolution of IHC from diagnostic to prognostic biomarker analysis has created a demand for stain quantification. However, traditional manual assessment by a pathologist is impractical owing to the volume of images required (Taylor and Levenson, 2006). Thus, we developed a Standardized Algorithm for Nuclear DAB Detection (SANDD) to improve quantification accuracy compared with that of images evaluated by existing methods.

Digital pathology, facilitated by the increasing interest in biomarker data and the prevalence of digital slide imaging, presents many challenges despite great promise. The potential that fully automated, unsupervised, artificial intelligence–based image assessment looms on the horizon is built on contributions to computational pathology dating as early as 1965 (Madabhushi and Lee, 2016; Mendelsohn et al, 1965). In the past decades, numerous approaches to IHC and other tissue image quantification have been detailed in the literature, each presenting contributions although subject to common caveats and pitfalls (Akakin et al, 2015). Approaches detailed in the literature predominantly focus on specific protein expression in limited cell or tissue types owing to the complexity of histologic structures (Chen et al, 2019; Fernández- Carrobles et al, 2017; Valdebran et al, 2020). Development of deep learning neural networks in tissue image analysis is an ongoing area of research, with the aim of broad application and assessment superior to the eye of a pathologist (Seo et al, 2020; Wang et al, 2019).

The quirks of IHC notoriously result in intra- and inter-batch variability due to a combination of factors, and additional aspects contribute to the difficulty of accurate nuclear segmentation. This is attributable in part to the unpredictable effects of the process of pathology preparation, tissue heterogeneity, and variations in imaging conditions (Cregger et al, 2006; Di Cataldo et al, 2010). IHC variability and approaches for standardizing preanalytic methods for the stain itself are reviewed elsewhere but nonetheless are necessary to address, especially in biomarker validation trials (Anagnostou et al, 2010; Elliott et al, 2015; Engel and Moore, 2011; Grube, 2004; Guedes et al, 2019; Janardhan et al, 2018; Libard et al, 2019).

Previously published literature on digital pathology image analysis is based on IHC of tissue microarray (TMA), especially in cancer diagnostics and research. Automated segmentation of TMA images is a more efficient process than whole-section segmentation because the regions or cores are small, defined shapes with few nuclei compared to the original paraffin-embedded sample from which the cores are taken. When sections of formalin-fixed paraffin-embedded (FFPE) human skin are evaluated as biopsies in their entirety rather than small regions of interest within a biopsy section, image segmentation challenges generally unique to skin arise owing to the nature of skin layers. Although automated segmentation of keratinocyte nuclei from the cytoplasm is straightforward, as detailed here, the separation of epidermal and dermal compartments within an image remains best performed by a human observer. Recent attempts to segment the epidermis and dermis in low-magnification hematoxylin and eosin (H&E) FFPE sections have been successful, although the contrast between dermis and epidermis is more visually apparent on H&E than on hematoxylin and DAB stain (Xu and Mandal, 2015).

Comparison with other methods

ImageJ plugins have been developed for cell counting and stain scoring of IHC, although few protocols have been detailed in the literature with sufficient information for reproducibility (Crowe and Yue, 2019; Varghese et al, 2014). ImageJ and its associated plugins are freely available from the National Institutes of Health, making it an attractive approach to researchers (Schneider et al, 2012). However, they require subjective human input such as setting background color thresholds. To minimize the time-consuming nature of some of these approaches, groups may divide the analysis across multiple observers and thus introduce a significant amount of bias and interobserver variability.

The most widely used open-source software available to perform nuclear stain quantification is QuPath (Bankhead et al, 2017). QuPath provides myriad algorithms for tissue image processing and whole-slide imaging in a graphical user interface as well as the ability to execute user-designed scripts. The contributions of QuPath to digital pathology are globally extensive, and it is the framework of choice for researchers for a multitude of applications (Humphries et al, 2021).

However, the literature lacks detailed and user-friendly protocols for users without considerable mathematical and computing backgrounds. As with ImageJ, substantial amounts of subjective decision making are required to set color and segmentation thresholds as well as annotations of specific regions (Table 1). Manual removal of problematic areas on images or slides or TMA can also be necessary when using QuPath (Morriss et al, 2020). Again, similar to the ImageJ approaches, analysis by 1 observer may be consistent, but the introduction of multiple observers diminishes consistency. Initial attempts to quantify IHC staining of biomarkers of interest in the epidermis of whole human skin sections across multiple users in our group using QuPath yielded not only unacceptable variability between observers (Table 2 and Figure 1) but also inaccurate cell detection (Figure 2), revealing the need for an improved workflow for accurate nuclear detection and objective color assessment.

Table 1.

Advantages and Disadvantages of Common Digital Pathology Methods for Quantifying IHC Staining

Approach Advantages Disadvantages
ImageJ (plugins IHC Profiler, ImmunoRatio) Free, open access
Multiple applications documented in the literature
Ongoing third-party plugin development
Extensive user interaction
Expertise required to operate effectively
Lack of detailed protocols
QuPath Broad functionality
Widespread use
Extensive user interaction
Error rate
Expertise required to operate effectively
SANDD Ease of use
No user-defined thresholds
Improved accuracy over other methods
Handling of large images
Only applied to keratinocytes
Specific to nuclear staining
Region of interest selected by the user

Abbreviations: IHC, immunohistochemistry; SANDD, Standardized Algorithm for Nuclear Diaminobenzidine Detection.

Table 2.

Comparison of QuPath with SANDD Total and Positive Nuclei Counts of Keratinocytes Stained for c-Myc in the Same Set of 5 Images, Quantified by 4 Observers

Image User QuPath
SANDD
CV (QuPath) CV (SANDD)
Total Nuclei (Count) Positive Nuclei (Count) Positive Nuclei (%) Total Nuclei (Count) Positive Nuclei (Count) Positive Nuclei (%)
Image #1 1 3216 2792 86.82 3943 2921 74.08 23.23 1.549
2 4103 2145 52.28 3971 2910 73.28
3 1838 1583 86.13 3347 2430 72.60
4 2406 2242 93.18 3424 2577 75.26
Image #2 1 7105 4532 63.79 6830 4764 69.75 26.75 1.879
2 7788 3974 51.03 5993 4255 71.00
3 7207 4252 59.00 5741 4100 71.42
4 3497 3213 91.88 5518 3780 68.50
Image #3 1 5982 4229 70.70 6381 4698 73.62 34.96 3.154
2 6914 2541 36.75 5186 4057 78.23
3 2069 1611 77.86 4959 3914 78.93
4 3235 3080 95.21 4754 3716 78.17
Image #4 1 4703 3897 82.86 4758 2487 52.27 22.33 3.05
2 2853 1562 54.75 4237 2295 54.17
3 4942 2913 58.94 3234 1676 51.82
4 2910 2469 84.85 3836 1930 50.31
Image #5 1 2844 2051 72.12 4051 1807 44.61 27.88 4.923
2 3086 1126 36.49 3789 1740 45.92
3 2862 1599 55.87 3218 1609 50.00
4 1773 1232 69.49 3488 1622 46.50

Abbreviations: #, number; CV, coefficient of variation; SANDD, Standardized Algorithm for Nuclear Diaminobenzidine Detection.

CV is calculated across observer measurements of percentage positive nuclei.

Figure 1.

Figure 1

Corresponding set of images from 5 DFUs analyzed by QuPath and SANDD to obtain total and positive nuclei counts. These images are referenced in Figure 10 and Table 2. Bar = 100 μm. DFU, diabetic foot ulcer; SANDD, Standardized Algorithm for Nuclear Diaminobenzidine Detection.

Figure 2.

Figure 2

Results from positive cell detection function in QuPath. (a) QuPath interface with nuclei detected and user-defined settings for positive nuclei. (b) Portion of the region of interest showing uncounted nuclei (lacking a red or blue outline) as well as individual nuclei detected as multiple fragments. Bar = 100 μm.

Results

Development of SANDD

This program utilizes the OpenCV (Open Computer Vision) library (version 4.5.5), a library of functions for image processing, and was written and run in Python 3.9.12. Upon running, an image is imported using OpenCV standard blue, green, and red color space; converted to red, green, and blue (RGB); and stored in grayscale and L∗a∗b∗ conversions.

Scales such as RGB and cyan, magenta, yellow, and key (CMYK) are used to describe color. The CIELAB (L∗a∗b∗) color space expresses color in 3 dimensions: L∗, with 0 representing black and 100 representing white; a∗, with negative values representing green and positive values representing red; and b∗, with negative values representing blue and positive values representing yellow (Figure 3). Unlike RGB, this color space is device independent and is validated for quantifying color in multiple industries. The standard illuminant or white point may vary from industry to industry, although this application uses the recommended International Commission on Illumination standard illuminant D65 for this color space, which approximates mid-day light with a clear sky in Western Europe (Fullerton et al, 1996). Conversion of RGB images to L∗a∗b∗ is rapidly performed by the OpenCV cvtColor() function and no longer possesses the time-consuming constraints of color space conversion previously required (Bradski, 2000; Connolly and Fleiss, 1997).

Figure 3.

Figure 3

Three-dimensional representation of the L∗a∗b∗ color space.

Image thresholding is a commonly used process to identify shapes and characters within an image and produces a binary segmented image containing a background in black and objects in white. Depending on the application, different approaches for thresholding or binarization may be appropriate. Given the variable color and intensity landscape of tissue sections, applying a universal threshold leads to inadequate binarization—a more sensitive threshold may register areas of noise as nuclei, and a less sensitive threshold may not register light-colored nuclei with less intense staining. Varying distances between nuclei and varying nuclear morphology resulting from normal keratinocyte differentiation make skin biopsies susceptible to oversegmentation that is common with techniques such as the watershed algorithm that separates objects from an image on the basis of the definite foreground and background of the entire image (Di Cataldo et al, 2010). Segmentation using partitions or subregions proportional to the image size instead was selected for adaptability and more precise handling using the OpenCV function adaptiveThreshold(). Testing of various partitions per image relative to whole image size yielded the cleanest and most accurate thresholding at 125,000 partitions per image.

Once nuclei are separated from the cytoplasm to produce a binary image, a series of morphological transformations in the OpenCV library such as morph.close() and morph.erode() are performed to separate densely packed nuclei and clearly define nuclear edges. Within the OpenCV library, the contour detection function findContours() was selected as the most appropriate for keratinocyte nuclear shape detection. The boundaries of the nuclei are detected and stored as coordinates using drawContours(), and a binary mask of each nucleus is generated to produce a list of coordinates of all pixels within the boundary. Iterating pixel-by-pixel, contour-by-contour, the whole image in L∗a∗b∗ color space is referenced. The approach of averaging nucleus color is more efficient with respect to runtime and memory; however, the need for utmost precision dictates that the data loss that occurs when averaging over areas outweighs the efficiency advantage. Nuclei often do not stain evenly and possess areas of brown and blue concurrently, also a factor in interobserver variability.

The ratio of red to blue and presence of yellow are used to determine a positive, DAB-stained pixel. In applications where DAB staining remains exclusively nuclear and does not generate cytoplasmic stain, the average cytoplasmic color can be used as a reference point to normalize for sections with low-contrast overall staining or to account for sections with nonspecific staining throughout. If the ratio of red to blue and the presence of yellow within the pixel indicates brownness, it is set to positive. A ratio of 40% positive pixels within a nucleus designates the whole nucleus as positive. Setting a minimum pixel percent positive per nucleus threshold eliminates the need for the commonly used user-defined threshold with respect to the entire image and/or its associated negative control. Size constraints remove nuclei below the 5th and above the 95th percentiles to avoid the implementation of a universal size constraint. These procedures are depicted graphically in Figure 4.

Figure 4.

Figure 4

Flowchart demonstrating the steps of the SANDD process. IHC, immunohistochemistry; SANDD, Standardized Algorithm for Nuclear Diaminobenzidine Detection.

The program returns values for total, positive, and negative nuclei as well as images corresponding to each stage of the segmentation, cleanup, and detection processes for quality control (Figure 5). The final image generated contains positive nuclei indicated by a red outline and negative nuclei indicated by a blue outline.

Figure 5.

Figure 5

Image processing workflow in SANDD. (a) Original image of IHC-stained skin biopsy for phosphorylated glucocorticoid receptor. (b) Image after preprocessing in Photoshop to isolate epidermis. (c) Binary image after thresholding and segmentation. Nuclei are in white. (d) Binary image after thresholding and segmentation. Cytoplasm is in white. (e) Result of nucleus detection. Detections are outlined in green. (f) Final image output with positive nuclei outlined in red and negative nuclei outlined in blue. (g) Final image composited with original whole-section image. Bar = 100 μm. IHC, immunohistochemistry; SANDD, Standardized Algorithm for Nuclear Diaminobenzidine Detection.

Anticipated results

This protocol generates numeric data for the counts of total, positive, and negative nuclei detected in IHC staining images as well as TIFF images for visualization and quality control along the program pipeline (Table 2 and Figure 1). Results will be unchanged when rerunning the program if the image and the code parameters are unchanged. The numeric data produced by this protocol allows for a quantitative comparison of nuclear biomarker expression between human skin samples.

The application emphasized in the creation of this protocol was the prognostic implications of skin biopsy staining positivity relative to a hypothesized threshold. The data generated by this protocol demonstrated that segmentation of epidermal keratinocytes in diabetic foot ulcer (DFU) biopsy and debridement tissue using SANDD yielded more accurate nuclear shape detection than using QuPath (Figure 6). Implementation of this protocol in analyzing murine and porcine skin samples demonstrated future applicability in animal studies (Figures 7, 8, and 9). In addition, the coefficient of variation (CV) between nuclei measurements from multiple users independently quantifying the same set of images was significantly lower when using SANDD than when using QuPath (Figures 1 and 10 and Table 2).

Figure 6.

Figure 6

Performance of QuPath versus SANDD in the region of interest fromFigure 1. (a) QuPath. (b) SANDD. QuPath fails to detect some nuclei (star) and splits single nuclei into fragments, with inconsistent detection of positive staining (red vs blue rim) in fragments from a single nucleus (arrows). Bar = 100 μm. SANDD, Standardized Algorithm for Nuclear Diaminobenzidine Detection.

Figure 7.

Figure 7

SANDD application to murine skin stained for phosphorylated c-Jun. (a) Original image of IHC-stained porcine skin. (b) Isolated epidermal segment produced in Photoshop. (c) Final image showing negative nuclei outlined in blue and positive nuclei outlined in red. Bar = 4286 μm. IHC, immunohistochemistry; SANDD, Standardized Algorithm for Nuclear Diaminobenzidine Detection.

Figure 8.

Figure 8

QuPath application to porcine skin IHC stained for phosphorylated c-Jun. (a) Original image of IHC-stained porcine skin. (b) Final image showing negative nuclei outlined in blue and positive nuclei outlined in red. Bar = 4180 μm. IHC, immunohistochemistry.

Figure 9.

Figure 9

Qupath application to murine skin IHC stained for phosphorylated c-Jun. (a) Original image of IHC-stained murine skin. (b) Final image showing negative nuclei outlined in blue and positive nuclei outlined in red. Bar = 4286 μm. IHC, immunohistochemistry.

Figure 10.

Figure 10

An improved method for quantification of nuclear biomarkers. (a) Comparison of QuPath with SANDD for percentage of positive keratinocytes stained for c-Myc in a set of 5 images, quantified by 4 observers. (b) Comparison of the coefficients of variation of quantifications (% positive nuclei) obtained by 4 observers analyzing images using QuPath versus SANDD. Data are expressed as mean ± SEM for n = 5 images. P = .008 using 2-tailed paired t-test. SANDD, Standardized Algorithm for Nuclear Diaminobenzidine Detection.

Discussion and Potential Applications

Application of the protocol to nuclear c-Myc quantification in keratinocytes

Activation of c-Myc in chronic wounds such as DFUs is associated with a hyperproliferative, nonmigratory epidermis that is incompatible with healing (Sawaya et al, 2018; Stojadinovic et al, 2005). Quantitative c-Myc expression in keratinocytes from biopsies or debridement tissue of DFUs is proposed as a biomarker for healing prognosis. Phosphorylated glucocorticoid receptor (pGR) is also proposed to contribute to persistence of the nonhealing chronic wound phenotype (Stojadinovic et al, 2007).

Tissue from the wound edge of DFUs at weeks 1 and 5 of study enrollment underwent routine processing for paraffin embedding, and sections were subsequently stained for both c-Myc and pGR. Imaging was performed on (Keyence slide scanner) at ×20 magnification. Initial quantification of c-Myc and pGR expression using the positive cell detection feature in QuPath yielded the results mentioned earlier (Figure 10), eventually leading to the development of this protocol.

Application of the protocol to nonhuman epidermal biomarker quantification

To further demonstrate the potential uses of SANDD, we evaluated IHC-stained animal skin as well. Porcine and murine skin, among other common model species, share epidermal characteristics and can be analyzed using this method. Staining for phosphorylated c-Jun in both porcine skin (Figure 11) and murine skin (Figure 7) affirmed that the epidermal morphology similarities to human skin allow for SANDD-based biomarker analysis. Comparison of QuPath performance with that of SANDD in murine and porcine skin showed similar improvements in detection of nuclei and in counts of positively stained nuclei (Figures 8 and 9 and Table 3).

Figure 11.

Figure 11

SANDD application to porcine skin IHC stained for phosphorylated c-Jun. (a) Original image of IHC-stained porcine skin. (b) Isolated epidermal segment produced in Photoshop. (c) Final image showing negative nuclei outlined in blue and positive nuclei outlined in red. Bar = 100 μm. IHC, immunohistochemistry; SANDD, Standardized Algorithm for Nuclear Diaminobenzidine Detection.

Table 3.

Comparison of QuPath with SANDD for Percentage of Positive Keratinocytes Stained for Phosphorylated c-Junin Murine and Porcine Skin

Skin QuPath
SANDD
Total Nuclei (Count) Positive Nuclei (Count) Positive Nuclei (%) Total Nuclei (Count) Positive Nuclei (Count) Positive Nuclei (%)
Porcine skin 1291 427 33.08 1292 240 18.58
Murine skin 291 99 34.02 290 102 35.17

Abbreviation: SANDD, Standardized Algorithm for Nuclear Diaminobenzidine Detection.

Limitations

The requirement to predefine the epidermis or epidermal region of interest can be time consuming in a high-throughput endeavor. Although the user-defined area of a whole-skin section is more representative of the tissue than TMA, and a minimum number of nuclei is suggested to maintain as representative an image as possible, subjective decision making is required to define the region of interest. Future directions should focus on efficient computer-automated identification of skin anatomy in high-magnification IHC images to continue to reduce subjectivity and potential bias.

Materials and Methods

Expertise needed to implement the protocol

For the application mentioned earlier, this program can be implemented without specialized coding or computational expertise. If project-specific modifications are necessary, a user competent in Python coding should perform them. Users with basic coding knowledge or familiarity with Python will find the simple, readable structure of the source code manageable.

Timing

After IHC staining and microscopy, the preprocessing of each image takes approximately 10 minutes. Images tested were taken at ×20 magnification, ranged in size from 50 to 500 mb each, and had widths and heights between 2000 and 7000 pixels. The reported runtime per image ranged from 4 to 10 minutes depending on the size of the image. Runtime is expected to vary on the basis of the specifications of the computer; thus, it is anticipated that even higher-performance computing power will reduce the runtime. The advantage of a device-independent and uniform color space such as L∗a∗b∗ allows users to maximize speed using multiple computers to run the program.

Statistical methods

For each image analyzed by QuPath versus SANDD, mean, SD, and CV (calculated as SD divided by mean) were determined for nuclei measurements across observers. Shapiro–Wilk test was used to confirm normal distribution of nuclei measurements and CVs. Two-tailed paired t-test was used to detect differences between QuPath and SANDD quantifications by image, with significance at P < .05.

Equipment needed

The following equipment are needed:

  • 1.

    A computer: This program was developed and run on a Dell. Personal computer (PC) with an 11th-generation Intel Core i7-11700 central processing unit (CPU), 512 GB PM9A1 NVMe Samsung drive, an Intel UHD Graphics 750 graphics processing unit (GPU), and an NVIDIA is needed.

  • 2.

    T1000 GPU: For efficient and timely handling of large images, a computer with large memory capacity and an advanced GPU is recommended but not required; a standard PC is capable of running the program, albeit with increased time needed per operation.

  • 3.

    Adobe Photoshop: Images used for this application were processed using Photoshop CC 2022.

  • 4.

    Microsoft Office Excel.

Procedure

Preparation

Users proficient in coding may prefer to approach setup (package installation, environment handling, etc) using various other Python distributions, the Anaconda prompt, or a built-in command line. For novice users, the following instructions serve as a guide to equipping the computer to run the program.

On the computer(s) intended for use of this program, download and install a Python coding platform or integrated development environment (IDE). Anaconda (individual version 2022.05 used for development of this protocol) is recommended for user friendliness and the ability to create a sandbox or virtual environment in which packages are easily managed and minimal troubleshooting is required for users unfamiliar with coding. In addition to the Python 3 distribution provided by Anaconda, it can be used to install Python packages within environments.

In the Anaconda Navigator, create an environment using the Create button in the Environments tab, naming it as desired and selecting Python version 3.9.12. With the new environment selected, a search bar in the top right corner allows one to parse through available Python packages. Installation is only necessary upon first use, given that one is using the same environment for every session. Search the following terms and proceed with installation: Jupyterlab, Numpy, Opencv, and Matplotlib.

Selecting the green play button next to the environment name provides the option to open Jupyter Notebook within the environment and opens a new browser window resembling a Finder or File Manager window. Navigating to the directory in which a notebook file (such as the source code for this protocol) is located allows the option to open and fully interact with that notebook file.

Image preprocessing

Import images into Photoshop for isolation of the nucleated epidermis. Duplicate the background layer and hide the original layer for preservation of the original image in the case that starting over is needed. Using the eraser tool, remove all negative space surrounding the tissue section as well as dermis, endothelium, and cornified layers. Because overstaining can be anticipated on the perimeter of IHC sections, erasing these areas is also recommended. Folded areas or artifacts on the section may also be removed as needed, provided that the majority of keratinocyte nuclei are preserved with preference to the basal epidermis. The minimum number of nuclei used in testing this protocol was 2000. Once only the nucleated epidermis remains in the image, apply the Selective Color adjustment under Image > Adjustments. Navigate to the blue channel and set the yellow slider within the blue channel to −100. This step enhances the hematoxylin counterstain and increases the contrast between the chromogen and hematoxylin.

Depending on the size of images generated by the microscope, image size can be increased proportional to the original size to increase the number of pixels per nucleus. The Preserve Details option for resampling as well as resolution control options in Photoshop maintain the image quality during resizing. Images used in testing were enlarged by doubling the number of pixels per inch and resampling with Preserve Details.

Crop the image so that the epidermis is bounded with minimal negative space. Save the image as a TIFF, ensuring run-length encoding layer compression, bit interleaved by pixel, and that no image compression options are selected. For ease of use, it is strongly recommended to save the images in the same directory or folder where the code file is located. It is also recommended to use short filenames that do not contain spaces and to document relationships between short and long identifiers as needed.

To run the program, open the code file in Jupyter Notebook or the IDE of choice. In the final line of code, insert the name of the processed image file between the quotation marks so that the line reads the following: runTotal('your_filename.tif). In the header bar, select the Run button. The program will print out information and export images throughout the run process that confirms that it is actively running as well as an asterisk (∗) in the square brackets in the top left adjacent to the first line of the cell in Jupyter Notebook. On completion of the run, this asterisk is replaced with a number.

The result of the program will be a text printout of the counts of total, positive, and negative nuclei as well as an image with positive and negative nuclei outlined in red and blue, respectively.

The program outputs several images with the original filename as a prefix to prevent overwriting upon running the program multiple times. These images are located in the same directory as the original .tif file and code.

Troubleshooting

In the case of file not found or other missing data errors, ensure that all files (images and code) are located in the same folder. Also, ensure that image filenames are entered into the code file exactly as saved.

In the case of package not found errors, check the Anaconda Navigator and ensure that all packages are installed within the environment being used. Additional Anaconda troubleshooting resources can be found at https://docs.anaconda.com/anaconda/user-guide/troubleshooting/.

Although the dataset used in developing this protocol cannot be made freely available, a set of images is available alongside the code in the GitHub repository for users to attempt the protocol before implementing into projects. Examples of the input and output files are also available.

Quality control

As mentioned earlier, the quirks of IHC require that staining undergo optimization and quality control prior to quantification. Ensuring that staining protocols are as standardized as possible will produce the best quality images to analyze and will proactively reduce the amount of variability.

The export of images throughout the program run allows users to visually inspect the results. Some characteristics of keratinocyte differentiation may lead to improper segmentation, and in the case that a duplicate run is necessary, it is recommended that the image be reprocessed in Photoshop to remove problem areas. For example, beginning from the stratum granulosum, the cornification process alters nuclear morphology, appearing as broadly spread nuclei beginning to dissolve. Because the application of this program is specific to nuclear protein expression, intact nuclei are required. In addition, proteins that translocate from cytoplasm to nucleus or vice versa may not be accurately assessed.

Operations within this program can be optimized for desired applications. Nuclear size constraints, noise filtering, and the color calculation itself are opportunities for modification depending on the needs of the group.

Data Availability Statement

Datasets related to this article can be found at https://github.com/lgsiegfried/SANDD, hosted at Github repository.

ORCIDs

Lindsey G. Siegfried: http://orcid.org/0000-0002-6561-4113

Sophie M. Bilik http://orcid.org/0000-0001-9370-6181

Jamie L. Burgess: http://orcid.org/0000-0002-1137-6850

Paola Catanuto: http://orcid.org/0000-0002-2157-9598

Ivan Jozic: http://orcid.org/0000-0001-5114-9524

Irena Pastar: http://orcid.org/0000-0003-0197-6198

Rivka C. Stone: http://orcid.org/0000-0002-7489-2123

Marjana Tomic-Canic: http://orcid.org/0000-0002-9341-0193

Conflict of interest

The authors state no conflict of interest.

Acknowledgments

We thank the National Institute of Diabetes and Digestive and Kidney Diseases Diabetic Foot Consortium for grant support U01DK119085 (MT-C), U24DK122927 (MT-C), U01DK119085 supplement (MT-C and RCS), and R61 DK131897 (RCS, MT-C) and for providing tissue samples used in this study. This work was also funded by the Dermatology Foundation Physician Scientist Career Development Award (RCS). We owe a debt of gratitude to late Carmen Perez, lead technician of the Dermatopathology Laboratory at the University of Miami Frost Dermatology for her commitment, dedication, and assistance in tissue processing. Marjana Tomic-Canic is the guarantor.

Author Contributions

Conceptualization: LGS, RCS, MT-C; Data Curation: LGS, IP, RCS, MT-C; Formal Analysis: LGS, IJ, IP, RCS, MT-C; Funding Acquisition: RCS, MT-C; Investigation: LGS, SMB, PC, JLB, IJ, IP; Methodology: LGS, RCS, IJ, MT-C; Project Administration: RCS, MT-C; Supervision: IP, RCS, MT-C; Validation: LGS, IJ, IP, RCS, MT-C; Visualization: LGS, SMB, JLB, IP, IJ, RCS, MT-C; Writing - Original Draft Preparation: LGS, IP, RCS, MT-C; Writing - Review and Editing: LGS, SMB, JLB, IP, RCS, MT-C

Declaration of Generative Artificial Intelligence (AI) or Large Language Models (LLMs)

During the preparation of this work the author(s) did not use Generative Artificial Intelligence (AI) or Large Language Models (LLMs).

Disclaimer

The findings expressed are of the authors and may not reflect the views of the Diabetic Foot Consortium nor the National Institute of Diabetes and Digestive and Kidney Diseases.

Footnotes

Cite this article as: JID Innovations 2024.100270

Contributor Information

Rivka C. Stone, Email: rivka.stone@med.miami.edu.

Marjana Tomic-Canic, Email: mtcanic@med.miami.edu.

References

  1. Akakin H, Gokozan H, Otero J, Gurcan M. An adaptive algorithm for detection of multiple-type, positively stained nuclei in IHC images with minimal prior information: application to OLIG2 staining gliomas. Paper presented at: SPIE Medical Imaging. 2015; Olando, FL.
  2. Anagnostou V.K., Welsh A.W., Giltnane J.M., Siddiqui S., Liceaga C., Gustavson M., et al. Analytic variability in immunohistochemistry biomarker studies. Cancer Epidemiol Biomarkers Prev. 2010;19:982–991. doi: 10.1158/1055-9965.EPI-10-0097. [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Bankhead P., Loughrey M.B., Fernández J.A., Dombrowski Y., McArt D.G., Dunne P.D., et al. QuPath: open source software for digital pathology image analysis. Sci Rep. 2017;7 doi: 10.1038/s41598-017-17204-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Bradski G. The OpenCV Library. Dr Dobbs J. 2000;25:120–125. [Google Scholar]
  5. Chen L., Bao J., Huang Q., Sun H. A robust and automated cell counting method in quantification of digital breast cancer immunohistochemistry images. Pol J Pathol. 2019;70:162–173. doi: 10.5114/pjp.2019.90392. [DOI] [PubMed] [Google Scholar]
  6. Connolly C., Fleiss T. A study of efficiency and accuracy in the transformation from RGB to CIELAB color space. IEEE Trans Image Process. 1997;6:1046–1048. doi: 10.1109/83.597279. [DOI] [PubMed] [Google Scholar]
  7. Cregger M., Berger A.J., Rimm D.L. Immunohistochemistry and quantitative analysis of protein expression. Arch Pathol Lab Med. 2006;130:1026–1030. doi: 10.5858/2006-130-1026-IAQAOP. [DOI] [PubMed] [Google Scholar]
  8. Crowe A.R., Yue W. Semi-quantitative determination of protein expression using immunohistochemistry staining and analysis: an integrated protocol. Bio Protoc. 2019;9:e3465. doi: 10.21769/BioProtoc.3465. [DOI] [PMC free article] [PubMed] [Google Scholar]
  9. Di Cataldo S., Ficarra E., Acquaviva A., Macii E. Automated segmentation of tissue images for computerized IHC analysis. Comput Methods Programs Biomed. 2010;100:1–15. doi: 10.1016/j.cmpb.2010.02.002. [DOI] [PubMed] [Google Scholar]
  10. Elliott K., McQuaid S., Salto-Tellez M., Maxwell P. Immunohistochemistry should undergo robust validation equivalent to that of molecular diagnostics. J Clin Pathol. 2015;68:766–770. doi: 10.1136/jclinpath-2015-203178. [DOI] [PubMed] [Google Scholar]
  11. Engel K.B., Moore H.M. Effects of preanalytical variables on the detection of proteins by immunohistochemistry in formalin-fixed, paraffin-embedded tissue. Arch Pathol Lab Med. 2011;135:537–543. doi: 10.5858/2010-0702-RAIR.1. [DOI] [PubMed] [Google Scholar]
  12. Fernández-Carrobles M.M., Bueno G., García-Rojo M., González-López L., López C., Déniz O. Automatic quantification of IHC stain in breast TMA using colour analysis. Comput Med Imaging Graph. 2017;61:14–27. doi: 10.1016/j.compmedimag.2017.06.002. [DOI] [PubMed] [Google Scholar]
  13. Fullerton A., Fischer T., Lahti A., Wilhelm K.P., Takiwaki H., Serup J. Guidelines for measurement of skin colour and erythema. A report from the Standardization Group of the European Society of Contact Dermatitis. Contact Dermatitis. 1996;35:1–10. doi: 10.1111/j.1600-0536.1996.tb02258.x. [DOI] [PubMed] [Google Scholar]
  14. Grube D. Constants and variables in immunohistochemistry. Arch Histol Cytol. 2004;67:115–134. doi: 10.1679/aohc.67.115. [DOI] [PubMed] [Google Scholar]
  15. Guedes L.B., Morais C.L., Fedor H., Hicks J., Gurel B., Melamed J., et al. Effect of preanalytic variables on an automated PTEN immunohistochemistry assay for prostate cancer. Arch Pathol Lab Med. 2019;143:338–348. doi: 10.5858/arpa.2018-0068-OA. [DOI] [PubMed] [Google Scholar]
  16. Humphries M.P., Maxwell P., Salto-Tellez M. QuPath: The global impact of an open source digital pathology system. Comput Struct Biotechnol J. 2021;19:852–859. doi: 10.1016/j.csbj.2021.01.022. [DOI] [PMC free article] [PubMed] [Google Scholar]
  17. Janardhan K.S., Jensen H., Clayton N.P., Herbert R.A. Immunohistochemistry in investigative and toxicologic pathology. Toxicol Pathol. 2018;46:488–510. doi: 10.1177/0192623318776907. [DOI] [PMC free article] [PubMed] [Google Scholar]
  18. Libard S., Cerjan D., Alafuzoff I. Characteristics of the tissue section that influence the staining outcome in immunohistochemistry. Histochem Cell Biol. 2019;151:91–96. doi: 10.1007/s00418-018-1742-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  19. Madabhushi A., Lee G. Image analysis and machine learning in digital pathology: challenges and opportunities. Med Image Anal. 2016;33:170–175. doi: 10.1016/j.media.2016.06.037. [DOI] [PMC free article] [PubMed] [Google Scholar]
  20. Mendelsohn M.L., Kolman W.A., Perry B., Prewitt J.M. Morphological analysis of cells and chromosomes by digital computer. Methods Inf Med. 1965;4:163–167. [PubMed] [Google Scholar]
  21. Morriss N.J., Conley G.M., Ospina S.M., Meehan W.P., Iii, Qiu J., Mannix R. Automated quantification of immunohistochemical staining of large animal brain tissue using QuPath software. Neuroscience. 2020;429:235–244. doi: 10.1016/j.neuroscience.2020.01.006. [DOI] [PubMed] [Google Scholar]
  22. Sawaya A.P., Pastar I., Stojadinovic O., Lazovic S., Davis S.C., Gil J., et al. Topical mevastatin promotes wound healing by inhibiting the transcription factor c-Myc via the glucocorticoid receptor and the long non-coding RNA Gas5. J Biol Chem. 2018;293:1439–1449. doi: 10.1074/jbc.M117.811240. [DOI] [PMC free article] [PubMed] [Google Scholar]
  23. Schneider C.A., Rasband W.S., Eliceiri K.W. NIH Image to ImageJ: 25 years of image analysis. Nat Methods. 2012;9:671–675. doi: 10.1038/nmeth.2089. [DOI] [PMC free article] [PubMed] [Google Scholar]
  24. Seo H., Badiei Khuzani M., Vasudevan V., Huang C., Ren H., Xiao R., et al. Machine learning techniques for biomedical image segmentation: an overview of technical aspects and introduction to state-of-art applications. Med Phys. 2020;47:e148–e167. doi: 10.1002/mp.13649. [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Stojadinovic O., Brem H., Vouthounis C., Lee B., Fallon J., Stallcup M., et al. Molecular pathogenesis of chronic wounds: the role of beta-catenin and c-myc in the inhibition of epithelialization and wound healing. Am J Pathol. 2005;167:59–69. doi: 10.1016/s0002-9440(10)62953-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
  26. Stojadinovic O., Lee B., Vouthounis C., Vukelic S., Pastar I., Blumenberg M., et al. Novel genomic effects of glucocorticoids in epidermal keratinocytes: inhibition of apoptosis, interferon-gamma pathway, and wound healing along with promotion of terminal differentiation. J Biol Chem. 2007;282:4021–4034. doi: 10.1074/jbc.M606262200. [DOI] [PubMed] [Google Scholar]
  27. Sukswai N., Khoury J.D. Immunohistochemistry innovations for diagnosis and tissue-based biomarker detection. Curr Hematol Malig Rep. 2019;14:368–375. doi: 10.1007/s11899-019-00533-9. [DOI] [PubMed] [Google Scholar]
  28. Taylor C.R., Levenson R.M. Quantification of immunohistochemistry--issues concerning methods, utility and semiquantitative assessment II. Histopathology. 2006;49:411–424. doi: 10.1111/j.1365-2559.2006.02513.x. [DOI] [PubMed] [Google Scholar]
  29. Valdebran M., Kowalski E.H., Kneiber D., Li J., Kim J., Amber K.T. Digital quantification of epidermal protein expression in paraffin-embedded tissue using immunohistochemistry. Methods Mol Biol. 2020;2109:75–82. doi: 10.1007/7651_2019_244. [DOI] [PubMed] [Google Scholar]
  30. Varghese F., Bukhari A.B., Malhotra R., De A. IHC Profiler: an open source plugin for the quantitative evaluation and automated scoring of immunohistochemistry images of human tissue samples. PLoS One. 2014;9 doi: 10.1371/journal.pone.0096801. [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Wang S., Yang D.M., Rong R., Zhan X., Xiao G. Pathology image analysis using segmentation deep learning algorithms. Am J Pathol. 2019;189:1686–1698. doi: 10.1016/j.ajpath.2019.05.007. [DOI] [PMC free article] [PubMed] [Google Scholar]
  32. Xu H., Mandal M. Epidermis segmentation in skin histopathological images based on thickness measurement and k-means algorithm. EURASIP J Image Video Process. 2015;2015:18. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

Datasets related to this article can be found at https://github.com/lgsiegfried/SANDD, hosted at Github repository.


Articles from JID Innovations are provided here courtesy of Elsevier

RESOURCES