unmixing_pipeline is a tool for unmixing Immunohistochemistry (IHC) images taken in multiple channels and rounds.
- numpy
- scipy
- scikit-image
- scikit-learn
- tifffile (conda-forge)
- matplotlib
You can run the unmxing pipeline in 2 modes:
-
main_unsupervised
: In this mode, all the channels of same round are going to be unmixed with sparse spectral unmixing algorithm.python main_unsupervised.py --img_dir=/path/to/input/dir \ --save_dir=/path/to/save/dir \ --round_pattern=R \ --channel_pattern=C \ --has_brightfield=True
It will save unmixed images and generate a script of unmixed channels in the
save_dir
: -
main_supervised
: In this mode, user can correct the script and all the channels provided in the script are going to be unmixed with chemical co-localization unmixing algorithm.python main_supervised.py --img_dir=/path/to/input/dir \ --save_dir=/path/to/save/dir \ --script_file=/path/to/script/file
It will save unmixed images in
save_dir
.
-
main_unsupervised
:Argument Help Example img_dir Path to the directory of images --img_dir=C:\images\input save_dir Path to the directory to save unmixed images --save_dir=C:\images\output default_box Selected box coordinates xmin_ymin_xmax_ymax --default_box=16200_6100_21300_12200 has_brightfield If last channel is brightfield --has_brightfield=True round_pattern Pattern for round idx --round_pattern=R channel_pattern Pattern for channel idx --channel_pattern=C -
main_supervised
:Argument Help Example img_dir path to the directory of images --img_dir=C:\images\input save_dir path to the directory to save unmixed images --save_dir=C:\images\output script_file csv script file name --script_file=script.csv default_box selected box coordinates xmin_ymin_xmax_ymax --default_box=16200_6100_21300_12200 visualize visualize the unmixing report of crop --visualize