Skip to content

slideQuantify V2

timpeters03 edited this page Feb 15, 2024 · 10 revisions

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....
      • ....
  • 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:

  1. 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.
  2. 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.
  3. 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.
  4. Email Notifications: The script allows for email notifications regarding job status updates. Configure the EMAIL and MAILSETTING arguments accordingly to receive notifications as desired.
  5. Default Values: Note that some arguments have default values (PATCHSIZE and OUTPUTDOWN). Adjust these values based on your specific requirements.
  6. 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.
  7. 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.
  8. 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.
  9. 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.

Overview

Welcome to slideToolKit

Manual

Introduction
General instructions

slideToolKit scripts

slide2Tiles
slideAppend.sh
slideAppendGCT.sh
slideConvert
slideDirectory
slideDupIdentify.py
slideEMask
slideEntropySegmentation.py
slideExtract.py
slideExtractTiles.py
slideInfo
slideInfo.py
slideJobChecker
slideLookup
slideMacro
slideMacro.py
slideMask
slideNormalize
slideRename
slideRename.py
slideThumb
slideThumb.py

slideQuantify v1

slideQuantify_v1
slideQuantify_v1_1_expresshist_mask.sh
slideQuantify_v1_2_expresshist_tile.sh
slideQuantify_v1_3_tile_normalizing.sh
slideQuantify_v1_4_cellprofiler.sh
slideQuantify_v1_5_wrapup.sh

slideQuantify v2

slideQuantify_v2
slideQuantify_v2_1_entropy_segmentation.sh
slideQuantify_v2_2_extract_tiles.sh
slideQuantify_v2_3_tile_normalizing.sh
slideQuantify_v2_4_cellprofiler.sh
slideQuantify_v2_5_wrapup.sh

slideQuantifyOSX

slideQuantifyOSX
slideQuantify_cellprofiler.sh
slideQuantify_mask.sh
slideQuantify_normalizing.sh
slideQuantify_tiling.sh
slideQuantify_wrapup.sh

Other scripts

slideToolKitTest.py

Installation

macOSX

Conda version (default/preferred)
Homebrew version

Linux

Rocky 8 Conda version (default/preferred)

Legacy

Ubuntu 16.04 LTS
Ubuntu 12.04 CentOS7 Conda version with modules
Administrator version

Conda vs brew

Clone this wiki locally