Set up Slides Preprocessor
Download Slides Preprocessor
Slides Preprocessor is a python script that allows users to sort the typical InForm software output from Akoya (Polaris) scanned qptiffs into a file/folder system to upload such slides to the CP Portal.
Windows users should download the package from this link: https://gitlab.img.astrazeneca.net/portal/slides-preprocessor/-/releases

Image: Download the Slides Preprocessor python package
The downloaded executable can be placed in any place in your operating system. The package should be called within the terminal (NOT by double click).
Always download the latest version
- Make sure to always download the latest version of the slides_preprocessor.exe
Verifying Slides Preprocessor
You can run the package help by navigating to this folder first:
cd C:\Users\Alex\Downloads slides_preprocessor.exe -h
Or you can run the package help from any place by calling it using the full path:
C:\Users\Alex\Downloads\slides_preprocessor.exe -h
To verify the package version you can run:
slides_preprocessor.exe version
Re-order qptiff/unmixed folders
Preparing QPTIFF slides for upload are done through the python package called Slides Preprocessor. For details about the Slides Preprocessor package, please see this article.
To see the instructions in the CLI tool and all available arguments, type:
slides_preprocessor.exe order-folders -h
Basic usage
To run re-order script, three parameters have to be provided:
- qptiff_folder - a path to main folder containing QPTIFF images
- unmixed_folder - a path to main folder containing unmixed images
- output_folder - a path to main folder where new folder structure should be created
Assuming that this is the structure of our input folder:
. └── input_data ├── Component\ TIFF │ ├── AGLeTkBsOG │ └── slide1 └── QPTIFF ├── AGLeTkBsOG └── slide1
we can run the following command:
slides_preprocessor.exe order-folders input_data\QPTIFF "input_data\Component TIFF" results
As a result we will get an output_data folder in which slides are collected based on their names:
. ├── input_data │ ├── Component\ TIFF │ │ ├── AGLeTkBsOG │ │ └── slide1 │ └── QPTIFF │ ├── AGLeTkBsOG │ └── slide1 └── results ├── 2110291517_all_logs.log ├── 2110291517_success_copy.log ├── AGLeTkBsOG_Scan2 │ ├── AGLeTkBsOG_Scan2.qptiff │ ├── AGLeTkBsOG_Scan2_annotations.xml │ ├── AGLeTkBsOG_Scan2_annotations.xml.lock │ ├── CoverslipMask.tif │ ├── FocusMap.tif │ ├── Label.tif │ ├── MarkupMarks.tif │ ├── MarkupMask.tif │ ├── OverviewBF.tif │ ├── OverviewFL.tif │ ├── SampleMask.tif │ ├── Thumbs.db │ └── unmixed └── slide1_Scan2 ├── CoverslipMask.tif ├── FocusMap.tif ├── Label.tif ├── MarkupMarks.tif ├── MarkupMask.tif ├── OverviewBF.tif ├── OverviewFL.tif ├── SampleMask.tif ├── Thumbs.db ├── slide1_Scan2.qptiff ├── slide1_Scan2_annotations.xml ├── slide1_Scan2_annotations.xml.lock └── unmixed
All available options
Argument | Required | Options (default in bold) / Usage example | Explanation | Added in version |
---|---|---|---|---|
qptiff_folder | Yes | [PATH_TO_QPTIFF_FOLDER] | Path to main folder containing qptiff images. e.g.: C:\Users\user\Downloads\QPTIFF | v0.2.0 |
unmixed_folder | Yes | [PATH_TO_UNMIXED_FOLDER] | Path to main folder containing unmixed images. e.g.: C:\Users\user\Downloads\Component TIFF | v0.2.0 |
output_folder | Yes | [PATH_TO_OUTPUT_FOLDER] | Path to main folder where new folder structure should be created | v0.2.0 |
--prefix | No | --prefix [PREFIX] | Prefix that will be added to the files while copying them | v0.2.0 |
--move | No | --move true --move false |
If set, move the files instead of copying them | v0.2.0 |
--rename | No | --rename true --rename false |
If set, files will be renamed by removing the scan ID | v0.2.0 |
--config | No | --config [PATH_TO_CONFIG_FILE] | Path to a configuration YAML file. The configuration file can be used instead of specifying options on the command line. The names of the options are the same, only with - replaced with _ in the config file. Command line arguments override config file parameters | v0.2.0 |