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: August 17, 2023
Last Modified: September 20, 2024
Protocol Integer ID: 107842
Keywords: ASAPCRN
Funders Acknowledgement:
National Institute on Aging
Grant ID: R01-AG077573
Aligning Science Across Parkinson’s
Grant ID: ASAP-020616
Abstract
This protocol contains additional details for the modified QUINT workflow.
Draw a small rectangle over a characteristic DAB or hematoxylin stain.
On Image tab, double-click the Stain you would like to set. Click Yes on the prompt.
Give the new settings a unique name (Project ID). Click OK.
This has only saved the parameters for this particular image. To change all images in a project, go to the Workflow tab. This script can also be added to an analysis script and run at the same time.
“Set color deconvolution stains” should be the last Command. Click on Command, verify that the parameters are correct, and click “Create script.”
In the Script Editor, click Run > Run for Project.
Move all images from Available to Selected, and click “OK.” Modified setting from Aperio Scanner:
To create a new pixel classifier for segmentation:
It is easiest if the output segmentation from QuPath is black. Click on the “Annotations” tab,
double click on “Positive” and change the color to black. Click “OK”.
Use the rectangle tool to box an are you can use to test the classifier.
Example settings are below, but can be optimized by project. Generally higher resolution is better, but slower to run and will create larger files. We generally use “Very high (1.01 um/px)” resolution. Give the classifier a name and click “Save”. The classifier will be in your project folder under classifiers and can be moved to another qupath project folder to share with another set of images for consistency.
Examples of Staining Artifacts:
QUINT Tips & Tricks: QuPath
QUINT Tips & Tricks: QuPath
Qupath Project Won’t Open: error pops up when attempting to open project
The project.qpproj is essentially just a txt file formatted for the specifications of qupath, telling it how to organize and read the data–all the images, annotations, and classifiers are located in the other data/classifier folders so it’s not the end of the world if the qupath project wont open
Fix = 1. RENAME BACKUP TO PRIMARY QUPATH PROJECT:
a.store original faulty project.qpproj in a new folder temporarily to avoid duplicates in the same file space
b.rename project.qpproj.backup > project.qpproj, open new project. Should change file type from BACKUP File to QPPROJ File
Fix 2 = if tmp file present, rename tmp file to project.qpproj – should change file type from TMP File to QPPROJ
QuPath Image Won’t Open: error below comes when trying to open an image
Fix: Recover Backup data file
a.Open data folder associated with image: Right click over problem image>Open directory>Project entry
b.Temporarily store data.qpdata file in a new folder (can delete later if restored)
c.Remove the .backup in the data.qpdata.backup
Reattempting to open the image in the QuPath project should allow it to open. If your data folder does not have a .bkp file and the image is still not opening, your best bet may be to add the image again and run the analysis from the start as there is no current fix aside from this.
Transferring Data Across Projects
Transferring data like images, annotations, classifiers and even display settings across projects is possible and quite straightforward.
Data
To transfer a specific image from one project to another, drag the associated data.qpdata to an open QuPath project window.
Select Open Image to import the image with its included annotations/detections to your project. (Selecting Import Objects will only import annotations/detections to the current open image in the QuPath window).
Classifiers
Your QuPath folder should include a “classifiers” folder that includes all object/pixel classifiers you’ve generated throughout the project. Copy individual object/pixel classifier JSON files or whole object/pixel classifier folders and paste them into the appropriate classifier folder for the project you would like to import them to.
Display settings (versions>0.5.0)
Newer versions of QuPath allow you to save display settings to streamline visualizing fluorescent stains across multiple images/projects.
You can manipulate channel color by right-clicking the colored box next to channel name. After setting to the optimal min/max settings, you can save this display by typing a name in the “Settings” box and selecting Save.
This will generate a resources folder in your QuPath folder. In it there is a display folder that contains all the settings you’ve generated in that project. To transfer settings over to other projects, copy the display folder’s JSON files and place them into your new projects display folder. If there is no resource/display folder in the new project, paste the entire resource folder from the old one in the new QuPath project folder.
QUINT Tips & Tricks: Registration
QUINT Tips & Tricks: Registration
Merging/Transferring QuickNII/Visualign Images
In the event you forgot to add an image to your QuickNII project, or you want to make edits to the plane of registration but are already in VisuAlign and you don’t want to redo it all, utilize the XML/JSON files to insert/edit/remove desired images from your project.
Adding QuickNII images
You can add images to your QuickN project by inserting the file data from a QuickN project containing just the image(s) you want to add.
a. Create a new QuickNII project with only the images you want to add to your original project.
b. After you are satisfied with the section(s) alignment, export the QuickNII XML
c. Open your QuickNXML with Notepad
d. Each image will be listed as <slice filename=‘name’….atlas plane details>
e.Copy the desired images. Be sure to include <brackets>.
f. To insert into original project, paste copied file data into original QuickN XML in Notepad
g.Your added images should now appear when you open the original QuickNXML. Make any edits needed, export and carry on with registration as normal.
Adding Visualign images
The same principle applies to Visualign JSONs.
a. Create new Visualign project with the image(s)you want to add
b. Export the Visualign JSON
c. Open the Visualign JSON with Notepad
Each image will be listed within curly brackets, the start/end should look like this {“filename”: “name.png”…]]}
d. Copy the desired image filedata.
e. Open the original Visualign JSON in Notepad and paste into it with proper formatting
f. It is easiest to paste after right before the end brackets, but note commas separate each image file
Note
be sure to add comma to the file data before the one you’ve added
g. Your images should now appear when you open Visualign
QUINT Tips & Tricks: Nutil
QUINT Tips & Tricks: Nutil
Nutil Settings and Image Naming Nomenclature
Nutil can sometimes make a fuss if settings are wrong or the
names given to images are improper. Some guidelines to follow when working with
Nutil are below:
Choosing the right Atlas:
Be sure to select Allen Mouse Brain 2017 for Reference Atlas (this is the edition Visualign uses)
Sometimes Nutil will throw an error message directing you to this error
Other times it will put out an error along the lines of “these points are out of range”, be sure to double-check atlas year as Nutil defaults to 2015 while QUINT apps use 2017.
Naming Sections:
a.Name each section with a unique 3-digit (_s###) code. Nutil will not run if two images have the same 3-digit number at the end.
When analyzing multiple mice with the same figure, opt to use sequential numbers above and below figure of interest
For example, if I have two replicates from each of 8 mice for figure 82, I may name my sections s074-s081 and s083-s090
Alternatively, you can just name your images _s001-s0016 so long as you have a well-kept log denoting which section refers to what.
b. Avoid including _s in other parts of image names
Names like project_slide_s### will result in Nutil error as it has trouble recognizing the unique 3-digit number when the _s in _slide is present
There is flexibility in what you can put before the _s###. Whatever is put there is for the sake of organization and does not influence analysis at all