Skip to main content

Automated identification of micronuclei for chromosomal instability (CIN) quantification.

Project description

micronuclAI

PyPI PyPI - Python Version PyPI - License PyPI - Downloads

Automated assessment of Chromosomal Instability through quantification of micronuclei (MN) and Nuclear Buds (NBUDs).

screenshot

micronuclAI is an automated pipeline for reliable quantification of micronuclei of varying size, morphology and location from nuclei-stained images. The pipeline can be divided into 3 steps: 1) segmentation, 2) nuclei isolation, and 3) quantification. In brief, single-cell crops are extracted from high-resolution microscopy images with the help of segmentation masks, which are then used to train a convolutional neural network (CNN) to output the number of MN associated with each cell.

Getting Started

Stream-lit App

A webapp implementation of micronuclAI is available through streamlit under:

GitHub:
https://github.com/SchapiroLabor/micronuclAI_streamlit

Streamlit:
https://micronuclai.streamlit.app

screenshot

Inference of micronuclei can be achieved in small to medium-sized example images that can be uploaded to the streamlit app. Image data is processed within a virtual machine (VM) on Heicloud, a local Cloud infrastructure provided by University Computing Center Heidelberg, and images are immediately deleted after micronuclei inference. Once micronuclei are inferred, results predictions as well as several plots describing the results are generated and presented to the user within the streamlit app which can also be downloaded as csv files.

Local Installation

Prerequisites

Two input files are required for micronuclAI

  1. Nuclei-stained Image
  2. Associated Mask

Local Installation

A step by step series of examples that tell you how to get a development environment running locally

Please ensure you have Python>=3.10 but less than Python<=3.13 installed with

python -version

Pull the repo into your local device

git clone https://github.com/SchapiroLabor/micronuclAI

Install the required libraries

pip install -r requirements.txt

Usage

To use micronuclAI on your own images:

python src/model/micronuclai_predict.py -i <path/to/image> -m <path/to/mask> -mod <path/to/model> -o <path/to/output/folder>

A test dataset has been provided in the test_data folder with a mask and its corresponding image file.

python src/model/micronuclai_predict.py -i ./test/test_image.tiff -m ./test/test_mask.tiff -mod ./models/micronuclai.pt -o ./test/output

Parameters and Arguments

Parameter Short Form Required Default Type Description
--image -i Yes N/A String Pathway to image.
--mask -m Yes N/A String Pathway to mask.
--model -mod Yes N/A String Pathway to prediction model.
--out -o Yes N/A String Path to the output data folder.
--size -s No (256, 256) List of int Size of images for training.
--resizing_factor -rf No 0.6 Float Resizing factor for images.
--expansion -e No 25 Int Expansion factor for images.
--device -d No "cpu" String Device to be used for training.
--batch_size -bs No 32 Int Batch size for training.

Citation

https://doi.org/10.1038/s42003-025-07796-4

@article{IbarraArellano2025,
  title = {micronuclAI enables automated quantification of micronuclei for assessment of chromosomal instability},
  volume = {8},
  ISSN = {2399-3642},
  url = {http://dx.doi.org/10.1038/s42003-025-07796-4},
  DOI = {10.1038/s42003-025-07796-4},
  number = {1},
  journal = {Communications Biology},
  publisher = {Springer Science and Business Media LLC},
  author = {Ibarra-Arellano,  Miguel A. and Caprio,  Lindsay A. and Hada,  Aroj and Stotzem,  Niklas and Cai,  Luke L. and Shah,  Shivem B. and Walsh,  Zachary H. and Melms,  Johannes C. and W\"{u}nneman,  Florian and Bestak,  Kresimir and Mansaray,  Ibrahim and Izar,  Benjamin and Schapiro,  Denis},
  year = {2025},
  month = mar 
}

License

micronuclAI offers a dual licensing mode the GNU Affero General Public License v3.0 - see LICENSE and ESSENTIAL_LICENSE_CONDITIONS.txt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

micronuclai-0.1.1.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

micronuclai-0.1.1-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

Details for the file micronuclai-0.1.1.tar.gz.

File metadata

  • Download URL: micronuclai-0.1.1.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for micronuclai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bfe3083beb09a4b8944bfac2852f8d53e66d0183bce5a838d06a04d279204117
MD5 c13d1a42e48e350f0e31001d8886e551
BLAKE2b-256 e0804773cce5d608f393db7e30511b2c5f2591c1c7cec9e82707b5f8b2a4a553

See more details on using hashes here.

File details

Details for the file micronuclai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: micronuclai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 38.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for micronuclai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e31beeb9aeed08a0fdff41f9ceeae587a202c696d830d2373d9a57fcc4a6514b
MD5 505744b29991e32ae16a165ee7f7cc06
BLAKE2b-256 a718f13cd7cc07a6b815b8cf693689010b6ab9286c271bf1c3336c400ba1bd21

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page