WormLib is a modular open-source image analysis library for quantifying microscopy images of Caenorhabditis elegans embryos. It provides an end-to-end pipeline from image loading, embryo and cell segmentation, cell identity prediction, spot detection, and spatial mRNA analysis.
You can learn more about Wormlib by reading the paper here and in the detailed documentation at READTHEDOCS.io. Please see install instructions below.
1 - Single-cell spot detection
If you use WormLib in your research, please cite:
Naly Torres, Luis de Lira Aguilera, Karissa Coleman, Richard Bruno, Brian Munsky, Erin Osborne Nishimura WormLib: A Modular Image Analysis Library for Quantifying C. elegans Microscopy. (In preparation)
If you already have an older or broken wormlib environment, remove it first:
conda deactivate
conda env remove -n wormlib
conda env create -f installation/wormlib.yml
conda activate wormlibThis installs the core scientific stack through conda and the remaining WormLib dependencies through pip.
# Clone the repository
git clone https://github.com/erinosb/WormLib.git
cd WormLib
# Create and activate the tested WormLib environment
conda env create -f installation/wormlib.yml
conda activate wormlib| Package | Version | Purpose |
|---|---|---|
| BigFISH | 0.6.2 | smFISH spot detection & analysis |
| Cellpose | 3.1.0 | Deep learning cell segmentation |
| scikit-image | 0.23.2 | Image processing & morphology |
| scikit-learn | Conda-managed | Random Forest classifiers (transitive via joblib) |
| PyTorch | 2.4.1 | GPU backend for Cellpose |
| OpenCV | 4.10.0.84 | Contour & ellipse fitting |
| nd2 | 0.10.3 | Nikon ND2 file reader |
| tifffile | 2025.6.11 | TIFF file I/O |
| PyYAML | ≥ 6.0.1 | YAML configuration parsing |
| ReportLab | ≥ 4.0.8 | PDF report generation |
| Pillow | ≥ 10.0 | Image handling for PDF reports |
For GPU-accelerated Cellpose segmentation on Linux/Windows with an NVIDIA GPU and CUDA 12.4-compatible drivers:
conda env create -f installation/wormlib_cuda.yml
conda activate wormlibOn Apple Silicon macOS, use the default installation/wormlib.yml. PyTorch MPS
support is included in the regular macOS PyTorch wheels when available.
python -c "import numpy as np; import torch; from cellpose import models; import bigfish; print('WormLib dependencies OK')"If you see an error indicating that a module compiled with NumPy < 2.0 cannot
run with NumPy ≥ 2.0, or _ARRAY_API not found, the active environment is not
using the pinned WormLib environment. Recreate it from the YAML file above.
This project is licensed under the MIT License. See LICENSE for details.
- Issues & Contributions: GitHub
- Repository: github.com/erinosb/WormLib
