fishfeats 1.1.19.post1.dev0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fishfeats-1.1.19.post1.dev0/.github/workflows/cidoc.yml +31 -0
- fishfeats-1.1.19.post1.dev0/.gitignore +31 -0
- fishfeats-1.1.19.post1.dev0/LICENSE +29 -0
- fishfeats-1.1.19.post1.dev0/MANIFEST.in +9 -0
- fishfeats-1.1.19.post1.dev0/PKG-INFO +71 -0
- fishfeats-1.1.19.post1.dev0/README.md +36 -0
- fishfeats-1.1.19.post1.dev0/docs/3d-cell-positions.md +26 -0
- fishfeats-1.1.19.post1.dev0/docs/Add-grid.md +15 -0
- fishfeats-1.1.19.post1.dev0/docs/Associate.md +40 -0
- fishfeats-1.1.19.post1.dev0/docs/Classify-cells.md +103 -0
- fishfeats-1.1.19.post1.dev0/docs/Get-RNAs.md +146 -0
- fishfeats-1.1.19.post1.dev0/docs/Get-cells.md +110 -0
- fishfeats-1.1.19.post1.dev0/docs/Get-nuclei.md +119 -0
- fishfeats-1.1.19.post1.dev0/docs/Hierarchical-clustering.md +29 -0
- fishfeats-1.1.19.post1.dev0/docs/Image-scalings.md +27 -0
- fishfeats-1.1.19.post1.dev0/docs/Installation.md +73 -0
- fishfeats-1.1.19.post1.dev0/docs/Known-errors-and-solutions.md +226 -0
- fishfeats-1.1.19.post1.dev0/docs/Measure-cytoplasmic-staining.md +20 -0
- fishfeats-1.1.19.post1.dev0/docs/Measure-nuclear-staining.md +19 -0
- fishfeats-1.1.19.post1.dev0/docs/Separate-junctions-and-nuclei.md +50 -0
- fishfeats-1.1.19.post1.dev0/docs/Touching-labels.md +28 -0
- fishfeats-1.1.19.post1.dev0/docs/environnements_list/macbook_pro_M1_fishfeats_1.1_py310.yaml +358 -0
- fishfeats-1.1.19.post1.dev0/docs/environnements_list/ubuntu20.04_fishfeats1.1_py3.11.yaml +220 -0
- fishfeats-1.1.19.post1.dev0/docs/environnements_list/ubuntu_20.04_fishfeats_1.1_py310.yaml +263 -0
- fishfeats-1.1.19.post1.dev0/docs/environnements_list/windows10_fishfeats1.1.11_py39.yaml +283 -0
- fishfeats-1.1.19.post1.dev0/docs/environnements_list/windows10_fishfeats_1.1.11_py310.yaml +224 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/Main_snapshot.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/assigning.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/assoe.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/assosync.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/classProj_edit.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/class_border.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/class_mainpara.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/class_parameters.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/cytomes.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/fromnclosest.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/get_juncs.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/grid.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/grid_interface.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/hier_analysis.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/main.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/measureIm.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/measurecells.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/nuc_measure.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/nucleilab.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/projecting.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/projection.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/rna_assigned.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/rna_counts.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/rna_display.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/rna_toseg.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/separated.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/snap.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/start_scale_anoot.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/touch_griot.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/touchs.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/imgs/zpos3d.png +0 -0
- fishfeats-1.1.19.post1.dev0/docs/index.md +64 -0
- fishfeats-1.1.19.post1.dev0/mkdocs.yml +86 -0
- fishfeats-1.1.19.post1.dev0/pyproject.toml +70 -0
- fishfeats-1.1.19.post1.dev0/setup.cfg +4 -0
- fishfeats-1.1.19.post1.dev0/src/_tests/test_basics.py +105 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/Analysis.py +239 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/Association.py +230 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/CellObjects.py +1624 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/ClassifyCells.py +702 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/Configuration.py +100 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/DaskedEpyseg.py +222 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/FishGrid.py +71 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/FishWidgets.py +238 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/MainImage.py +1014 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/NapaCells.py +311 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/NapaMix.py +149 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/NapaNuclei.py +456 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/NapaRNA.py +1222 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/Naparing.py +1713 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/ProcessFolder.py +77 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/RNASpots.py +385 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/SegmentObj.py +481 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/Separe.py +232 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/Utils.py +868 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/__init__.py +18 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/_version.py +1 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/cellpose_dask.py +303 -0
- fishfeats-1.1.19.post1.dev0/src/fish_feats/napari.yaml +52 -0
- fishfeats-1.1.19.post1.dev0/src/fishfeats.egg-info/PKG-INFO +71 -0
- fishfeats-1.1.19.post1.dev0/src/fishfeats.egg-info/SOURCES.txt +89 -0
- fishfeats-1.1.19.post1.dev0/src/fishfeats.egg-info/dependency_links.txt +1 -0
- fishfeats-1.1.19.post1.dev0/src/fishfeats.egg-info/entry_points.txt +2 -0
- fishfeats-1.1.19.post1.dev0/src/fishfeats.egg-info/requires.txt +17 -0
- fishfeats-1.1.19.post1.dev0/src/fishfeats.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: cidoc
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- master
|
|
6
|
+
- main
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
jobs:
|
|
10
|
+
deploy:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Configure Git Credentials
|
|
15
|
+
run: |
|
|
16
|
+
git config user.name github-actions[bot]
|
|
17
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: 3.x
|
|
21
|
+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
22
|
+
|
|
23
|
+
- uses: actions/cache@v4
|
|
24
|
+
with:
|
|
25
|
+
key: mkdocs-material-${{ env.cache_id }}
|
|
26
|
+
path: .cache
|
|
27
|
+
|
|
28
|
+
restore-keys: |
|
|
29
|
+
mkdocs-material-
|
|
30
|
+
- run: pip install mkdocs-material
|
|
31
|
+
- run: mkdocs gh-deploy --force
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# MkDocs documentation
|
|
2
|
+
/site/
|
|
3
|
+
# PyBuilder
|
|
4
|
+
target/
|
|
5
|
+
|
|
6
|
+
# IPython Notebook
|
|
7
|
+
.ipynb_checkpoints
|
|
8
|
+
o# OS
|
|
9
|
+
.DS_Store
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
__pycache__/
|
|
13
|
+
|
|
14
|
+
env/
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
tmp/
|
|
21
|
+
.eggs/
|
|
22
|
+
lib/
|
|
23
|
+
lib64/
|
|
24
|
+
parts/
|
|
25
|
+
src/_tests/files/
|
|
26
|
+
sdist/
|
|
27
|
+
var/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023, Gaëlle LETORT
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fishfeats
|
|
3
|
+
Version: 1.1.19.post1.dev0
|
|
4
|
+
Summary: Napari plugin for RNA-Fish+cells analysis pipeline
|
|
5
|
+
Author: Gaëlle Letort
|
|
6
|
+
License-Expression: BSD-3-Clause
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/gletort/FishFeats/issues
|
|
8
|
+
Project-URL: Documentation, https://gletort.github.io/FishFeats/
|
|
9
|
+
Project-URL: Source Code, https://github.com/gletort/FishFeats
|
|
10
|
+
Project-URL: User Support, https://github.com/gletort/FishFeats/issues
|
|
11
|
+
Classifier: Framework :: napari
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Image Processing
|
|
15
|
+
Requires-Python: >=3.7
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: napari<0.6.3
|
|
19
|
+
Requires-Dist: numpy
|
|
20
|
+
Requires-Dist: imaris_ims_file_reader
|
|
21
|
+
Requires-Dist: czifile
|
|
22
|
+
Requires-Dist: tifffile
|
|
23
|
+
Requires-Dist: munkres
|
|
24
|
+
Requires-Dist: matplotlib
|
|
25
|
+
Requires-Dist: scikit-image
|
|
26
|
+
Requires-Dist: opencv_python_headless
|
|
27
|
+
Requires-Dist: lxml
|
|
28
|
+
Requires-Dist: packaging
|
|
29
|
+
Provides-Extra: full
|
|
30
|
+
Requires-Dist: big-fish>=0.6.2; extra == "full"
|
|
31
|
+
Requires-Dist: epyseg; extra == "full"
|
|
32
|
+
Requires-Dist: cellpose[distributed]; extra == "full"
|
|
33
|
+
Requires-Dist: stardist; extra == "full"
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# Fish&Feats 
|
|
37
|
+
|
|
38
|
+
[](https://github.com/gletort/FishFeats/-/blob/main/LICENSE)
|
|
39
|
+
[](https://python.org)
|
|
40
|
+
|
|
41
|
+
[Napari](https://napari.org/stable/) plugin to quantify 3D cells in a tissue and their smRNA-Fish or other RNA contents.
|
|
42
|
+
|
|
43
|
+
[main.webm](https://github.com/user-attachments/assets/7eda5fa8-3241-4af8-b392-bc3e64aa31b9)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
FishFeats offers several flexible options to analyse 3D cells and RNA counts, from segmentation of apical cells and nuclei to hierarchical clustering of cells based on their RNA contents.
|
|
47
|
+
Installation/Usage... are all described in the [documentation](https://gletort.github.io/FishFeats/).
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
# Installation
|
|
52
|
+
|
|
53
|
+
Soon available as a pip module.
|
|
54
|
+
|
|
55
|
+
# Usage
|
|
56
|
+
|
|
57
|
+
You can launch `fishfeats` in Napari by going to `Plugins>fishfeats>Start`.
|
|
58
|
+
It will open a file dialog box asking you to select the image that you want to analyze.
|
|
59
|
+
Refer to the [documentation](https://gletort.github.io/FishFeats/) for presentation of the different steps possible in the pipeline.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# License
|
|
63
|
+
|
|
64
|
+
Fishfeats is distributed freely under the BSD-3 license.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
[napari]: https://github.com/napari/napari
|
|
68
|
+
[BSD-3]: http://opensource.org/licenses/BSD-3-Clause
|
|
69
|
+
[tox]: https://tox.readthedocs.io/en/latest/
|
|
70
|
+
[pip]: https://pypi.org/project/pip/
|
|
71
|
+
[PyPI]: https://pypi.org/
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Fish&Feats 
|
|
2
|
+
|
|
3
|
+
[](https://github.com/gletort/FishFeats/-/blob/main/LICENSE)
|
|
4
|
+
[](https://python.org)
|
|
5
|
+
|
|
6
|
+
[Napari](https://napari.org/stable/) plugin to quantify 3D cells in a tissue and their smRNA-Fish or other RNA contents.
|
|
7
|
+
|
|
8
|
+
[main.webm](https://github.com/user-attachments/assets/7eda5fa8-3241-4af8-b392-bc3e64aa31b9)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
FishFeats offers several flexible options to analyse 3D cells and RNA counts, from segmentation of apical cells and nuclei to hierarchical clustering of cells based on their RNA contents.
|
|
12
|
+
Installation/Usage... are all described in the [documentation](https://gletort.github.io/FishFeats/).
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
# Installation
|
|
17
|
+
|
|
18
|
+
Soon available as a pip module.
|
|
19
|
+
|
|
20
|
+
# Usage
|
|
21
|
+
|
|
22
|
+
You can launch `fishfeats` in Napari by going to `Plugins>fishfeats>Start`.
|
|
23
|
+
It will open a file dialog box asking you to select the image that you want to analyze.
|
|
24
|
+
Refer to the [documentation](https://gletort.github.io/FishFeats/) for presentation of the different steps possible in the pipeline.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# License
|
|
28
|
+
|
|
29
|
+
Fishfeats is distributed freely under the BSD-3 license.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
[napari]: https://github.com/napari/napari
|
|
33
|
+
[BSD-3]: http://opensource.org/licenses/BSD-3-Clause
|
|
34
|
+
[tox]: https://tox.readthedocs.io/en/latest/
|
|
35
|
+
[pip]: https://pypi.org/project/pip/
|
|
36
|
+
[PyPI]: https://pypi.org/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
!!! abstract "Estimate or correct the Z position of each cell"
|
|
2
|
+
_Choose `3d cell positions` in the main action choice interface to visualize and edit cells Z position._
|
|
3
|
+
|
|
4
|
+
Epithelia junctions were segmented on the [2d projection](Get-cells.md) of the junction staining. From this segmentation, each cell is then back-projected in the 3d junction staining to estimate its position in Z. This information is saved in a file called *imagename_cellsZ.csv*. You can directly modify this file and put the desired Z value in the corresponding cell row, or use the plugin interface to modify it manually.
|
|
5
|
+
|
|
6
|
+
The pipeline draw the cells at their respective z-position. You can visualize it in 3D by switching to the 3d mode at the left bottom of the napari interface, but the edition should be done in the 2D view.
|
|
7
|
+
|
|
8
|
+
## Z-map calculation
|
|
9
|
+
If the Z positions of the cells are mostly wrong, you can recalculate them by clicking on `recalculate zmap`.
|
|
10
|
+
This back-project locally the junction staining by finding the Z that has the most similarity with the projected staining.
|
|
11
|
+
This map precision depends on the parameters:
|
|
12
|
+
* `zmap resolution` which is the size (in pixels) of sliding windows on which the z is estimated. A lower value will allow for more resoluted values but will take longer to calculate.
|
|
13
|
+
* `zmap localsize` is the size of the neighboring area used to calculate the best similarity of the projected and original staining. If it's too small, it can influenced by local noise while too large values doesn't account for tissue high curvature (where the Z of the tissue varies rapidly).
|
|
14
|
+
|
|
15
|
+
## Individual cell correction
|
|
16
|
+
When the global z positions are correct, you can then edit each individual Z position. For this:
|
|
17
|
+
* <kdb>Right-click</kbd> on the cell to edit. The value of its label will be put into `cell label` parameter
|
|
18
|
+
* Go to the correct Z slice
|
|
19
|
+
* <kbd>Control+left-click</kbd> to place the selected cell at the current Z position (visible slice). The value of the Z will be put into the `place at z` parameter and you will see the cell appaearing in the current slice.
|
|
20
|
+
|
|
21
|
+
These steps should be done in that order for the option to function correctly.
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
When all corrections are done, save the new positions by clicking `Save updated cells`.
|
|
26
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
!!! abstract "Add a grid to the viewer"
|
|
2
|
+
_To add/show/hide a grid on the viewer, press <kbd>g</kbd>. Or select `Add grid` in the main pipeline interface_
|
|
3
|
+
|
|
4
|
+
## Grid set-up
|
|
5
|
+
When creating the grid, if you press <kbd>g</kbd> or select the `Add grid` option, the parameters to setup the grid will appear in the right panel of the viewer.
|
|
6
|
+
|
|
7
|
+
You can set-up the number of lines and columns.
|
|
8
|
+
By default, the name of each cell of the grid is displayed in the center of the cell.
|
|
9
|
+
You can disable this by unselecting `display text` in the top left panel of the `FisherGrid` layer (which should be selected).
|
|
10
|
+
In that panel, you can also modify the width of the grid lines and its color.
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
## Grid display
|
|
15
|
+
Once the grid has been created, you can always switch between showing it or hiding it by pressing <kbd>g</kbd>.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
!!! abstract "Associate segmented apical cell with segmented nuclei"
|
|
2
|
+
_Choose `Associate` in the main pipeline interface to run this step._ The cell junctions and the nuclei must have been segmented/loaded before to do this step.
|
|
3
|
+
|
|
4
|
+
Once you have separately segmented the cell (their surface) and the nuclei, this step allows to pair together cell and nuclei to define the full cell. At the end of it, you will have for each segmented cell a corresponding nuclei (indicated by its label) or none if no close enough nuclei corresponded.
|
|
5
|
+
|
|
6
|
+
You have to first run an [automatic association](#computing-association) that will try to find the best pairing (nucleus, cell) combinations. Then you will get a step to [manually correct the association](#manual-correction).
|
|
7
|
+
|
|
8
|
+
## Computing association
|
|
9
|
+
|
|
10
|
+
The algorithm to do the association is the Hungarian algorithm that find an optimal pairing of nuclei and cells based on a linking cost. This cost, the distance between the nuclei and the cell is taken as the distance in 3D between the cell surface center and the nuclei center , plus the distance in the (x,y) plane between those two centers (this addition allows to penalize more for distance in XY as nuclei are more vertically below the cell surface).
|
|
11
|
+
|
|
12
|
+
The parameter `distance toassociate micron` defines a threshold distance (the distance3D+distance2D) above which a nucleus is considered to far to correspond to the cell. This allows to reduce the number of candidates nuclei and searching range to do the association, so increase its value speed-up the computation, but could loose some nuclei to associate.
|
|
13
|
+
|
|
14
|
+
Once the association have been computed, you obtain two new layers on the left panel, `CellNuclei` and `CellContours` that contained the cell labels and the updated cell nuclei label. The nuclei labels have been changed so that their labels match to each associated cell. Thus a nuclei and cell with the same value are associated. In general, the colors should match as well, but it is not always the case, so check the label value by hovering over the nuclei, and by right-clicking on the cell surface to get the cell label.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Manual correction
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
???+ tip "Shortcut/options"
|
|
23
|
+
|
|
24
|
+
- To see the value of a nuclei label, you can _put the mouse on top of it_ and you will see its label on the bottom left panel (except if vispy visualisation mode is on, disable it to get the value). Or you can _double-left click_ on it to put its value on the `nucleus` parameter in the `CellNuc association` panel.
|
|
25
|
+
- _Right-click on a cell_ to get its label and have it put to the `cell` parameter in the `CellNuc association` panel.
|
|
26
|
+
- _Click on `Associate now`_ to associate the nucleus with label `nucleus` with the cell with label `cell`. If another nucleus has already the same label of the cell to associate with, its value will be changed to the maximum label + 1. _Shortcut: press on <kbd>c</kbd> to do the association_. The selected nuclei should change its color and label value to the `cell` one.
|
|
27
|
+
|
|
28
|
+
Additional options:
|
|
29
|
+
|
|
30
|
+
- `show_cellnames` add the value of each cell label in the image.
|
|
31
|
+
- `sync cellsNuclei` synchronize the `CellNuclei` and `CellContours` layers, so that visualisation options set on one layer are also set on the second layer. This is usefull to see only one label (with the `show selected` option in the top left panel) in both layers at the same time.
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
# Outputs
|
|
36
|
+
|
|
37
|
+
When the association is finished and corrected, save the two label files to be able to reload them later. By default, the cell surface will be saved in a 2D label image called `_imagename_\_cells2D.tif` in the `results` folder,the same as for the junctions segmentation. The nuclei will be saved as a 3D label stack, containing each nuclei with its associated label in a file called `_imagename_\_nuclei.tif`.
|
|
38
|
+
The `save also3D junctions` option saves another file of the cell surface labels at their corresponding slice (z) for each cell.
|
|
39
|
+
|
|
40
|
+
Click on `save association` to save these files and you can click on `Association done` to finish this step.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
!!! abstract "Classify cells with a user defined criteria"
|
|
2
|
+
_Select `Classify cells` in the main pipeline step_ (1)
|
|
3
|
+
{ .annotate }
|
|
4
|
+
|
|
5
|
+
1. You can also launch it out of the pipeline in `Plugins>FishFeats>Classify segmented cells`
|
|
6
|
+
|
|
7
|
+
!!! warning "Cells must have been created/saved before to use this step"
|
|
8
|
+
The file named _imagename_`_cells2D.tif` should have been saved, or the `get cells` step should have been performed in the main pipeline before.
|
|
9
|
+
|
|
10
|
+
When you start this step, you get an interface with a table containing all the cells and all the features (classifications) already done.
|
|
11
|
+
You can click on one cell to see it in the image.
|
|
12
|
+
|
|
13
|
+
In the second onglet of the interface, you can add a new feature/classification to do, either by writing a new feature name to create a new one, or by selecting an already present one in the list to edit it.
|
|
14
|
+
Choose a feature name that will be reelvant for you (_eg. "PCNA", "DoubleNucleus", "SuperCell"..._).
|
|
15
|
+
The program will add "Feat\_" in front of the name of the feature to indicate that it is a feature.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Click on `Do feature` to open the interface to choose how you want to [initialize your classification](#classification-prefilling).
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Classification prefilling
|
|
24
|
+
|
|
25
|
+
When you click on `Do feature`, it will either [reload the feature](#Load-classification) if it was already present or open a parameter interface to choose how to initialize the feature.
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
In the first line, the interface shows the feature name that you have entered.
|
|
30
|
+
|
|
31
|
+
You can choose the number of possible classes for this feature (`Nb classes` parameter)(1). For example, if the feature can only be positive (=2) or negative (=1), the number of classes will be 2.
|
|
32
|
+
{.annotate}
|
|
33
|
+
|
|
34
|
+
1. _Note that you can also change it later by clicking `Add one class` in the edit interface_.
|
|
35
|
+
|
|
36
|
+
Then you can select the method to use to prefill the classification automatically (you will be able to manually edit it afterwards).
|
|
37
|
+
|
|
38
|
+
You can either have a prefilled classification with all the cells in the same class ([`Initialize all cells at 1`](#empty-prefilling)), based on a thresholding of one chanel ([`from projection+threshold`](#from-intensity-projection)), based on the position of cells on edges or not ([`Boundary cells`](#boundary-classification).
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
Click on `Create new feature` to launch the classification of your new feature. It will add a new layer, called `Feat_`_featurename_`Cells`, prefilled according to the selected method. In that layer, one color corresponds to one class so if `nb classes` is 7, you can have 7 colors.
|
|
42
|
+
|
|
43
|
+
You now have the possibility to [manually edit the classification](#manual-editing), with the `Feat_` _featurename_ parameter interface and to see the table of cells with their corresponding classification with the `Features table` interface.
|
|
44
|
+
Click on `Update/save table` button to update the displayed table in the `Feature table` onglet and save it in the `results.csv` file.
|
|
45
|
+
If you do another feature later (running again the `Edit/Add feature` interface), it will be added to this table so you can accumulate the analysis.
|
|
46
|
+
|
|
47
|
+
### Empty prefilling
|
|
48
|
+
|
|
49
|
+
The classification can be prefilled automatically if your classification is binary ("yes" or "no") and depends on the intensity in one chanel of the image.
|
|
50
|
+
|
|
51
|
+
### From intensity projection
|
|
52
|
+
Choose the method `from projection+threshold` and the corresponding chanel `proj chanel`. It will make a 2D projection of this chanel, and classify as "yes" (2) cells that have at least `threshold_areaprop`% of its pixel brighter than: `mean(intensity) * threshold_frommean`.
|
|
53
|
+
|
|
54
|
+
You can then see the table with the automatically calculated feature and manually edit the automated classfication by using specific shortcuts.
|
|
55
|
+
|
|
56
|
+

|
|
57
|
+
|
|
58
|
+
### Boundary classification
|
|
59
|
+
|
|
60
|
+
With this option, you can choose to automatically classify the cells according to if they touch the border of the image (and thus might not be complete), or are on the edge of the tissue (no neihbors in one side), or next to a big hole in the tissue.
|
|
61
|
+
By selecting `Boundary cells`, you can choose if you want to classify the cells that touch the border of the image `Image border` and/or on the edges (of tissue or holes) `Tissue boundary`.
|
|
62
|
+
The cells will be classified as 1 if they are not a border or a boundarie, 2 if they are a boundary cell and 3 if they are a border cell.
|
|
63
|
+
|
|
64
|
+

|
|
65
|
+
|
|
66
|
+
### Load classification
|
|
67
|
+
|
|
68
|
+
If you select a feature name from the proposed list on the feature name parameter and click on `Do feature`, it will automatically load the previous classification (that is saved and loaded from the file _imagename_`_results.csv`.
|
|
69
|
+
You can directly edit it.
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## Manual editing
|
|
73
|
+
|
|
74
|
+
To modify the classification of some cells, you can set the current value to assign with the `Class value` parameter. This parameter can take value from 1 to the `nb classes` parameter that you chose previously in the `Do feature` interface (the number of classes).
|
|
75
|
+
You can increase the maximum number of classes to add a new one by clicking the button `add one class` in the right-side interface.
|
|
76
|
+
|
|
77
|
+
You can change the current value of this `Class value` parameter by sliding the bar in the interface, or by **pressing <kbd>i</kbd> to increase its value or <kbd>d</kbd> to decrease it**.
|
|
78
|
+
|
|
79
|
+
Also, if you right-click on a cell, you can set it to the cell's class.
|
|
80
|
+
It will automatically set-up the `Class value` parameter to the classification of the selected cell.
|
|
81
|
+
|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
To change the class of a cell and set it to the current value of `Class value` parameter, press <kbd>Control+left click</kbd> on the cell.
|
|
85
|
+
It's color will be udpate directly after the click.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
When you click on `Update/save table`, the current classification will be saved (in the filename`_results.csv` file along with the other results) and the displayed table in the `Feature table` onglet will be updated.
|
|
89
|
+
The current step is not stopped, so don't hesitate to save regularly.
|
|
90
|
+
|
|
91
|
+
You can then click on `Feature` _featurename_ `done` to close the interface of this feature and do another feature or finish this step. It will remove the feature layer, but the results of the classification will still be present in the features table.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
If you want to export the view of the classified cells, click on `export feature image`. It will save it in a file called _imagename_`_feat_`_featurename_`.png` in the `results` folder.
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## Features table
|
|
98
|
+
|
|
99
|
+
All the results of the classified features are summarized in the `Feature table`. Each row is one segmented cell and each column the features that have been defined.
|
|
100
|
+
The table will be saved in the results folder in the results file called _imagename_`_results.csv` .
|
|
101
|
+
If the plugin is closed and open again on the same image, the features will be automatically reloaded. You can edit them by loading the corresponding feature.
|
|
102
|
+
|
|
103
|
+
If you click on `Stop and Save`, this feature table will be closed, and all opened feature layers and interfaces will be closed.
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
!!! abstract "Segment RNAs and assign them to their cell"
|
|
2
|
+
_Choose `Get RNA` in the main interface to run it_
|
|
3
|
+
|
|
4
|
+
This step will first propose you to [segment](#rna-segmentation) the RNA from one of the channels then to [assign](#rna-assignement) it to its corresponding cell.
|
|
5
|
+
The cells **must have been created before** to do this assignment step, either with the [Get cells](Get-cells.md) step, or loaded from previous file (by default the cells should be reloaded).
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## RNA segmentation
|
|
9
|
+
|
|
10
|
+
First, you have to select which channel of the images to analyze for RNA detection, by setting the `rna channel` parameter to the corresponding `originalChannel*` number.
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
Then, the segmentation of the RNA dots can be performed with [Big-fish](https://github.com/fish-quant/big-fish) (Imbert et al. 2021). To detect correctly the dots, `big-fish` needs the average size of an individual spot. As the spot resolution can be different in the z-direction, the size of the spot should be specify both in XY and in Z. Put the average spot radius in the XY plane, in nanometers in the `spotXYRadiusNm` field, and the average spot radius in Z in nanometers in the `spotZRadiusNm`.
|
|
15
|
+
|
|
16
|
+
Big-fish filters the detected spots based on their mean intensity with a threshold. If you select `automatic threshold`, big-fish will estimate and use this threshold. Else you can fix its value in the `threshold` field. Note that after you run it one time on automatic mode, the value of big fish estimated threshold will appear in the `threshold` field, so that you can vary it around this value if the results are not satisfying.
|
|
17
|
+
|
|
18
|
+
Big fish can sometimes find spots in the first and last slices when there is no real spots or signals. The option `removeSpotInExtremeZ` allows to get rid of these artefact spots. Un-select it if you have RNAs spots that you want to analyze even in the first or last slices.
|
|
19
|
+
|
|
20
|
+
When all the spots will have been detected, `fishfeats` will display them in a new Spots layer. To choose the size at which the spots will be displayed, change the `drawing spot size` parameter.
|
|
21
|
+
|
|
22
|
+
If the resulting dots do not correspond well with the RNA spots in your channels, you can run again this step and changing either the dots size parameters or the threshold value.
|
|
23
|
+
|
|
24
|
+
You also have an option to load previous segmentation if you already segmented the RNA in this channel. When you select this option, the `load file` parameter will appear and let you choose the corresponding file to load.
|
|
25
|
+
|
|
26
|
+
## RNA assignement
|
|
27
|
+
|
|
28
|
+
Assigning RNAs corresponds to attributing at each dots the same label as the cell we considered it belongs to. Several methods can be used for an automatic selection, manual assignement or correction can also be done.
|
|
29
|
+
|
|
30
|
+
## Assignement methods:
|
|
31
|
+
|
|
32
|
+
* `Projection`: assign each RNA to a cell by projection in Z. Thus, the assignement depends only on the X,Y position of the dot and on the junction segmentation. Cells with a large apical area are more likely to have more points assigned.
|
|
33
|
+
|
|
34
|
+
* `ClosestNucleus`: assign each RNA to the cell of which the nucleus is the closest to the dot in 3D. The distance is calculated from the closest point of each nuclei to the RNA spot.
|
|
35
|
+
|
|
36
|
+
* `MixProjClosest`: assign each RNA either to the closest nuclei if the RNA spot is deep in z (closer to the nuclei) or by projecting it to the apical cells if the spot is close to the surface.
|
|
37
|
+
|
|
38
|
+
* `Hull`: to update
|
|
39
|
+
|
|
40
|
+
* `FromNClosest`: assign each RNA according to its n-closests RNA from other chanels already assigned. This finds the n-closests points (n is defined by the `nb closest rnas` parameter) and assigns to the current RNA spot the more represented cell in these neighboring points.
|
|
41
|
+
You can select which reference RNA points to use for this (already assigned channels). In the `reference rna channels`, the list of already assigned RNA channels is given, and you can select as many as these channels as you want.
|
|
42
|
+
|
|
43
|
+
For example, in the image below, 2 channels (1 and 2) have already been assigned and are by default pre-selected to use for the assignment of the 3rd channel. Thus by keeping these parameters, the program will look for each point of channel 3 at the 10-closest points from the channels 1 and 2. Then it will assign to this point the cell that is the most present among these 10-closest points. If these points are in majority unassigned, the current point will also be unassigned.
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
### Additional parameters
|
|
48
|
+
|
|
49
|
+
If you select the `show advanced parameters` option, you can also choose additional parameters to control the assignment method:
|
|
50
|
+
|
|
51
|
+
* `limit distance to assign micron`: to apply a threshold of distance at which a point is still assigned to the corresponding cell/nucleus. When the calculated distance is above this threshold (in microns), the point will be unassigned.
|
|
52
|
+
* `assign when above cells`: if selected, then RNA dots that were found above the cells (so not in the cells) can still be assigned to a cell with the selected method. Otherwise, only spots that are below the apical cells surface will be assigned. If selected, you can also choose the `nb z keep above` parameter to control until how many z slices above the cells RNA points are still assigned.
|
|
53
|
+
* `filename` is the name of the file on which the RNA segmentation and assignement will be saved. It is advised to keep the default name as it is also the one that the program will look for to load it.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
Click on `apply assignement` to launch the assignement method on the segmented dots. The dots will be all white during the calculation of the assignement. When the computation will be finished, they will be colored by their assigned cell. Dots with a maroon color, labelled "1" are unassigned, i.e. no corresponding cell was found.
|
|
57
|
+
|
|
58
|
+
## RNA manual correction
|
|
59
|
+
|
|
60
|
+
To correct RNA assignement, select the point(s) to change the assignement value, put the value (label) of the cell to assign it to in the `assign points to cell` parameter field and click on `assign selected points`.
|
|
61
|
+
|
|
62
|
+

|
|
63
|
+
|
|
64
|
+
Options/shortcuts to correct the RNA assignement:
|
|
65
|
+
|
|
66
|
+
???+ tip "Shortcut/options"
|
|
67
|
+
|
|
68
|
+
_See Napari Point layer [documentation](https://napari.org/dev/howtos/layers/points.html) for more information on the point edition tools available by default in Napari (and accessible in the top left panel of the interface)_
|
|
69
|
+
|
|
70
|
+
=== "Visualization"
|
|
71
|
+
|
|
72
|
+
| | |
|
|
73
|
+
| ---------- | ------------------------------------ |
|
|
74
|
+
| <kbd>F1,F2,F3</kbd>... | Show/Hide the first, 2nd, 3th.. layer (ordered in the bottom left panel from bottom to top) |
|
|
75
|
+
| <kbd>v</kbd> | Show/Hide cell contours layer |
|
|
76
|
+
| <kbd>d</kbd> | Increase/Decrease the RNA layer opacity |
|
|
77
|
+
| <kbd>l</kbd> | Show only the currently selected cell contour (or reset to show all cells). The layer "CellContours" must be visible |
|
|
78
|
+
| <kbd>o</kbd> | Show only the selected points. Move the Display point size bar to reset it |
|
|
79
|
+
|
|
80
|
+
=== "Point (RNA) editing"
|
|
81
|
+
|
|
82
|
+
| | |
|
|
83
|
+
| ---------- | ------------------------------------ |
|
|
84
|
+
|:material-mouse-right-click-outline:|Get the label of the cell under the click and set the current assignment value ot it|
|
|
85
|
+
| <kbd>u</kbd> | Select all unassigned points |
|
|
86
|
+
| <kbd>s</kbd> | Select all points with current assignment value |
|
|
87
|
+
| <kbd>a</kbd> | Select all visible points |
|
|
88
|
+
| <kbd>c</kbd> | Assign current assignment value to all selected points |
|
|
89
|
+
|<kbd>Ctrl</kbd>+:material-mouse-left-click-outline: | To select points by drawing a rectangle around them while keeping the mouse clicked. Other points can be added to the current selection by doing the same elsewhere |
|
|
90
|
+
|<kbd>Ctrl</kbd>+:material-mouse-right-click-outline: | Unselect the points |
|
|
91
|
+
|<kbd>Alt</kbd>+:material-mouse-left-click-outline: | Zoom on the clicked position |
|
|
92
|
+
|<kbd>Alt</kbd>+:material-mouse-right-click-outline: | Unzoom |
|
|
93
|
+
| <kbd>Shift+s</kbd> | Shuffle the colors of the cells and points |
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
The program locks the layers so that it is not possible to remove them by accident. It will print an error message if this happens. The lock will be released when clicking on `RNA* done`.
|
|
97
|
+
|
|
98
|
+

|
|
99
|
+
|
|
100
|
+
### Point display
|
|
101
|
+
|
|
102
|
+
To further help the manual correction of the spots, `FishFeats` proposes option to change the point size display.
|
|
103
|
+
|
|
104
|
+
Check the `Point display` box to expand its content in the `Edit RNA` interface on the right side of the window.
|
|
105
|
+
|
|
106
|
+
You can directly change all point displayed size by sliding the `Display point size` parameter bar, but you can also display some points at the current size, and hide other points by displaying them very small.
|
|
107
|
+
For this select the criteria to display a spot as big or very small, in the `Point size from:` parameter, and select the desired option.
|
|
108
|
+
The point can be displayed differently according to the intensity inside the point (`point intensity`) or from their assignement score (`assignemnt score`) which refers to the certainty of their assignement.
|
|
109
|
+
|
|
110
|
+
Click on `Reset point display` to display again all the spots with the same size, controlled by the `Display point size` parameter.
|
|
111
|
+
|
|
112
|
+

|
|
113
|
+
|
|
114
|
+
## Save/load RNAs
|
|
115
|
+
|
|
116
|
+
When you click on `save and quit RNA*`, it will save the current point layer in a `.csv` file saved in the `results` folder called _imagename_`_RNA*.csv` (here * is the number of the corresponding channel).
|
|
117
|
+
The file contains the position of each spot and its assignement.
|
|
118
|
+
The counts of the RNA of this channel in each cell will be added to the _results_ file in a new column.
|
|
119
|
+
The edition interface of the current RNA will be closed so that you can go to the next RNA.
|
|
120
|
+
|
|
121
|
+
To reload/continue the assignement later on, you can load this file in the segmenting RNA step by choosing `load file` in the segmentation method choice parameter.
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
When you click on `save RNAs`, it will automatically save all the RNA channel that have been done and udpate the results saved as well.
|
|
125
|
+
You can click this button at any time during the manual correction process, without stopping it.
|
|
126
|
+
We recommend to do it regularly in case something happens during the correction steps.
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## Draw RNA counts
|
|
130
|
+
|
|
131
|
+
This option, at the bottom of the `Edit RNA*` interface, allows to visualize the cells, colored by their number of RNA assigned to it.
|
|
132
|
+
|
|
133
|
+
Click on `Draw RNA* counts` to add a new (2D) layer containing the cells number of RNAs.
|
|
134
|
+
In each cell the intensity reflects the number of RNA assigned.
|
|
135
|
+
|
|
136
|
+

|
|
137
|
+
|
|
138
|
+
You can also save this image as a 2D file by clicking `Save drawn RNA* counts`.
|
|
139
|
+
|
|
140
|
+
This counts can also be found in the _results_ file, in the corresponding `nbRNA_C*_MethodName` column.
|
|
141
|
+
MethodName will be the name of the method used for the initial assigment.
|
|
142
|
+
The results file can thus contains the counts from several assignement methods, but note that when you reload it, it will load only the last used method.
|
|
143
|
+
|
|
144
|
+
## Finish RNAs analysis
|
|
145
|
+
|
|
146
|
+
When you have analyzed all the RNA channels in your image, you can quit this step by clicking on `RNAs done` in the right panel. This will close all the open RNA channels and parameters interface and get you back to the main pipeline step.
|