Skip to content

cheeseman-lab/goudacell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoudaCell

Cell segmentation and feature extraction on the Whitehead HPC using Cellpose.

Features

  • Segmentation modes: nuclei-only, cells-only, or dual (both)
  • Feature extraction: CellProfiler-equivalent morphological and intensity features
  • File formats: TIFF, Nikon ND2, DeltaVision (.dv)
  • Cellpose 3 & 4: Supports both versions with automatic model selection

Getting Started

1. Set Up Your Environment (one time)

# Clone the repository on fry
git clone https://github.com/cheeseman-lab/goudacell.git
cd goudacell

# Create the environment
conda create -n goudacell -c conda-forge python=3.11 uv pip -y
conda activate goudacell

# Install goudacell (choose ONE):
uv pip install -e ".[cellpose3]"  # For most cells (rounded shapes)
uv pip install -e ".[cellpose4]"  # For complex cell shapes

# Register as a Jupyter kernel
python -m ipykernel install --user --name goudacell --display-name "goudacell"

2. Test Parameters Interactively

# Start Jupyter on a GPU node (run from goudacell directory)
cd /path/to/goudacell
sbatch scripts/jupyter_gpu.sh

# Check the output file for the URL
cat goudacell_jupyter-*.out

Open the notebook at notebooks/segmentation.ipynb and:

  1. Set your image directory and file pattern
  2. Choose segmentation mode: "nuclei", "cells", or "dual"
  3. Adjust parameters (diameter, thresholds) using the sweep cells
  4. Run feature extraction (optional)
  5. Generate batch config when happy with results

3. Run Batch Segmentation

# Use the config file generated by the notebook
sbatch scripts/run_segmentation.sh /path/to/segmentation_config.yaml

Segmentation Modes

Mode Output Use case
nuclei *_nuclei_mask.tif Nuclear segmentation only
cells *_mask.tif Cell segmentation only
dual *_nuclei_mask.tif + *_cell_mask.tif Both nuclei and cells

Feature Extraction

Extract CellProfiler-equivalent features from segmented images (~100+ features per compartment):

  • Intensity: mean, std, min, max, median, quartiles, edge intensities
  • Shape: area, perimeter, solidity, eccentricity, Zernike/Hu moments
  • Texture: Haralick (13), PFTAS (54)
  • Distribution: radial intensity distribution
  • Correlation: channel correlation, colocalization metrics
  • Neighbors: counts, distances, angles
  • Foci: count and area per channel (optional)

Which Cellpose Version?

Version Install with Use for
Cellpose 3 .[cellpose3] Round cells (most common)
Cellpose 4 .[cellpose4] Irregular/complex shapes

File Formats Supported

  • TIFF (.tif, .tiff)
  • Nikon ND2 (.nd2)
  • DeltaVision (.dv)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published