Skip to content

Latest commit

 

History

History
81 lines (59 loc) · 4.16 KB

README.md

File metadata and controls

81 lines (59 loc) · 4.16 KB

napari-cell-gater

License BSD-3 PyPI Python Version tests codecov napari hub

A plugin to perform cell marker gating for multiplexed immunofluorescent imaging

Screenshot 2024-06-17 at 19 34 17


Installation

Step 1. Install napari (see https://napari.org/stable/tutorials/fundamentals/installation)

Step 2. Install napari-cell-gater via pip:

pip install git+https://github.com/melonora/napari-cell-gater.git

How to use

  1. Users will select the necesary directories: images, masks, and quantification directories.

    Assumptions for inputs:
    1.1 Files inside these directories are named according to the samples names.
    1.2 The image for sample 1, should be "1.ome.tif" or "1.tif"; the mask file "1.tif"; and the quantification file "1.csv".
    1.3 Each set of files should all be inside each of the three folders.
    1.4 Any extra files in those folders can make code fail.

  2. Select the lowerbound and upperbound channels to gate. These are all the columns from the quantification csv file that you want to threshold. You must pick the same channels if you plan to save and reload the gates.

  3. Select a sample, and a marker from dropdown menus. 3 layers will load:
    (a.) the reference channel (default: first channel, changeable by dropdown menu)
    (b.) the segmentation mask (for large images this might be a problem)
    (c.) the channel_to_be_gated
    A scatter plot (default: x-axis=channel_to_be_gated intensity, y-axis=Area) (y-axis can be changed by dropdown)
    Underneath the scatterplot a slider will appear, the position of the slider will show up as a vertical line in the scatter plot. The scatter plot can also be changed to a hexbin plot, which really helps with dense clusters of cells. Plotting the data in log10 space is also possible by dropdown. Most of the times it helps. Gates would still be saved in linear space.

  4. Adjust the contrast with the Napari layer menu (top left)

  5. Drag the slider to what they think is correct

  6. Click "Plot Points" to plot points on top of positive cells.

  7. Repeat steps 5 and 6 until satisfied.

  8. Click "Save Gate" to save the gate for the current marker and sample. Go to step 4 and repeat.

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the BSD-3 license, "napari-cell-gater" is free and open source software

Issues

If you encounter any problems, please [file an issue] along with a detailed description.