small-fish-gui 1.9.4__py3-none-any.whl → 1.10.1__py3-none-any.whl

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.
@@ -1,256 +0,0 @@
1
- import FreeSimpleGUI as sg
2
- import os
3
-
4
-
5
- def _fake_help() :
6
- layout = [
7
- [sg.Text("Fake help window")],
8
- [sg.Button('Close')]
9
- ]
10
-
11
- return layout
12
-
13
- def ask_help(chapter= '') :
14
-
15
- if chapter == 'general' :
16
- help_l = _general_help()
17
-
18
- elif chapter == 'segmentation' :
19
- help_l= _segmentation_help()
20
-
21
- elif chapter == 'mapping' :
22
- help_l = _mapping_help()
23
-
24
- elif chapter == 'detection' :
25
- help_l = _detection_help()
26
-
27
- else :
28
- help_l = _fake_help()
29
-
30
- window = sg.Window('Help (small fish)', layout=help_l, keep_on_top=True, auto_size_text=True)
31
- event, values = window.read(timeout= 0.1)
32
-
33
- if event == 'Close' :
34
- window.close()
35
-
36
- def add_help_button(help_request) :
37
- pass
38
-
39
- def _general_help() :
40
-
41
- im_path = os.path.dirname(__file__) + '/general_help_screenshot.png'
42
-
43
- help_text = """
44
- Pipeline settings :
45
-
46
- do_dense_regions_deconvolution : (Recommanded for cluster computations) Detect dense and bright regions with potential clustered
47
- spots and simulate a more realistic number of spots in these regions.
48
- See bigfish documentation : https://big-fish.readthedocs.io/en/stable/detection/dense.html
49
-
50
- do_cluster_computation :
51
- DBScan algorithm is ran by big-fish to detecte clusters of spots. Use is you want to quantify one of the following :
52
- Transcription sites, foci, colocalisation of spots near foci...
53
-
54
- Segmentation : Perform full cell segmentation in 2D (cytoplasm + nucleus) via cellpose.
55
- You can use your own retrained models or out of the box models from cellpose.
56
-
57
- Napari correct :
58
- After each detection, opens a Napari viewer, enabling the user to visualise, add or remove spots and clusters.
59
- """
60
-
61
- layout = [
62
- [sg.Text("Welcome to small fish", font= 'bold 15')],
63
- [sg.Image(im_path)],
64
- [sg.Text(help_text, font = 'bold 10')]
65
- ]
66
-
67
- return layout
68
-
69
- def _detection_help() :
70
-
71
- header = """
72
- Detection is the main feature we use from big-fish package (usage requires quote).
73
- Access fully detailed documentation :
74
-
75
- DETECTION : https://big-fish.readthedocs.io/en/stable/detection/spots.html
76
- do_dense_regions_deconvolution : https://big-fish.readthedocs.io/en/stable/detection/dense.html
77
- CLUSTERING : https://big-fish.readthedocs.io/en/stable/detection/cluster.html
78
-
79
- """
80
- detection_header= """
81
-
82
- DETECTION PARAMETERS
83
- """
84
- detection_text = """
85
- threshold
86
- Leave empty for automatic threshold computation (see doc). Or set a manual threshold to apply after LoG filter.
87
-
88
- threshold penalty
89
- Custom feature. Apply a multiplicator to automatic threshold.
90
- Leave empty or 1 for no modification of auto threshold.
91
- From 0<.<1 values will lower the threshold, increasing the number of spot detected.
92
- On the contrary >1 values will increase the threshold, reducing the number of spot detected.
93
-
94
- voxel_size
95
- Size of a voxel, in nanometer. One value per spatial dimension (zyx or yx dimensions).
96
- If it’s a scalar, the same value is applied to every dimensions. Not used if ‘log_kernel_size’ and ‘minimum_distance’ are provided.
97
-
98
- spot_size
99
- Radius of the spot, in nanometer. One value per spatial dimension (zyx or yx dimensions).
100
- If it’s a scalar, the same radius is applied to every dimensions.
101
- Not used if ‘log_kernel_size’ and ‘minimum_distance’ are provided.
102
-
103
- log kernel size
104
- Size of the LoG kernel. It equals the standard deviation (in pixels) used for the gaussian kernel
105
- (one for each dimension). One value per spatial dimension (zyx or yx dimensions). If it’s a scalar,
106
- the same standard deviation is applied to every dimensions.
107
- If None, we estimate it with the voxel size and spot radius.
108
-
109
- minimum distance
110
- Minimum distance (in pixels) between two spots we want to be able to detect separately.
111
- One value per spatial dimension (zyx or yx dimensions).
112
- If it’s a scalar, the same distance is applied to every dimensions.
113
- If None, we estimate it with the voxel size and spot radius.
114
-
115
- """
116
- deconv_header="""
117
- do_dense_regions_deconvolution PARAMETERS
118
-
119
- """
120
- deconv_text="""
121
- alpha
122
- Note : Simply put the higher alpha the less spots are added in bright regions.
123
-
124
- Intensity percentile used to compute the reference spot, between 0 and 1.
125
- The higher, the brighter are the spots simulated in the dense regions.
126
- Consequently, a high intensity score reduces the number of spots added.
127
- Default is 0.5, meaning the reference spot considered is the median spot.
128
-
129
- beta
130
- Note : Simply put the higher beta the brighter regions need to be to be deconvoluted.
131
-
132
- Multiplicative factor for the intensity threshold of a dense region. Default is 1.
133
- Threshold is computed with the formula:
134
-
135
- threshold = beta * max(median_spot)
136
-
137
- with median_spot the median value of all detected spot signals.
138
-
139
- gamma
140
- Note : for gamma = 0 no gaussian filter is performed.
141
-
142
- Multiplicative factor use to compute the gaussian kernel size:
143
-
144
- kernel_size = gamma * spot_size / voxel_size
145
-
146
- We perform a large gaussian filter with such scale to estimate image background and remove it from original image.
147
- A large gamma increases the scale of the gaussian filter and smooth the estimated background.
148
- To decompose very large bright areas, a larger gamma should be set.
149
-
150
- kernel_size
151
- Standard deviation used for the gaussian kernel (one for each dimension), in pixel.
152
- If it’s a scalar, the same standard deviation is applied to every dimensions.
153
- If None, we estimate the kernel size from ‘spot_radius’, ‘voxel_size’ and ‘gamma’
154
-
155
-
156
- """
157
- clustering_header="""
158
- CLUSTERING PARAMETERS
159
-
160
- """
161
- clustering_text="""
162
- cluster size
163
- The maximum distance between two samples for one to be considered as in the neighborhood of the other.
164
- Radius expressed in nanometer.
165
-
166
- NOTE : Cluster centroids are computed from bigfish DBScan algorithm.
167
- But the number of spots belonging to those clusters is computed as the number of sptos closer than the cluster_size distance (nanometer).
168
- Which can yield a slightly different result than bigfish but allow us to add and delete cluster with the napari correction option.
169
-
170
- min number of spots
171
- The number of spots in a neighborhood for a point to be considered as a core point (from which a cluster is expanded).
172
- This includes the point itself.
173
-
174
- """
175
-
176
- quote = """
177
- BigFish quote :
178
- Arthur Imbert, Wei Ouyang, Adham Safieddine, Emeline Coleno, Christophe Zimmer, Edouard Bertrand, Thomas Walter, Florian Mueller.
179
- FISH-quant v2: a scalable and modular analysis tool for smFISH image analysis. bioRxiv (2021)
180
- https://doi.org/10.1101/2021.07.20.45302
181
-
182
- """
183
-
184
- layout = [
185
- [sg.Text(header, font= "bold 15")],
186
- [sg.Column([
187
- [sg.Text(detection_header, font= 'bold 13')],
188
- [sg.Text(detection_text)],
189
- [sg.Text(deconv_header, font= 'bold 13')],
190
- [sg.Text(deconv_text)],
191
- [sg.Text(clustering_header, font= 'bold 13')],
192
- [sg.Text(clustering_text)],
193
- ], scrollable=True, vertical_scroll_only=True)],
194
- [sg.Text(quote, font= 'italic 8')]
195
- ]
196
-
197
- return layout
198
-
199
- def _segmentation_help() :
200
-
201
- cellpose1_quote = """Stringer, C., Wang, T., Michaelos, M., & Pachitariu, M. (2021).
202
- Cellpose: a generalist algorithm for cellular segmentation. Nature methods, 18(1), 100-106."""
203
- cellpose2_quote = """Pachitariu, M. & Stringer, C. (2022).
204
- Cellpose 2.0: how to train your own model. Nature methods, 1-8."""
205
- im_path = os.path.dirname(__file__) + '/segmentation_help_screenshot.png'
206
-
207
- layout =[
208
- [sg.Text("Segmentation is performed using Cellpose 2.0; this is published work that requires citation.\n")],
209
- [sg.Text(cellpose1_quote)],
210
- [sg.Text(cellpose2_quote)],
211
- [sg.Image(im_path)]
212
- ]
213
-
214
- return layout
215
-
216
-
217
- def _mapping_help() :
218
-
219
- im_path = os.path.dirname(__file__) + '/mapping_help_screenshot.png'
220
-
221
-
222
- help_text = """
223
- Depending on image format, dimensions (time, channels, spatial dimensions) are not always stored in the same order.
224
- An automatic configuration is performed; nonetheless it is recommanded to check it worked properly or your data can
225
- get mixed up.
226
-
227
- This window present the shape of your image : example (1080,1080,4)
228
- 1080x1080 are the xy dimension (pixel resolution); and 4 is the number of channel. Another example a 3D multichannel
229
- stack could be (18,4,1080,1080)...
230
- The machine understand the order of the information such as (1080,1080,4) positions are (0,1,2). It starts from zero!
231
- The mapping purpose is to link the position to the type of informations, in this case we want :
232
-
233
- x : 1
234
- y : 0
235
- z : None
236
- c : 2
237
- t : None
238
-
239
- The other example from above (18,4,1080,1080) mapping would be :
240
-
241
- x : 3
242
- y : 2
243
- z : 0
244
- c : 1
245
- t : None
246
- """
247
-
248
- layout = [
249
- [sg.Text(help_text)],
250
- [sg.Image(im_path)]
251
- ]
252
-
253
- return layout
254
-
255
- def _small_fish_help() :
256
- pass
Binary file
@@ -1,51 +0,0 @@
1
- small_fish_gui/LICENSE,sha256=-iFy8VGBYs5VsHglKpk4D-hxqQ2jMJaqmfq_ulIzDks,1303
2
- small_fish_gui/README.md,sha256=rhcqAWtQWPEmheUzChY_ok-ytAkZlboNQHdx19LRutw,4643
3
- small_fish_gui/Segmentation example.jpg,sha256=opfiSbjmfF6z8kBs08sg_FNR2Om0AcMPU5sSwSLHdoQ,215038
4
- small_fish_gui/__init__.py,sha256=WGaTzQTK6LJ7mTFtO3En_DlnGCBHIf8HLnam2jRXKjk,1940
5
- small_fish_gui/__main__.py,sha256=ngHNZr9ui8FTE9FPUJ9ULFGMs-5Wenpbcq__wAwFOAI,2128
6
- small_fish_gui/hints.py,sha256=_AhC-Th36ELxinjMyGtjIqJfZkISPr1YwhQ9ifD9Kj4,1926
7
- small_fish_gui/napari_detection_example.png,sha256=l5EZlrbXemLiGqb5inSVsD6Kko1Opz528-go-fBfrw8,977350
8
- small_fish_gui/requirements.txt,sha256=z8iaxqarErZuMpmRKqcW07nfb_tQAOOkQ4LQSA9ovCk,322
9
- small_fish_gui/utils.py,sha256=LM6QW2ono_LIRv7JXIIq7ZxxbDXqBtZ5uR9gjKJfwM8,1903
10
- small_fish_gui/.github/workflows/python-publish.yml,sha256=5Ltnuhw9TevhzndlBmdUgYMnS73xEAxSyd1u8DHdn5s,1084
11
- small_fish_gui/batch/__init__.py,sha256=ku2_Yate-UG89Q0BmE2B9kFV4kOz-u9Lf2lj6VsdFXs,127
12
- small_fish_gui/batch/input.py,sha256=mqnP8LBhyNbtlcqjVlUiVeuHw4YxOX3GgzJbq03isKE,1477
13
- small_fish_gui/batch/integrity.py,sha256=qyttOwsukds6eE2j6NRmA8-fQtHxlnP4tgwQqrs3EWs,4853
14
- small_fish_gui/batch/pipeline.py,sha256=-XSyGTrk7WYhgLZLZeUoJvyzfcoprJTofUuIz623Irw,10419
15
- small_fish_gui/batch/prompt.py,sha256=OOwCn8TvAFIIm3fjhOfMwZkvXHk8fDgxefN_FO3p-5s,18851
16
- small_fish_gui/batch/test.py,sha256=FcoCngSeueociwVoG8V3C6lQO7rrRHUfIVA2hJKr4v4,213
17
- small_fish_gui/batch/update.py,sha256=uVenjjJBHZ3MeW5b20HzlSBueu3QZWEGLIEHRnPm-Tg,5044
18
- small_fish_gui/batch/utils.py,sha256=Pnmzlen8gmLBYBthMiUiK0TErjBBSId9SjKeBd9U6-U,1784
19
- small_fish_gui/batch/values.txt,sha256=eS19O1pdj0HYfwGUlWIpkvfNZQFxA3F4BDR8qahXh28,999
20
- small_fish_gui/gui/__init__.py,sha256=-t93Mz9AkpZsTH3XdYGj5-CXJNbWJ62k40QTWgpAGQA,913
21
- small_fish_gui/gui/_napari_widgets.py,sha256=8IMppaPZU37ANdZwTZOhwqCEly0hokzYL7UIVIixGns,3022
22
- small_fish_gui/gui/animation.py,sha256=MnYsA1kxQZ72L_H0knxOs41lG0ZZv1re7gSgYNmZY00,983
23
- small_fish_gui/gui/help_module.py,sha256=_6ZTiCym1uYJTlKekPSmGCXQVr6z7TRaxEhRAL90Eko,9614
24
- small_fish_gui/gui/layout.py,sha256=ew5d3Mlr0DnC3j3uCWBzykEHJ8faa4wmKHZbiNOjdJY,14188
25
- small_fish_gui/gui/napari_visualiser.py,sha256=AmpUErfko1ZamYoORRsgR4JT9xRzQKpi-sFok-FFKtg,14569
26
- small_fish_gui/gui/prompts.py,sha256=Kqqhb3DJujHE3NNWMZKMTBQ7h1B79GicvdnaG4i3HG4,16301
27
- small_fish_gui/gui/testing.ipynb,sha256=5xoMDR2a3aa4q8KoEoJ22HrcWDyHkCF4arVeVVm7ovs,71500
28
- small_fish_gui/gui/screenshot/general_help_screenshot.png,sha256=X4E6Td5f04K-pBUPDaBJRAE3D5b8fuEdiAUKhkIDr-0,54210
29
- small_fish_gui/gui/screenshot/mapping_help_screenshot.png,sha256=HcuRh5TYciUogUasza5vZ_QSshaiHsskQK23mh9vQS8,34735
30
- small_fish_gui/gui/screenshot/segmentation_help_screenshot.png,sha256=rbSgIydT0gZtfMh1qk4mdMbEIyCaakvHmxa2eOrLwO0,118944
31
- small_fish_gui/interface/__init__.py,sha256=_yCOvJjrMGVeGx9Lkyqp7t3fAztt67w2ZKLPj8_kfYc,277
32
- small_fish_gui/interface/image.py,sha256=VBSfIVcR50aJxxbD_ILflPX4esW9lXPArfHpVQynzCc,1100
33
- small_fish_gui/interface/inoutput.py,sha256=FXKSSRrVou5VBWvTbiBjSCr7DncIyZbcV5MfRa6J64g,5467
34
- small_fish_gui/interface/testing.py,sha256=5GHjGn3YVJxfXGolMeg4SSCTBgPGl5R5bxQrpmsZ1yg,399
35
- small_fish_gui/pipeline/__init__.py,sha256=Oww6dcuvnktl5jFKLriz8ZXObKo9MkneE739A8C1reY,739
36
- small_fish_gui/pipeline/_colocalisation.py,sha256=PJ9IkICwPiaTNRTX4xqPhf1J3wyE2yAFRPtYEbw2k-A,21298
37
- small_fish_gui/pipeline/_custom_errors.py,sha256=tQ-AUhgzIFpK30AZiQQrtHCHyGVRDdAoIjzL0Fk-1pA,43
38
- small_fish_gui/pipeline/_preprocess.py,sha256=f8TSoieM8PXgEVemnOa1zW8LrfXdE9ZZ61kXcM4HOrk,15091
39
- small_fish_gui/pipeline/_signaltonoise.py,sha256=7A9t7xu7zghI6cr201Ldm-LjJ5NOuP56VSeJ8KIzcUo,8497
40
- small_fish_gui/pipeline/actions.py,sha256=YLuRoVwG0bdQ3LvwQDrObQZaHzsOMlntrayfxY13OCw,15941
41
- small_fish_gui/pipeline/detection.py,sha256=Pe_1e8FKqvVyhuDOPdb2LmDKpuvS7Vg1IXWX83HqTz4,35556
42
- small_fish_gui/pipeline/main.py,sha256=X8xyTXxNIgK25LO7X29BpIglR5zwEHh8fpyaROLD7HE,5260
43
- small_fish_gui/pipeline/segmentation.py,sha256=8oZVs6EF0cE89OfauR_sxpzf9uxtqjAuzi5FxkbOS7Q,19913
44
- small_fish_gui/pipeline/spots.py,sha256=9hNOGnOZhrtrIORt8UGBcI-SGCh1XftcUGerkBwN-QY,2201
45
- small_fish_gui/pipeline/test.py,sha256=w4ZMGDmUDXxVgWTlZ2TKw19W8q5gcE9gLMKe0SWnRrw,2827
46
- small_fish_gui/pipeline/testing.ipynb,sha256=Rs7VQ7TImNyUzT2_59JgbOjR5_Qs-0NjHHnqS87eiwA,76481
47
- small_fish_gui/pipeline/utils.py,sha256=run6qtqCAe_mFnE3o1CnmF1xBBmK3ydgc8-jOV9P-_w,448
48
- small_fish_gui-1.9.4.dist-info/METADATA,sha256=Bgc5DOz2cWZrBxt8V9ePZ2d40tTDmDwhDcYp9yHGKgk,2634
49
- small_fish_gui-1.9.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
50
- small_fish_gui-1.9.4.dist-info/licenses/LICENSE,sha256=-iFy8VGBYs5VsHglKpk4D-hxqQ2jMJaqmfq_ulIzDks,1303
51
- small_fish_gui-1.9.4.dist-info/RECORD,,