Skip to main content

chlamy_clusters

Introduction

This utility analyzes microscopy images to quantify the number and size of cell clusters. This is determined by using threshold values and gaussian blurring, followed by identification of contiguous regions. The utility was written for use on a project in the King Lab at UConn Health to study Chlamydomonas; the code and concept are suitably general to be applied in other applications.

Parameters

  • imageDir: source directory that contains micrscopy image files
  • imageFormat: list of file extensions to process (default=['.tif'])
  • grayThresh: threshold pixel value for identifying features in image (default=150, on 0-255 scale)
  • blurKernel: radius of Gaussian blur (default=9)
  • histogramPlots: boolean flag, when provided, generates histogram plots
  • outputDir: directory for stats and figures (default='/output-blurX-threshY')

Input

Input:

    <imageDir>
    ├── KO/                 -> input images for KO (arbitrary file names)
    └── WT/                 -> input images for WT (arbitrary file names)

Output

    <imageDir>
    └── images/         -> raw images, relocated and renamed into single collection
        ├── KO-#.pdf    -> indexed KO images
        └── WT-#.pdf    -> indexed WT images
    
    <outputDir>
    ├── histograms/     -> figures showing comparitive distrubutions
        ├── KO-#.pdf    -> figure showing raw image, processed image, and histogram for each KO image
        └── WT-#.pdf    -> figure showing raw image, processed image, and histogram for each WT image
    ├── cumultive.pdf   -> lineplots and violin plots comparing cluster size distributions in WT and KO images
    ├── data.csv        -> data export for use outside chlamy_clusters 
    └── data.pkl        -> pickle file containing processed data (auto-loads)

Analysis

The cumulative.pdf gives various summary metrics on the collection of WT amd KO images. The stats show raw counting of numbers of clusters. However, since the number of cells captured in each image is not uniform, additional plots are provided, which include normalization.

Getting Started

Create a python virtual environment, activate the environment, and install chlamy-clusters:

python3.14 -m venv cc-venv
source cc-venv/bin/activate
pip3 install chlamy-clusters

Check that the software is installed by getting version number or the help dialog

chlamy-clusters -v
chlamy-clusters -h

Run the package and provide your image files:

chlamy-clusters --imageDir /path/to/your/image/files --grayThresh 150 --blurKernel 9 --histogramPlots

Release files for chlamy-clusters 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chlamy-clusters 1.0.1
File Size Uploaded
chlamy_clusters-1.0.1.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chlamy-clusters 1.0.1
File Interpreter ABI Platform
chlamy_clusters-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / chlamy_clusters-1.0.1.tar.gz

Download URL chlamy_clusters-1.0.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
98617992d135134de0780fe32bfda5887c8fb5cf891ccb40f4911f094518754e
BLAKE2b-256 checksum
How to use checksums
7b9f89b8e9a3e1b9a9c64844f28aeeea37307e45259a938843a573a4661e433b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / chlamy_clusters-1.0.1-py3-none-any.whl

Download URL chlamy_clusters-1.0.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0281d9080fd1cb712059b697550fc0de2b51d8076790eeda087cbfe3a4a3eaa
BLAKE2b-256 checksum
How to use checksums
99202ec29ec2094b85b0f93a95872ac0f778d662e927696b092db45fc470db43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page