slideQuantify V2 - swvanderlaan/slideToolKit GitHub Wiki
Description: This script facilitates the quantification process for a specified stain within a given project directory. It operates within a SLURM-based environment.
- Written by: Sander W. van der Laan; Tim Bezemer; Tim van de Kerkhof; Yipei Song; Tim S. Peters
- E-mail: [email protected]
- Last update: 2024-01-04
- Version: 2.1.3
Usage:
./slideQuantify.sh [STAIN] [PIPELINE] [PROJECTDIR] [PROCESSFILE] [OUTPUTFILENAME] [EMAIL] [MAILSETTING] [PATCHSIZE] [OUTPUTDOWN] [MASKSDIR]
Things to note:
-
PROJECTDIR: This directory should contain the folders _ndpi and/or _tif containing the images to process. e.g:
- _ndpi
- AE1....
- AE2....
- ....
- _tif
- AE3....
- AE4....
- ....
- _ndpi
-
PROCESSFILE: This should be a .txt file containing a list of all study numbers to process. e.g: study_numbers.txt AE1 AE2 AE3 AE4 ....
-
MASKSDIR: This is an optinal parameter. If used it should point to a directory containing the masks for the images you want to process. If left empty, masks will be created using EntropyMasker
Example Usage:
./slideQuantify.sh FIBRIN FIBRIN.cppipe /path/to/project /path/to/processfile.txt Image.csv [email protected] FAIL 2000 1 /path/to/masks
Arguments:
- STAIN
- Description: Name of the stain as it appears in the filenames.
- Required: Yes
- PIPELINE
- Description: Path to the CellProfiler pipeline.
- Required: Yes
- PROJECTDIR
- Description: Path to the working directory, where all the image-subdirectories are located.
- Required: Yes
- PROCESSFILE
- Description: Path to the file containing the study numbers to process.
- Required: Yes
- OUTPUTFILENAME
- Description: Output filename where the CellProfiler results are stored (delimiter assumed to be '_').
- Required: Yes
- EMAIL
- Description: Email address to send aborted/error jobs to.
- Required: Yes
- MAILSETTING
- Description: Specify when to send emails for job status updates (options: BEGIN, END, FAIL, ALL, NONE).
- Required: Yes
- PATCHSIZE
- Description: Size of the tiles in pixels.
- Required: No
- Default Value: 2000
- OUTPUTDOWN
- Description: Down-sampling number to indicate the magnification to use.
- Required: No
- Default Value: 1
- MASKSDIR
- Description: Path to the optional masks directory of given images.
- Required: No
Important Notes: Here are some important notes for the slideQuantify script:
- Dependency on CellProfiler Pipeline: The script heavily relies on a CellProfiler pipeline (PIPELINE) for image analysis. Ensure that the pipeline provided is correctly configured for the stain being analyzed.
- File Containing Study Numbers: The PROCESSFILE argument should point to a file containing the study numbers to be processed. Double-check that this file exists and is correctly formatted.
- Output File Name: The OUTPUTFILENAME argument specifies the name of the file where CellProfiler results will be stored. Ensure that this filename is appropriate for your workflow.
- Email Notifications: The script allows for email notifications regarding job status updates. Configure the EMAIL and MAILSETTING arguments accordingly to receive notifications as desired.
- Default Values: Note that some arguments have default values (PATCHSIZE and OUTPUTDOWN). Adjust these values based on your specific requirements.
- Optional Masks Directory: The MASKSDIR argument specifies the path to an optional directory containing masks for given images. When this argument is omitted, the masks will automatically be generated using EntropyMasker.
- Error Handling: The script provides error handling and logging functionalities. Monitor the log files (errors/.errors and logs/.log) for any issues encountered during processing.
- Documentation: Ensure that you understand the script's workflow and dependencies before running it. Refer to the provided usage instructions and argument descriptions for guidance.
- Testing: Before running the script on a large dataset, consider testing it with a smaller subset of data to verify correctness and identify any potential issues.