Oct 18, 2024

Public workspaceQuantification of Immunohistochemistry using QuPath

  • 1University of California, San Francisco;
  • 2UCSF
Icon indicating open access to content
QR code linking to this content
Protocol CitationRose B. Creed, Sadhana Sridhar, Alexandra Nelson 2024. Quantification of Immunohistochemistry using QuPath. protocols.io https://dx.doi.org/10.17504/protocols.io.36wgqnxwxgk5/v1
License: This is an open access protocol distributed under the terms of the Creative Commons Attribution License,  which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited
Protocol status: Working
We use this protocol and it's working
Created: October 14, 2024
Last Modified: October 18, 2024
Protocol Integer ID: 109966
Keywords: ASAPCRN, Tau, Quantitative IHC, QuPath
Funders Acknowledgement:
Burrows Wellcome Fund
Grant ID: #1022360
NINDS/NEI
Grant ID: K00NS108458
Aligning Science Across Parkinson's Disease
Grant ID: ASAP-020529
Abstract
The purpose of this workflow is to enable registration and quantification of mouse brain sections. Our protocol focuses on quantification of Tau aggregates in different brain regions, but can be used to quantify other objects.
Necessary Programs and Locations
Necessary Programs and Locations

a. area_of_interest.groovy
b. qupath_tau_script_with_comments.groovy
c. batch_area_script.groovy
Scanned Slides
Scanned Slides
To enable high throughput imaging and analysis, slides are scanned on the Zeiss Axioscan microscope. One image file contains multiple brain sections.
Imaging
Folder Organization:
Folder Organization:
Project (e.g. Gait-Tau corr.)
Mouse 1 ID (e.g., rc240926a)

i. Left Hemisphere
ii. Right Hemisphere
Mouse 2 (same internal folder organization)
And so on…

Note
• Note that the final destination folders are empty when created.

Image Registration
Image Registration
Open QuPath and click ‘create project’.
To select the QuPath folder for the project, click on file > create project > label project (e.g. Mouse 1ID_Left Hemisphere) and ‘save’.
Computational step
Click on the ‘Add Images’ button and select the image file to be analyzed. Then ‘import’.
Images take a few minutes to import.
When prompted, click ‘import all’.
Double click on the first image. A set image type dialog box will pop up, select ‘Fluorescence’, and click ‘Apply’.
Double click on next image. The software will prompt to save the previous image, click ‘’yes’. The set image type prompt will appear again, select ‘Fluorescence’ then, ‘Apply’.
Repeat until final image .
Then go to file > ‘save’ (to save project).
Launch FIJI and type in ‘ABBA’ in the search bar.
A quick search box containing ABBA-related commands will pop-up. Select ‘ABBA start’ and hit ‘Run’.
An Open Atlas prompt will appear. Select ‘Adult Mouse Brain- Allen Brain Atlas V3p1’, click ‘OK’.
A new prompt called ‘slicing mode’ will appear - select appropriate slice orientation (e.g. ‘sagittal’). Hit ‘OK’.
Click Import > Import QuPath Project > Browse to Mouse1 folder and select ‘project.qproj’ file. Enter initial axis position (‘4’) and axis increment between slices (‘0.08’).
A dialog box titled Create BDV Dataset will pop up, select ‘center’ as plane of origin convention. Make sure the other fields are empty and unchecked. Hit ‘OK’.
This will launch the ABBA interface with the Atlas images (top visible slices) and all the images in the project file.
In order to zoom in, use the scroll wheel on computer mouse.
Right click in order to navigate left/right.
Select all the project images (these are the little yellow circles in the bottom).
On the right-hand side of the interface (see image below), under Slices Display, click on ‘Vis.’ and select the channel of interest (i.e., the channel that contains Tau – Ch_2 in image below).



Click the column immediately next to the channel, set max to ‘10000’ (arbitrarily selected to be able to see the individual project images).

Under Atlas Display, adjust the ‘Displayed slicing [atlas steps]’ slider in order to fine tune the atlas steps.
A smaller atlas step means that the distance between sections in the atlas will be more minimal so there are more options when trying to map our experimental slice to the atlas slice (For our experiments we used 5 microns).
Select the desired project image for mapping (i.e., drag a square around desired image).
Match images to best approximate Allen slice.
Drag project image around by clicking the green square. Place image under slice that best approximates it.
Right click, ‘Set as Key Slice(s)’.
Repeat this process for all desired project images.
Transform each atlas section to fit the project images.
Highlight section and then click on align tab > ‘ABBA- interactive Transform’.

  • This allows the user to rotate, change the x,y position, shrink, or expand the atlas slice to fit the project image.
After fitting all atlas slices to the corresponding project images, go to file > save state.

  • This will be saved as an .abba file.
Quantification
Quantification
Export registrations
a. Select all mapped images. b. Click on ‘Export’ > ‘ABBA – ‘Export Registrations To QuPath Project’. c. Close ABBA.
Back in QuPath, click on ‘Extensions’ > ‘ABBA’ > ‘Load Atlas Annotations into Open Image’.
Visually verify that annotations are correctly placed.
If annotations need to be adjusted, they can be moved manually by clocking on ‘objects’ > ‘Annotations’ > ‘Transform Annotations’.

  • Click ‘Yes’ on pop-up prompt asking if want to continue.
(Optional) If desired, annotations can be filtered to include only the brains’ regions of interest. To filter, use custom script. To load:
Optional
‘Automate’ > ‘Show script editor’ > ‘File’ > ‘Open’ > ‘areas_of_interest.groovy’.
Hit ‘Run’.
Quantify pathology using custom script. To load:
‘Automate’ > ‘Show script editor’ > ‘File’ > ‘Open’ > ‘qupath_tau_script_with_comments.groovy’.
Manually specify the directory for file output in the script.
Manually select annotated brain region of interest.
Hit ‘run’.
Repeat for each brain region of interest.
Quality control: verify that objects of interest (e.g., Tau in the cells) are occurately labeled/detected.
To calculate the area of the brain regions of interest (which can then be used to calculate the density of Tau within each region).
‘Automate’ > ‘Show script editor’ > ‘File’ > ‘Open’ > ‘batch_area_script.groovy’.
Hit ‘Run’.
This script only needs to be run once; the area will be calculated for all the brain regions.