Jul 24, 2025

Public workspaceAutoMorphoTrack: An Automated Python Package for Organelle Morphology, Motility, and Colocalization Analysis in Live-Cell Imaging V.2

  • Armin Bayati1,2,
  • Jackson Schumacher1,2,
  • Xiqun Chen1,2
  • 1Massachusetts General Hospital;
  • 2Harvard Medical School
Icon indicating open access to content
QR code linking to this content
Protocol CitationArmin Bayati, Jackson Schumacher, Xiqun Chen 2025. AutoMorphoTrack: An Automated Python Package for Organelle Morphology, Motility, and Colocalization Analysis in Live-Cell Imaging. protocols.io https://dx.doi.org/10.17504/protocols.io.q26g79on9vwz/v2Version created by Jackson Schumacher
License: This is an open access protocol distributed under the terms of the Creative Commons Attribution License,  which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited
Protocol status: Working
We use this protocol and it's working
Created: July 24, 2025
Last Modified: July 24, 2025
Protocol Integer ID: 223147
Keywords: ASAPCRN, Mitochondria, Lysosomes, Organelle Detection, Organelle Tracking, Organelle Visualization, automated python package for organelle morphology, cell imaging automorphotrack, tracking organelle motility, cell imaging data, organelle morphology, colocalization analysis of mitochondria, organelle motility, organelle, colocalization analysis in life, mitochondria, automated python package, automorphotrack, morphology classification, quantifying morphology parameter, motility tracking, automated detection, frame colocalization analysis, cell, imaging, lapse image stack, colocalization analysis, source python package
Funders Acknowledgements:
ASAP
Grant ID: 237603
Abstract
AutoMorphoTrack is an open-source Python package for automated detection (optional thresholding), morphology classification, motility tracking, and colocalization analysis of mitochondria and lysosomes in live-cell imaging data. The package provides a pipeline capable of processing multichannel time-lapse image stacks, generating organelle-specific segmentations, organelle-specific count, tracking organelle motility, quantifying morphology parameters, and performing frame-by-frame colocalization analysis.
Guidelines
The package is fully implemented in Python and is distributed as an installable package, accompanied by an example Jupyter notebook (Example_Usage.ipynb). The notebook guides users through the complete pipeline, from loading image stacks to generating final figures. 

A typical analysis begins by loading a multichannel .tif stack containing mitochondria and lysosome channels. Detected organelles can be overlaid onto raw images for verification, and mitochondria are classified into elongated or punctate categories. Organelle trajectories are visualized across frames, and colocalization overlays highlight areas of mitochondria-lysosome proximity. Quantitative outputs, including lysosome counts, mitochondrial morphology distribution, and organelle movement metrics (specifically displacement and velocity), are generated and exported as .csv files for further analysis. 
Materials
Package Summary:
__init__.py: Initializes the package and provides a namespace for importing key modules like core, detection, morphology, tracking, visualization, and Lyso_count. 
core.py: The central orchestrator that runs the full analysis pipeline. It coordinates detection, morphology classification, lysosome counting, and visualization steps, and optionally includes organelle tracking. 
detection.py: Implements adaptive thresholding to detect lysosomes and mitochondria. Applies filtering to exclude background and small artifacts. 
morphology.py: Analyzes mitochondrial structures and classifies them as "elongated" or "punctate" based on user-defined or default area and eccentricity criteria. 
Lyso_count.py: Identifies and counts individual lysosomes per frame. Includes functionality to visualize lysosomal counts and label them on the first frame. 
tracking.py: Tracks the movement of mitochondria and lysosomes across time-lapse frames, calculating displacement and velocity metrics. Includes support for trajectory visualization. 
visualization.py: Handles generation of all figures including overlays, morphology labels, lysosome counts, and track paths. Designed for both QC and publication-ready outputs. 
test_basic.py: A basic test script to check that the core functions of the package are operating correctly on sample input. 
setup.py: Standard Python setup script to install the package using pip. 
README.md: Provides a description of the package, setup instructions, usage overview, and key features. 

The full package is available here and at https://github.com/JacksonGS-1/AutoMorphoTrack.
 
Troubleshooting
Safety warnings
While the current implementation is optimized for lysosomes and mitochondria, the modular architecture of AutoMorphoTrack allows easy adaptation to other organelles or vesicular systems by adjusting detection and classification parameters.
Before start
To analyze lysosomal and mitochondrial morphology, dynamics, and colocalization, we developed and utilized the AutoMorphoTrack Python package. This package provides a pipeline for the automated processing of multichannel microscopy image stacks, integrating organelle detection, morphology classification, movement tracking, and colocalization analysis. The entire workflow is fully automated, requiring user-defined input files and customizable parameters. 
 
The full package is available here and at https://github.com/JacksonGS-1/AutoMorphoTrack.
AutoMorphoTrack Workflow
Organelle Detection: The pipeline begins by detecting mitochondria and lysosomes from a multichannel image stack using adaptive thresholding. This step isolates the structures of interest and filters out background noise.
Mitochondrial Morphology Classification: Detected mitochondrial structures are analyzed based on shape features (area and eccentricity) and classified into either elongated or punctate. A labeled image is then generated to visualize these classifications. 
Lysosome Counting: The binary lysosomal mask is processed to identify and count discrete lysosomes per frame. An annotated image of Frame 0 displays count labels directly over each lysosome.
Organelle Tracking: Mitochondria and lysosomes can be tracked across time-lapse frames to compute displacement and velocity metrics. This step supports dynamic motility analysis.
Visualization and Output: The pipeline saves detected organelle overlays, morphology classification maps, and lysosomal count visualizations. All outputs are stored in the specified output directory.