TITLE: QUINT Workflow Appendix
AUTHORS: Michael X. Henderson

[DESCRIPTION]
This protocol contains additional details for the modified QUINT workflow.

[STEPS]
SECTION: QuPath: Setting Stain Vectors
1. Draw a small rectangle over a characteristic DAB or hematoxylin stain.
SECTION: QuPath: Setting Stain Vectors
2. On Image tab, double-click the Stain you would like to set. Click Yes on the prompt.
SECTION: QuPath: Setting Stain Vectors
3. Give the new settings a unique name (Project ID). Click OK. 
 

SECTION: QuPath: Setting Stain Vectors
4. 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.
SECTION: QuPath: Setting Stain Vectors
5. “Set color deconvolution stains” should be the last Command. Click on Command, verify that the parameters are correct, and click “Create script.”
SECTION: QuPath: Setting Stain Vectors
6. In the Script Editor, click Run > Run for Project.
SECTION: QuPath: Setting Stain Vectors
7. Move all images from Available to Selected, and click “OK.” Modified setting from Aperio Scanner:

Hematoxylin: 0.667, 0.658, 0.349
DAB:0.324, 0.547, 0.772
DAB:0.485, 0.616, 0.620
SECTION: QuPath: Pixel Classifier Generation
8. 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”.
SECTION: QuPath: Pixel Classifier Generation
9.  Use the rectangle tool to box an are you can use to test the classifier.
SECTION: QuPath: Pixel Classifier Generation
10. Classify > Pixel classification > Create thresholder
SECTION: QuPath: Pixel Classifier Generation
11. 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.
 
SECTION: QuPath: Pixel Classifier Generation
12. Examples of Staining Artifacts:
 
SECTION: QUINT Tips &amp; Tricks: QuPath
13. 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
SECTION: QUINT Tips &amp; Tricks: QuPath
13.1. 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


 


SECTION: QUINT Tips &amp; Tricks: QuPath
13.2. Fix 2 = if tmp file present, rename tmp file to project.qpproj – should change file type from TMP File to QPPROJ

 

SECTION: QUINT Tips &amp; Tricks: QuPath
14. QuPath Image Won’t Open: error below comes when trying to open an image

 

SECTION: QUINT Tips &amp; Tricks: QuPath
14.1. 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.
SECTION: QUINT Tips &amp; Tricks: QuPath
15. Transferring Data Across Projects

Transferring data like images, annotations, classifiers and even display settings across projects is possible and quite straightforward.

SECTION: QUINT Tips &amp; Tricks: QuPath
15.1. 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).
SECTION: QUINT Tips &amp; Tricks: QuPath
15.2. 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.

 

 


SECTION: QUINT Tips &amp; Tricks: QuPath
15.3. 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.

 


SECTION: QUINT Tips &amp; Tricks: Registration
16. 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.
SECTION: QUINT Tips &amp; Tricks: Registration
16.1. 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.


 


SECTION: QUINT Tips &amp; Tricks: Registration
16.2. 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

 

g. Your images should now appear when you open Visualign
SECTION: QUINT Tips &amp; Tricks: Nutil
17. 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:

SECTION: QUINT Tips &amp; Tricks: Nutil
17.1. 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.

SECTION: QUINT Tips &amp; Tricks: Nutil
17.2. 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