Formatting Imaging Mass Cytrometry (IMC) output files to be compatible with the MCMICRO pipeline.
The Hyperion imaging system outputs one .mcd file per slide containing multiple acquisitions as well as one .txt file per acquisition. This script currently uses the .txt files to create a float32 .tif file with corresponding OME-XML metadata per acquisition. To transform the .txt. file to a .tif file we use the readimc package by BodenmillerGroup. Hot pixel filtering is based on the Steinbock pipeline.
Steps in this module:
- create .tif file from .txt file
- add OME-XML metadata to .tif file
The CLI script imc2mc requires 3 inputs
- The path to the acquisition .txt file with
-ior--input - The pixel size in um with
-por--pixel_size - The output .tif file with
-oor--output. Folder structure will be created if not present.
Optional input:
- To apply hot pixel filtering, input an integer with
-tor--hp_threshold. Based on Steinbock we recommend a threshold of 50. - The current version can be accessed with
-vor--version
pip install imc2mc
imc2mc --help
Pull the image:
docker pull ghcr.io/schapirolabor/imc2mc:latest
and run the tool directly, mounting your input and output directories:
docker run --rm -v $(pwd):/data ghcr.io/schapirolabor/imc2mc:latest \
imc2mc \
-i /data/input_dir \
-o /data/output.ome.tif \
-p 1 \
-t 50
For development or reproducible research setups:
git clone https://github.com/SchapiroLabor/imc2mc.git
cd Background_subtraction
conda env create -f environment.yml
conda activate imc2mc_env
pip install -e .
run
imc2mc --help