.. _methods:
Methods
=======
.. role:: raw-html(raw)
:format: html
The methods that are used in polarityjam are listed on this page. Whenever necessary, a brief summary
of the methodology is provided.
Segmentation
++++++++++++
Segmentation can currently be performed using the following methods:
- Cellpose `cellpose `_
- Segment Anything `segmentanything `_
- Mesmer deepcell `mesmer deepcell `_
- microSAM `microSAM `_
Polarity-JaM natively uses Cellpose. Cellpose is a generalist algorithm for cell and nucleus segmentation.
Cellpose uses a neural network that was trained to predict horizontal and vertical gradients of
topological maps, together with a binary map indicating whether or not a pixel is inside a region
of interest. The topological maps were previously created with the help of ground-truth masks.
Following the combined gradients in a process known as gradient tracking, grouping together
pixel that converge to the same point and combining results with the information from the binary mask,
precise cell shapes can be recovered.
Alternatively, the user can try the following segmentation methods:
Segment Anything Model (SAM) is a new AI model from Meta AI that can "cut out" any object, in any image,
with a single click. For more information, please visit `segmentanything `_.
Mesmer deepcell is a deep learning model for cell segmentation (whole-cell and nuclear). For more information,
please visit `mesmer deepcell `_.
microSAM is a tool for segmentation and tracking in microscopy build on top of SegmentAnything. For more information,
please visit `microSAM `_.
Cell properties
+++++++++++++++
Most cell properties are extracted from a `scikit-image `_ python library.
More specifically, we use the `regionprops `_
module of scikit-image. It allows the user to measure properties of labeled image regions.
Region adjacency graph (neighborhood statistics)
++++++++++++++++++++++++++++++++++++++++++++++++
Our neighborhood statistic is calculated with the aid of a python module called `pysal `_ in
combination with the scikit-image graph implementation. Each cell is modelled as a node in the graph.
Additionally, a feature of interest (FOI) can be specified. This feature is included in the graph
structure and a `morans I `_ correlation analysis can be performed.
Other
+++++
Coding: `python `_ :raw-html:`
`
Documentation build: `sphinx `_ :raw-html:`
`
Documentation hosting: `readthedocs `_ :raw-html:`
`
Jupyter notebooks: `jupyter `_ :raw-html:`
`
Calculations: `numpy `_ :raw-html:`
`
Datasets: `pandas `_ :raw-html:`
`
Plot: `matplotlib `_ and `cmocean `_ :raw-html:`
`
Logging: `python logging `_ :raw-html:`
`
Testing: `python unittest `_ :raw-html:`
`
Version control: `git `_ :raw-html:`
`
Continuous integration: `github actions `_ :raw-html:`
`
Sketching: `inkscape `_ :raw-html:`
`
Data Management: `omero `_ :raw-html:`
`