Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Comprehensive Workflow for image preprocessing.

NotificationsYou must be signed in to change notification settings

CVR-MucosalImmunology/Image-Processing-Workflow

Repository files navigation

Latest update - Jan 2025

Authors:

Thomas O'Neil (thomas.oneil@sydney.edu.au) |Oscar Dong (oscardong4@gmail.com) |Heeva Baharlou

The purpose of this notebook is to provide a consolidated approach to IMC analysis and forms the prerequisite steps to the IMComplete R package workflow. We focused

Nature Method of the Year in 2024 wasspatial proteomics.

Computational tools for spatial proteomics are the focus of the second Comment, from Yuval Bussi and Leeat Keren. These authors note that current image processing and analysis workflow arewell defined but fragmented, with various steps happening back to backrather than in an integrated fashion. They envision a future for the field whereimage processing and analysis steps work in concert for improved biological discovery.

In alignment with these comments, we have committed to provide a comprehensive and dynamic workflow. In part, we aimed to achieve this by compiling as much as we could into this pre-processing workflow.

Particularly, we have emphasised tools that can be performed inone linear workflow. For example, we provide the functionPyProfiler, a tool that performs the same functions as CellProfiler in extracting cell features, andRegisterImages to register IMC to IF in Python, and allowing users remain in this linear pipeline and not have to install additional applications.


Some scripts adapted fromBodenmillerGroup/ImcSegmentationPipeline

Therefore, make sure to also reference these studies:

  • Windhager, J., Zanotelli, V.R.T., Schulz, D. et al. An end-to-end workflow for multiplexed image processing and analysis.Nat Protoc (2023).


Folder structure

ImagingAnalysis/ (root directory)├── IMComplete-Workflow├── ImcSegmentationPipeline├── Experiment_name_1│     └── raw│            └── Sample1.zip│            └── Sample2.zip│            └── ...│     └── analysis│            └── 1_image_out│            └── 2_cleaned│            └── 3_segmentation│                   └── 3a_cellpose_crop│                   └── 3b_cellpose_full│                   └── 3c_cellpose_mask│                   └── 3d_compartments│            └── 4_pyprofiler_output│     └── panel.csv├── ...├── Experiment_name_n



Set up

Anaconda is needed to run this workflow. Follow the steps below to set up Anaconda and aconda environment:

InstallAnaconda and navigate to the relevant command line interface:

WindowsmacOS
1. Search for'Anaconda Prompt' in the taskbar search
2. SelectAnaconda Prompt
1. Usecmd + space to open Spotlight Search
2. Type'Terminal' and pressreturn to open



Using Anaconda...

Step 1: Set your directory to the analysis folder (or theroot directory for image analysis)

cd /Desktop/ImageAnalysis

Step 2: Clone the IMComplete repository.

From Github
Go to theGithub page and near the top click thecode button and download the zip. Unzip the folder into theroot directory. This will contain the IMComplete-Workflow documents and allow ready access to the necessary files.

Using Git in command line

Install Git

Git needs to be installed on your system. Find the instructionshere


git clone --recursive https://github.com/CVR-MucosalImmunology/IMComplete-Workflow.git

Step 3: Clone the extra repositories:

git clone --recursive https://github.com/BodenmillerGroup/ImcSegmentationPipeline.git

Step 4: Create a conda environment and install some packages (in one line)

conda env create -f IMComplete-Workflow/environment.yml

This can take some time so be patient!


Step 5: Activate the newly created conda environment

conda activate IMComplete

Step 6: Activate and ensure your GPU-acceleration is accessible

Unfortunately, parts of this workflow will require GPU-acceleration: Cell segmentation, Denoise, PyProfiler (will run quicker, but not necessary).

You will need to install Pytorch and pytorch-cuda versions that are suitable for your PC. Instructions are foundhere. The code will look like this:

conda install pytorch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 pytorch-cuda=12.4 -c pytorch -c nvidia

Step 7: Install cellpose

Cellpose is used for cell segmentation. We'll install the gui version for the user-friendly version. If you experience errors installing cellpose, refer to thecellpose installation instructions

python -m pip install cellpose[gui]


Workflow

  1. Set up (CheckSetup())

  2. Create a new project (NewProject())

  3. Prep the raw folder andpanel.csv

  4. Extract images from the raw folder (ExtractImages())

  • Optional 1: Check filter parameters of IF data (CheckExtract())

  • Optional 2: Filter images (FilterImages())

  • Optional 3: Select crop regions for segmentation training (CropSelector())

  1. Prepare the images for Segmentation model training (PrepCellpose())
  • Optional 4: Register low-resolution images with high-resolution images to improve cell segmentation (RegisterImages())
  1. Train a segmentation model (cellpose)
  • Optional 5: You have the option to not train a segmentation model and use a generic model.
  1. Batch segment the images and generate cell masks (BatchSegment())

  2. Extract data from your images using the cell segment masks (PyProfiler())



About

A Comprehensive Workflow for image preprocessing.

Topics

Resources

Stars

Watchers

Forks

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp