ROI Cutting
Overview
Once ROIs are defined, the pipeline extracts these regions from the original TIF(F) files. This step handles channel selection logic, allowing you to exclude specific channels, or select the best version of a repeated marker.
- Input: TIF(F) images and ROI coordinates (
rois.pkl). - Output: Individual SpatialData (Zarr) objects for each ROI (images only).
Parameters of this step are defined in the ROI Cutting part of the config file.
Data Sourcing
This module supports dual modes of operation for data retrieval: Local and Globus. For comprehensive instructions on configuring Globus for remote data sourcing, see Globus Settings documentation and the corresponding demonstration notebook.
If switching from local ROI definition to remote processing, ensure that image_dir and analysis_dir in the config reflect the remote environment.
You can automate the transfer of configuration and metadata using this utility notebook.
Execution
This module is fully parameterized via the configuration file and does not require manual intervention. Consequently, it can be executed via a Jupyter Notebook, standalone script, or as a component of the Nextflow pipeline; further details are available in the Execution Modes documentation.
Notebook workflow
The example Jupyter Notebook demonstrates the execution workflow using locally available data.
To complete the process, execute the following sections sequentially:
- Read in config: Specify the pathway to the analysis configuration file and load the required settings.
- Define the logger: Initialize the logging protocol to track execution progress and document the process.
- Define ROIs for processing: Ingests the ROI parameters into a Pandas DataFrame. A demonstration cell is provided to truncate this DataFrame for rapid testing purposes.
- Discover signal channels: Identifies available TIFF images and implements the channel selection logic. A demonstration cell is included to show how to subset the channel list for testing.
- Run ROI cutting: Triggers the ROI extraction process utilizing the local file sourcing strategy.
Script execution
python 02_cut_rois.py --exp_config ../examples/example_pipeline_config.yaml