๐กProcessing Package Tutorial
ProcessData is a Python class designed to process data from MRXS, NDPI, CZI and BIF files, merge it with inventory data, and calculate immunopositivity statistics.
General Information
From this point on, the tutorial will refer to Python codes. To run the files and produce the positivity rates for your data and if you are not familiar with Python or any terminal prompt, please refer first of all to the section of Git Bash. Subsequently, follow the rest of the steps of this tutorial. If your computer system is Linux, then a normal Terminal prompt should work.
Step by Step Instructions:
Getting Started:
Create a ProjectFolder on your system:
You should manually create an empty folder named ProjectFolder for the new steps.
Configure the ProjectFolder:
The internal structure of the folder should be like this:

The Data_output folder is a new empty folder you create manually. The data files generated by the Python files in the next steps will automatically be stored in this folder and can be opened after the processing.
The Results folder contains all the output files from QuPaht in a .txt format. Those files are generated as output files by QuPath. They contain the PositiveCell and NegativeCell classification which is now used to calculate the positivity rate.
As the ID_Slidescanner must be linked with the ID_Sample and the Antibody, an Inventory file connecting those needs to be manually generated. The file will link the two IDs. We generated this by opening the slides with CaseViewer, NDPI.view2 or ZEISS ZEN lite, depending on your slide scanner, showing the "barcode" to identify the ID_Sample and connect it with the ID-Slidescanner.
For the ProcessingScan Package, the names must be set to ID_Sample, Antibody, and ID_Slidescanner. A simple Exel sheet for one antibody or multi-sheet Excel workbook containing information on all the samples and antibodies, if multiple antibodies are analysed, is expected.
If you analysed multiple antibodies within the same slides you will be able to differentiate them within the annotations in the output file. Therefore within the Antibody column of the Excel file write "antibody".



There should be no spaces in your directories or file names!
Set the system for the analysis:
Open Git Bash:
To open Git Bash
search for it on your computer Menu and double-click on the icon to open. A standard prompt window will open.
First time using a terminal window prompt?
Open the project folder:
You can open the ProjectFolder from the terminal using the command cd.
cd Path/To/ProjectFolder Bash is a Linux-based system so the direction of \ needs to be changed to /:
C:/Users/andre/OneDrive/Desktop/ProjectFolder
Download the Process_scan class:
Download this repository or clone it to your local machine/laptop by clicking on the Download ZIP option coming out once you click on the Code button:

Move the directory to the ProjectFolder:
The downloaded directory, process_scan-main.zip, located in the Downloads folder, should be moved into the ProjectFolder. You can do it simply by moving the directory most conveniently for you and your computer.
De-compress the ProcessScan Python folder:
To access and use the ProcessScam Python Class via the command line, you have to re-open the Git Bash terminal extract the directory, and open the directory using the cd command
unzip process_scan-main
cd process_scan
cd process_scan-mainLaunch the ProcessScan Classification from the terminal
From the same Git Bash terminal, the Python script is going to be launched. If Python is not still installed in your system, you can follow the instructions in the Python Installation tutorial from the same Git Bash terminal. The command you can paste directly into the terminal prompt is:
python workflow_template.py path/to/your/Results path/to/your/Inventory.xlsx path/to/your/directory/to/Data_output xlsxModify the command accordingly with your paths. The last thing is to type in after the paths the extension for the final spreadsheets, you can choose between xlsx or csv.
Once the code has been successfully run, you can find spreadsheets in your Data_output folder containing the positivity rate for each antibody and region, as well as basic heatmaps and scatterplots.
If you have multiple antibodies or just want to link the antibody with the donor/sample information use our merger to create a sheet containing all the information linked by the ID_Sample
We have a brief tutorial on how to do that here.
Limitations
Please, consider that the current development is only considered to be launched with the Prerequisites complied on an SH Operating System.
The Inventory file can be .csv or .xslx, and a multi-sheet format is expected.
When defining the output_filename, the options .csv and .xslx are implemented, you can choose based on your preference.
License
This project is licensed under the MIT License - see the LICENSE file for details to the rightful owner.
Last updated


