Berry Lab IMage Processing
Python tools and workflows for microscopy image pre-processing, processing and analysis.
Full documentation on Read the Docs.
Pre-processing
- Convert — batch conversion of microscope-specific formats (Nikon
nd2, Operetta, Opera Phenix) to OME-TIFF, extracting metadata to apandasDataFrame. Maximum-intensity projection alongzoptionally happens during conversion. - Correct — illumination bias correction, fitted from a set of reference images and optionally smoothed.
- Align — 2D registration between time-points, imaging cycles or channels,
using
itk-elastix.
Processing
- Segment — nuclear segmentation with Cellpose, watershed-based object expansion, secondary object segmentation, and resolution of objects straddling multiple parents.
- Quantify — intensity, morphology and Haralick texture features per object, in 2D or 3D, aggregated into tidy DataFrames.
Batch work is aimed at a PBS cluster: the command line interface generates jobscripts and can submit them.
git clone https://github.com/berrygroup/blimp.git
cd blimp
pip install -e .Clone rather than downloading a source zip — the version is derived from the
git history by setuptools_scm.
This also installs the blimp command line interface into the environment's
bin directory; run blimp -h for usage.
Tested on Python 3.10, 3.11 and 3.12, on Linux and macOS.
Worked examples are in the notebooks folder. Run notebooks/0_setup.ipynb
first — it downloads the
example dataset and writes a
local configuration.
Development environment, test suite and code style are described in the contributing guide. In short:
pip install -e '.[dev,test]'
tox -e offline # tests needing no network or reference data
tox # full suite; downloads the reference dataset
tox -e lint # style checks
tox -e docs # build the documentation