Skip to main content

3D cell segmentation by composing 2D segmentations

Project description

3DCellComposer - A Versatile Pipeline Utilizing 2D Cell Segmentation Methods for 3D Cell Segmentation

Haoran Chen and Robert F. Murphy
Carnegie Mellon University
V1.2 February 7, 2024

3DCellComposer is a versatile, open-source software designed as a general solution for 3D cell segmentation. It allows users to choose any existing 2D segmentation model appropriate for their tissue or cell type(s) without requiring any additional training. Moreover, we have enhanced our CellSegmentationEvaluator quality evaluation tool to support 3D images. It allows users to compare and select the most suitable 2D segmentation models for 3D tasks, without the need for human annotations to assess performance.

It is available as a full-featured GitHub repository, and as a python package on PyPi that provides a simplified implementation that uses just DeepCell as the 2D segmenter.

Reference: Haoran Chen and Robert F. Murphy (2023) 3DCellComposer - A Versatile Pipeline Utilizing 2D Cell Segmentation Methods for 3D Cell Segmentation. Under review.

Using the PyPI package

To use the package,

pip install ThreeDCellComposer

Then import the function,

from ThreeDCellComposer.ThreeDCellComposer import ThreeDCellComposer

To call the function

ThreeDCellComposer(image_path,nucleus_channel_marker_list,cytoplasm_channel_marker_list,membrane_channel_marker_list,segmentation_method)

Where the channel lists are lists of strings consisting of the names (not numbers) of the channels to be used for segmentation. Only 'deepcell' is supported as the segmentation_method by the PyPI package at this time.

Using the repository version

Overview

The 3DCellComposer script processes multiplexed imaging data for cell segmentation. It requires specific inputs including the path to the image file and lists of markers for different cell components (nucleus, cytoplasm, and cell membrane). It also includes an optional input for specifying the 2D segmentation method(s) to be utilized.

Environment

  • Clone this GitHub repository.
  • Install Conda, if not already installed.
  • Run conda env create -f environment.yml. This command will create a new Conda environment 3DCellComposer and install all the necessary packages.
  • The software was tested on Ubuntu 18.04.5 LTS and Python 3.8.

Command Structure

The script is executed with the following structure:

python run_3DCellComposer.py [image_path] [nucleus_markers] [cytoplasm_markers] [membrane_markers] [--segmentation_method]

Detailed Input Description

  1. Image Path:

    • Description: Path to your multiplexed image file.
    • Format: String
    • Example: /path/to/your/image.ome.tiff
  2. Nucleus Channel Marker List:

    • Description: A list of nuclear marker(s) used in the multiplexed image for segmentation.
    • Format: String of markers separated by commas, no spaces.
    • Example: For a single marker: "Ir191", for multiple markers: "In115,Y89,Tb159"
  3. Cytoplasm Channel Marker List:

    • Description: A list of cytoplasmic marker(s) used in the multiplexed image for segmentation.
    • Format: Similar to the nucleus channel marker list.
    • Example: "La139,Pr141,Eu151"
  4. Membrane Channel Marker List:

    • Description: A list of cell membrane marker(s) used in the multiplexed image for segmentation.
    • Format: Similar to the nucleus and cytoplasm channel marker lists.
    • Example: "Gd160,Dy162"
  5. Segmentation Method (Optional):

    • Description: Choose the 2D segmentation method.
    • Format: String (one of "deepcell", "compare", "custom")
    • Default: "deepcell"
    • Options:
      • "deepcell" - Employs DeepCell segmentation, which achieved the highest performance in our evaluation.
      • "compare" - Compares and selects the best method from among 7 different options, which may result in a longer processing time.
      • "custom" - Utilizes a user-provided segmentation method, for which an empty wrapper with instructions is supplied in 3DCellComposer/segmentation_2D/wrapper/custom_segmentation_wrapper.py.

Example Command

Here is an example of a complete command using the 3DCellComposer script:

python run_3DCellComposer.py ./data/3D_IMC_image.ome.tiff "Ir191" "In115,Y89,Tb159" "La139,Pr141,Eu151,Gd160,Dy162" --segmentation_method "deepcell"

In this command, the script processes the image located at ./data/3D_IMC_image.ome.tiff, utilizing Ir191 as the nuclear marker, the sum of In115, Y89, Tb159 as the cytoplasmic markers, and the sum of La139, Pr141, Eu151, Gd160, Dy162 as the cell membrane markers. The script employs DeepCell as the 2D segmentation model.

Contact

Robert F. Murphy - murphy@cmu.edu
Haoran Chen - haoran.chen@stjude.org

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ThreeDCellComposer-1.2.1.tar.gz (17.0 kB view details)

Uploaded Source

File details

Details for the file ThreeDCellComposer-1.2.1.tar.gz.

File metadata

  • Download URL: ThreeDCellComposer-1.2.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for ThreeDCellComposer-1.2.1.tar.gz
Algorithm Hash digest
SHA256 b6d34736fb33388d8d874f7df024b7dd9cb44ba775f6f7c014d44c9564d8a249
MD5 3f929650323a2228badf3665e2517749
BLAKE2b-256 78c44b8b258d4ff57f05737d59e39aee94e59837eb76e86c39ad8954bb1087c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page