Quantitative fluorescence microscopy for biologists who don't code.
cellquant.py is a single-script pipeline for segmenting cells, counting puncta, measuring colocalization, and computing spatial relationships in multi-channel fluorescence images. You configure it entirely through command-line arguments — no Python editing required. Pair it with an AI assistant (Claude, ChatGPT, etc.) to translate your biology into the right command.
# 1. Set up the environment (pick one)
conda env create -f environment.yml # option A: conda (recommended)
conda activate cellquant
# OR: pip-only (no conda needed)
python3.11 -m venv cellquant_env && source cellquant_env/bin/activate
pip install -r requirements.txt
# 2. Run on the example mammalian data
python cellquant.py example_data/mammalian_SGs/ \
"1:DAPI:nucleus" "2:G3BP1:quantify" "3:PABPC1:quantify" \
--cell-type mammalian \
--out example_data/mammalian_SGs/my_output/ \
--filename-pattern "MAX_{condition}_rep{replicate}"
# 3. Check the QC overlays in my_output/qc/
# 4. Find your data in my_output/cells.csvGiven a folder of multi-channel TIFF maximum intensity projections, cellquant.py:
- Segments cells using Cellpose with organism-specific presets
- Segments nuclei (optional, from DAPI or similar stain)
- Segments nucleoli (optional, from nucleolar markers)
- Detects puncta via Laplacian-of-Gaussian in any channel
- Computes per-cell metrics: puncta count, area, intensity, fraction condensed
- Measures colocalization: Pearson's R and Manders' coefficients with Costes thresholding
- Measures spatial proximity: distance from puncta to nucleolar boundary
- Quantifies nucleolar morphology: area, solidity, circularity, eccentricity
- Generates QC overlays for visual validation
- Produces superplots with replicate-level statistics
- Exports Prism-ready CSVs for further analysis
Tell the pipeline what each channel is and what to do with it:
"position:Name:role"
Roles: nucleus | quantify | nucleolus | cell-boundary | skip
Examples:
# Mammalian cells with DAPI + two markers
"1:DAPI:nucleus" "2:G3BP1:quantify" "3:PABPC1:quantify"
# Yeast with nucleolar marker + two proteins of interest
"1:Tif6:quantify" "2:Nsr1:nucleolus" "3:Sis1:quantify"
# Four-channel with one channel to ignore
"1:DAPI:nucleus" "2:GFP:quantify" "3:RFP:quantify" "4:BF:skip"--cell-type mammalian # Large cells, 3x downsampling, nuclear segmentation
--cell-type yeast # Small cells, no downsampling, area filtering
--cell-type bacteria # Tiny cells, specialized parametersAll preset values can be overridden: --cell-type yeast --cell-diameter 50
| Tutorial | System | What you'll learn |
|---|---|---|
| Tutorial 1: Mammalian stress granules | U2OS ± arsenite | Basics: install, run, interpret, statistics |
| Tutorial 2: Yeast temperature series | Yeast 25–40°C | Advanced: colocalization, proximity, morphology |
- Installation guide — step-by-step setup for Mac/Windows/Linux
- Quick start — run something in 5 minutes
- CLI reference — every flag, explained
- Troubleshooting — Apple Silicon, common errors, FAQ
- Philosophy — why we built it this way
- Python 3.11+
- Cellpose 4.x
- scikit-image, numpy, pandas, matplotlib, scipy, PyYAML, tifffile
See environment.yml or requirements.txt for exact versions.
The whole point of this tool is that you can use an AI assistant to figure out the right command. Here are some example prompts:
"I have 4-channel TIFF images of HeLa cells. Channel 1 is DAPI, channel 2 is a GFP-tagged protein that forms foci under stress, channel 3 is an RFP nuclear marker, and channel 4 is brightfield which I want to ignore. How do I run cellquant?"
"My yeast cells are being split in half by the segmentation. How do I fix this?"
"I want to know if my protein of interest colocalizes with a nucleolar marker. What flags should I add?"
If you use cellquant in your research, please cite:
Neferkara A, Ali A, Pincus D. Cellquant: a vibecoder's guide to image analysis. 2026. Submisssion and DOI pending.
MIT License. See LICENSE for details.

