Skip to content

HPC-Organoid-Quant is a modular image analysis pipeline for quantifying organoids in brightfield microscopy images, with optional GFP analysis. It handles fragmented structures, extracts key features, and outputs visual overlays and CSV reports. Runs in Google Colab or locally via Conda or Python venv.

License

Notifications You must be signed in to change notification settings

arka2696/HPC-Organoid-Quant

Repository files navigation

HPC-Organoid-Quant

Organoid Detection and GFP Quantification

This project provides a complete and modular pipeline to detect organoids from brightfield microscopy images, with optional quantification of GFP-positive regions from corresponding fluorescence images.

Features

  • Works with brightfield-only images or brightfield + GFP
  • Detects irregular and fragmented organoids as a single object
  • Computes key morphological features:
    • Area
    • Centroid
    • Perimeter
    • Circularity
  • If GFP is provided:
    • Quantifies GFP+ area
    • Calculates mean and total GFP intensity
  • Generates annotated overlay images for visualization

Project Structure

Input folder structure:

Organised_files/
└── B16 Spheroid_10% FBS/
    └── B16_control/
        └── B16 day 3/
            ├── BRIGHTFIELD_16173.jpg
            ├── BRIGHTFIELD_16174.jpg
            └── ...

Output folder structure:

OUTPUT/
├── B16 Spheroid_10% FBS/
│   └── B16_control/
│       └── B16 day 3/
│           ├── masks/
│           │   ├── mask_16173.png
│           │   └── ...
│           └── overlays/
│               ├── overlay_16173.png
│               └── ...
│
└── organoid_gfp_analysis.csv   ← all image results combined here

Getting Started

1. Clone the Repository

git clone https://github.com/yourusername/Organoid_GFP_Analysis.git
cd Organoid_GFP_Analysis

2. Launch in Google Colab

Best used with Google Drive integration.

  • Open notebooks/organoid_analysis.ipynb
  • Update paths to your own brightfield and GFP images
  • Run all cells

3. Launch with Conda or Python venv

  • Create the conda env with this command:
    conda env create -f environment.yml
    conda activate organoid-env
  • OR, create a python venv with thsi command:
    python -m venv organoid-env
    source organoid-env/bin/activate  # or .\organoid-env\Scripts\activate on Windows
    pip install -r requirements.txt

4. Creating a loadable jupyter-kernel: This is needed as if we are runing the code from jupyter lab or VS-code we need to load python kenrnel

  • A kernel can be created by the following command:
    python -m ipykernel insatll --user --name organoid-env --display-name "organoid-env"

5. Launching the organoid-env environment

  • We can launch the organoid-env conda env in two ways: 1. via anaconda prompt or 2. we can directly load the conda kernel in VS-Code

    1. For anaconda prompt first open anaconda prompt: image
    1. In the command line/terminal type in the following command:
    conda activate organoid-env

    then

    jupyter lab

    The organoid-env is loaded by default, but if its not loaded, we can select the kernel from the dropdown box on the top right hand.

    1. Now you can directly run the .ipynb notebooks within the jupyter-lab or directly execute the python script from the command line.

Output Example

  • .csv file with organoid measurements

  • Overlay image:

    • 🔵 Organoid outline
    • 🔴 GFP+ region (if applicable)

Overlay Example


Dependencies

All dependencies are standard and available in Google Colab:

  • OpenCV
  • NumPy
  • Matplotlib
  • scikit-image
  • Pandas

If you want to run locally, create a requirements.txt:

pip install -r requirements.txt

Notes

  • The script accepts a broad format of images
  • If your organoids are fragmented, the pipeline includes morphological merging to treat them as one object
  • GFP quantification thresholds can be adjusted in the notebook

Contact

For questions or suggestions, feel free to open an issue or reach out via GitHub.


Citing the repo:

v1.0.0 : DOI

[Latest] v1.1.0 : DOI

Cite as: Arkajyoti sarkar. (2025). HPC-Organoid-Quant (v1.0.0). Zenodo. https://doi.org/10.5281/zenodo.15738206

License

License: CC BY-NC 4.0

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.

About

HPC-Organoid-Quant is a modular image analysis pipeline for quantifying organoids in brightfield microscopy images, with optional GFP analysis. It handles fragmented structures, extracts key features, and outputs visual overlays and CSV reports. Runs in Google Colab or locally via Conda or Python venv.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published