Small Nextflow pipeline for extracting individual channel images from multiplex TIFF images from COMET, MIBI, and OPAL.
- Reads all TIFF images from an input folder.
- Auto-detects channel names from:
- OME metadata (COMET / OPAL / generic OME-TIFF)
- MIBI JSON page descriptions (
channel.target) - MIBI
PageNametags
- Optionally renames channels using a JSON marker mapping file.
- Writes one output TIFF per channel per input image.
--input_dir(required): Folder containing TIFF files.--marker_mapping(optional): JSON file withraw_channel_name -> output_channel_name.--outdir(optional): Output folder (default:results).--pattern(optional): File glob applied withininput_dir(default:*).
Run with conda profile:
nextflow run main.nf \
-profile conda \
--input_dir /path/to/images \
--marker_mapping /path/to/marker_mapping.json \
--outdir /path/to/outputRun with container profile:
nextflow run main.nf \
-profile docker \
--input_dir /path/to/images \
--marker_mapping /path/to/marker_mapping.json \
--outdir /path/to/outputRun on HPC with Singularity:
nextflow run main.nf \
-profile singularity,medium \
--input_dir /path/to/images \
--marker_mapping /path/to/marker_mapping.json \
--outdir /path/to/outputRun for very large images on SLURM (combine runtime + resource profiles):
nextflow run main.nf \
-profile conda,large \
--input_dir /path/to/images \
--marker_mapping /path/to/marker_mapping.json \
--outdir /path/to/outputRun without mapping file:
nextflow run main.nf \
-profile conda \
--input_dir /path/to/images \
--outdir /path/to/outputFor each input image, the pipeline creates one folder in outdir:
<image_name>/<channel_1>.tiff<channel_2>.tiff- ...
Channel names are sanitized for filenames. If multiple channels map to the same output name, numeric suffixes are added (for example _2, _3).
Generate tiny synthetic OPAL and MIBI test inputs and run the built-in test profile:
python tests/create_test_data.py
nextflow run main.nf -profile testTest outputs are written to tests/results.