Skip to content

Commit 2b608e7

Browse files
authored
Merge branch 'rnanuclei' into main
2 parents 18ccf41 + 4a2628b commit 2b608e7

7 files changed

Lines changed: 357 additions & 102 deletions

File tree

docs/Get-RNAs.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
!!! abstract "Segment RNAs and assign them to their cell"
1+
!!! abstract "Segment RNAs and assign them to their cell/nucleus"
22
_Choose <span style="background-color:#0b8300">RNA:segment&assign</span> in the main interface to run it_
33

44
!!! example "See the typical workflow of this step [here](./FishFeatsFlowchartv5.pdf#page=4)"
55

6-
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.
7-
The cells **must have been created before** to do this assignment step, either with the [Cells segmentation](Get-cells.md) step, or loaded from previous file (by default the cells should be reloaded).
6+
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/nucleus.
7+
The cells or the nuclei **must have been created before** to do this assignment step, either with the [Cells segmentation](Get-cells.md) step, or loaded from previous file (by default the cells should be reloaded), or with the [Nuclei segmentation](Get-nuclei.md) step.
88

99
Since version 1.1.23, there is also an option to [measure the intensity](#measure-intensity) of a given layer/channel in the segmented spots (e.g. to measure if the segmented spots are inside nuclei, or correlates with some immuno-staining).
1010

11+
Since version 1.4.0, RNA dots can be assigned to a nuclei and not onyl to a cell: if there is no cell/junction staining to determine the cell limits but only nuclear staining, it can be used as the reference instead.
12+
Less assignment methods will be available as they don't make sense in the case where there is no apical cell.
1113

1214
## RNA segmentation
1315

@@ -37,13 +39,18 @@ You also have an option to load a previous segmentation if you already segmented
3739

3840
Assigning RNAs corresponds to attributing to each dot the same label as the cell we consider that it belongs to. Several methods can be used for an automatic selection, and manual assignment or correction can also be done.
3941

42+
Since version 1.4.0, if there is no cellular staining but only nuclear staining, RNAs can be associated to their most likely nucleus in that case.
43+
4044
## Assignment methods:
4145

4246
* `Projection`: assign each RNA to a cell by projection in Z. Thus, the assignment depends only on the X,Y position of the dot and on the junction segmentation.
47+
This option is only proposed if there is a cellular staining.
4348

4449
* `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.
50+
This option is only proposed if there is a nuclear staining.
4551

4652
* `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.
53+
This option is only proposed if there is a cellular and nuclear staining.
4754

4855
* `Hull`: to update
4956

@@ -67,7 +74,7 @@ Click on `apply assignment` to launch the assignment method on the segmented dot
6774

6875
## RNA manual correction
6976

70-
To correct RNA assignment, select the point(s) to change the assignment 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`.
77+
To correct RNA assignment, select the point(s) to change the assignment value, put the value (label) of the cell/nucleus to assign it to in the `assign points to cell` parameter field and click on `assign selected points`.
7178

7279
![assigning](imgs/assigning.png)
7380

@@ -84,14 +91,14 @@ Options/shortcuts to correct the RNA assignment:
8491
| <kbd>F1,F2,F3</kbd>... | Show/Hide the first, 2nd, 3th.. layer (ordered in the bottom left panel from bottom to top) |
8592
| <kbd>v</kbd> | Show/Hide cell contours layer |
8693
| <kbd>d</kbd> | Increase/Decrease the RNA layer opacity |
87-
| <kbd>l</kbd> | Show only the currently selected cell contour (or reset to show all cells). The layer "CellContours" must be visible |
94+
| <kbd>l</kbd> | Show only the currently selected cell/nucleus contour (or reset to show all cells). The layer "CellContours" must be visible |
8895
| <kbd>o</kbd> | Show only the selected points. Move the Display point size bar to reset it |
8996

9097
=== "Point (RNA) editing"
9198

9299
| | |
93100
| ---------- | ------------------------------------ |
94-
|:material-mouse-right-click-outline:|Get the label of the cell under the click and set the current assignment value ot it|
101+
|:material-mouse-right-click-outline:|Get the label of the cell/nucleus under the click and set the current assignment value ot it|
95102
| <kbd>u</kbd> | Select all unassigned points |
96103
| <kbd>s</kbd> | Select all points with current assignment value |
97104
| <kbd>a</kbd> | Select all visible points |
@@ -125,7 +132,7 @@ Click on `Reset point display` to display all the spots with the same size again
125132

126133
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).
127134
The file contains the position of each spot and its assignment.
128-
The counts of the RNA of this channel in each cell will be added to the _results_ file in a new column.
135+
The counts of the RNA of this channel in each cell/nucleus will be added to the _results_ file in a new column.
129136
The editing interface of the current RNA will be closed so that you can go to the next RNA.
130137

131138
To reload/continue the assignment later on, you can load this file in the segmenting RNA step by choosing `load file` in the segmentation method choice parameter.
@@ -138,14 +145,14 @@ You can click this button at any time during the manual correction process, with
138145

139146
## Draw RNA counts
140147

141-
This option, at the bottom of the  `Edit RNA*` interface, allows the cells to be visualized, colored by their number of assigned RNAs.
148+
This option, at the bottom of the  `Edit RNA*` interface, allows the cells/nuclei to be visualized, colored by their number of assigned RNAs.
142149

143-
Click on `Draw RNA* counts` to add a new (2D) layer containing the cells ans their number of RNAs.
144-
In each cell the intensity reflects the number of RNA assigned.
150+
Click on `Draw RNA* counts` to add a new (2D/3D) layer containing the cells ans their number of RNAs.
151+
In each cell/nucleus the intensity reflects the number of RNA assigned.
145152

146153
![rna counts](./imgs/rna_counts.png)
147154

148-
You can also save this image as a 2D file by clicking `Save drawn RNA* counts`.
155+
You can also save this image as a 2D/3D file by clicking `Save drawn RNA* counts`.
149156

150157
The RNA counts can also be found in the _results_ file, in the corresponding `nbRNA_C*_MethodName` column.
151158
MethodName will be the name of the method used for the initial assigment.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "fishfeats"
7-
version = "1.3.18"
7+
version = "1.4.0"
88
description = "Napari plugin for RNA-Fish+cells analysis pipeline"
99
license.file = "LICENSE"
1010
readme = "README.md"

0 commit comments

Comments
 (0)