Skip to content

Immunodynamics-Engel-Lab/lmd-imageanalysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Segmentation and Reference Point Detection for Laser Capture Microdissection (LMD)

Project Summary

This repository contains the code for a Cellpose-SAM & pyLMD project dedicated to automating cell boundary and reference point detection in microscopic images used for Laser Capture Microdissection (LMD).

The primary function of this repository is to identify the boundaries of target cells and detect precise reference points from laser engraved 'T' structures and is designed to enhance the reproducibility of the LMD workflow.


🔬 Stepwise Workflow

  1. Fiducial Marking
    Burn fiducial T-marks into tissue sections using LMD laser.

  2. Image Acquisition
    Acquire fluorescence microscopy images.

  3. Segmentation (Computational part 1)
    Perform Cellpose-SAM segmentation to delineate cell boundaries.

  4. Filtering (Computational part 1)
    Apply intensity and overlap filtering to refine segmentation results.

  5. Fiducial Detection (Computational part 2)
    Detect fiducials via FFT-based template matching.

  6. Data Export (Computational part 2)
    Determine and export contours and coordinates via pyLMD as XML.

  7. Software Integration
    Import XML into Leica LMD software.

  8. Alignment & Excision
    Align fiducials and perform precise laser excision.

  9. Validation
    Validate excision results microscopically.


Getting Started

📋 Prerequisites

This project exclusively uses the Pixi package manager to guarantee a reliable and isolated Python environment. Install Instructions

💻 Installation and Setup

  1. Clone the repository:

    git clone https://github.com/Immunodynamics-Engel-Lab/lmd-imageanalysis.git
    cd lmd-imageanalysis
  2. Initialize the Pixi Environment:

    Pixi reads the required dependencies from the pixi.toml file and creates a ready-to-use virtual environment.

    pixi install

🔬 Running Prediction and XML Generation

The analysis pipeline is contained in the lmd_nb.py script. This file is a Jupyter Notebook utilizing the Jupytext percent format, which allows it to be edited easily in any text editor while preserving its executable notebook structure.

⚙️ Configuration

Before running the pipeline, you must configure the parameters and channel mapping within the lmd_nb.py script:

  • Channel Configuration: The fluorescence channel assignments must be set to match your input image data.
    • Default Setup: The notebook is currently defaulted to: Marker (Ch 0), Autofluorescence (Ch 1), and DAPI (Ch 2). Adjust these channel indices (0-indexed) at the beginning of lmd_nb.py as needed.
  • Parameter Adjustment: Parameters for specific processing steps can be adjusted directly before their corresponding notebook cells in lmd_nb.py.

🚀 Execution Command

Once configured, execute the pipeline using the following command:

pixi run python lmd_nb.py

📊 FAIR compliance

Example data for testing the in silico workflow is available on Zenodo

The workflow is available through Zenodo and WorkflowHub

All resources are publicly accessible and distributed under open licenses where applicable.


✉️ Correspondence

Prof. Dr. Daniel R. Engel: Department of Immunodynamics, Institute of Experimental Immunology and Imaging, University Hospital Essen, Essen, Germany

About

Segmentation and Reference Point Detection for Laser Capture Microdissection

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages