Skip to content
Nhan Huynh edited this page Oct 16, 2023 · 30 revisions

Gating is an extension for 'minerva_analysis' that enables filtering of selected image channels based on the channel's intensity value range. Users can visualize the subset of segmented cells that are selected based on the channel filters and export the list to a csv file.

image1

Installation

For End Users

Download latest release and execute it. This will start a local server on your machine. Open the browser and navigate to: http://localhost:8000/

For Developers

  1. Clone locally from Github: git clone -b gating git@github.com:labsyspharm/minerva_analysis.git
    • or, switch to branch: git switch gating
  2. Run from readme.md (no new env updates)

Functionality

Channel Viewer

Select channels for viewing under 'Channels' and use the slider to adjust contrast. Click on 'auto' for auto-contrasting using a Gaussian Mixture Model with 3 components (displayed above the slider with the pixel-level distribution).

There are buttons next to 'Channels' for saving and loading previous settings via a CSV file or a database created by the tool.

image2

Channel Gating

Select channels for gating under 'CSV Gating' and use the slider to filter segmented cells by intensity range. Click on 'auto' for auto-gating using a Gaussian Mixture Model with 2 components (displayed above the slider with the cell-level distribution).

There are buttons next to 'CSV Gating' for saving and loading previous settings via a CSV file or a database created by the tool.

image3

Viewing channels for Keratin (red), aSMA (blue), and CD45 (green). Gating for cells with high intensity in the CD45 channel.

Multiple Channels

Up to 3 channels can be used for gating segmented cells. Click 'Centroids (OR-mode)' to visualize the cells that are selected for each channel gate.

image4

Viewing and gating channels for Keratin (red), aSMA (blue), and CD45 (green). Centroids indicate selected cells for each channel.

Lasso Selection

Cells on an image can be selected or removed using the lasso spatial selection. Hold shift + left-click to draw lasso selection. Multiple lasso selections are supported. Click lasso selection button to toggle on/off and click the X button to delete the lasso selection. Click the plus/minus button to toggle additive/subtractive selections.

lasso

GMM traces and auto-gating values are updated after lasso selections. Lasso selections and cells that are selected can be downloaded using the steps below.

Download Gating Info

Download a CSV file with the selected channel gates and their respective ranges and a CSV file with the gated selections of segmented cells.

image5

Channels, gates, and lasso selections that are downloaded can be uploaded to restore previous settings.