small-fish-gui 2.1.0__py3-none-any.whl → 2.1.2__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.
- small_fish_gui/__init__.py +1 -1
- small_fish_gui/batch/prompt.py +1 -1
- small_fish_gui/gui/_napari_widgets.py +18 -6
- small_fish_gui/gui/layout.py +5 -3
- small_fish_gui/gui/napari_visualiser.py +39 -16
- small_fish_gui/pipeline/_colocalisation.py +9 -2
- small_fish_gui/pipeline/actions.py +54 -40
- small_fish_gui/pipeline/detection.py +1 -1
- small_fish_gui/pipeline/segmentation.py +1 -1
- small_fish_gui/pipeline/spots.py +6 -6
- {small_fish_gui-2.1.0.dist-info → small_fish_gui-2.1.2.dist-info}/METADATA +9 -1
- {small_fish_gui-2.1.0.dist-info → small_fish_gui-2.1.2.dist-info}/RECORD +14 -14
- {small_fish_gui-2.1.0.dist-info → small_fish_gui-2.1.2.dist-info}/WHEEL +0 -0
- {small_fish_gui-2.1.0.dist-info → small_fish_gui-2.1.2.dist-info}/licenses/LICENSE +0 -0
small_fish_gui/__init__.py
CHANGED
|
@@ -37,7 +37,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
37
37
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
38
38
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
39
39
|
"""
|
|
40
|
-
__version__ = "2.1.
|
|
40
|
+
__version__ = "2.1.2"
|
|
41
41
|
__wiki__ = "https://github.com/2Echoes/small_fish_gui/wiki"
|
|
42
42
|
|
|
43
43
|
import os, platform
|
small_fish_gui/batch/prompt.py
CHANGED
|
@@ -104,7 +104,7 @@ def batch_promp(
|
|
|
104
104
|
preset["reordered_shape"] = None
|
|
105
105
|
preset.setdefault("filename", "")
|
|
106
106
|
#Segmentation tab
|
|
107
|
-
preset.setdefault("other_nucleus_image",
|
|
107
|
+
preset.setdefault("other_nucleus_image", "")
|
|
108
108
|
preset.setdefault("cytoplasm_channel", default.detection_channel)
|
|
109
109
|
preset.setdefault("cytoplasm_segmentation_3D", default.do_3D_segmentation)
|
|
110
110
|
preset.setdefault("nucleus_segmentation_3D", default.do_3D_segmentation)
|
|
@@ -256,6 +256,7 @@ class ClusterMerger(ClusterWidget) :
|
|
|
256
256
|
|
|
257
257
|
#Dropping selected clusters
|
|
258
258
|
self.cluster_layer.data = np.delete(self.cluster_layer.data, selected_clusters, axis=0)
|
|
259
|
+
self.cluster_layer.features = self.cluster_layer.features.drop(selected_clusters, axis=0)
|
|
259
260
|
|
|
260
261
|
#Updating spots
|
|
261
262
|
belonging_spots = self.single_layer.features.loc[self.single_layer.features['cluster_id'].isin(selected_cluster_ids)].index
|
|
@@ -813,6 +814,7 @@ class DenseRegionDeconvolver(NapariWidget) :
|
|
|
813
814
|
self.spot_radius = spot_radius
|
|
814
815
|
self.kernel_size = kernel_size
|
|
815
816
|
self.voxel_size = voxel_size
|
|
817
|
+
self.dim = len(voxel_size)
|
|
816
818
|
self.update_dense_regions()
|
|
817
819
|
super().__init__()
|
|
818
820
|
|
|
@@ -830,13 +832,23 @@ class DenseRegionDeconvolver(NapariWidget) :
|
|
|
830
832
|
for label, region in enumerate(dense_regions) :
|
|
831
833
|
reg_im = region.image
|
|
832
834
|
coordinates = np.argwhere(reg_im)
|
|
833
|
-
z,y,x = coordinates.T
|
|
834
|
-
min_z,min_y,min_x,*_ = region.bbox
|
|
835
|
-
z += min_z
|
|
836
|
-
y += min_y
|
|
837
|
-
x += min_x
|
|
838
835
|
|
|
839
|
-
|
|
836
|
+
if self.dim == 2 :
|
|
837
|
+
y,x = coordinates.T
|
|
838
|
+
min_y,min_x,*_ = region.bbox
|
|
839
|
+
y += min_y
|
|
840
|
+
x += min_x
|
|
841
|
+
|
|
842
|
+
mask[y,x] = label + 1
|
|
843
|
+
|
|
844
|
+
else :
|
|
845
|
+
z,y,x = coordinates.T
|
|
846
|
+
min_z,min_y,min_x,*_ = region.bbox
|
|
847
|
+
z += min_z
|
|
848
|
+
y += min_y
|
|
849
|
+
x += min_x
|
|
850
|
+
|
|
851
|
+
mask[z,y,x] = label + 1
|
|
840
852
|
|
|
841
853
|
self.dense_regions = mask
|
|
842
854
|
|
small_fish_gui/gui/layout.py
CHANGED
|
@@ -119,6 +119,8 @@ def path_layout(keys= [],look_for_dir = False, header=None, preset=settings.work
|
|
|
119
119
|
check_parameter(keys= list, header = (str, type(None)))
|
|
120
120
|
for key in keys : check_parameter(key = str)
|
|
121
121
|
|
|
122
|
+
initial_folder = preset if preset != "" else settings.working_directory
|
|
123
|
+
|
|
122
124
|
if look_for_dir : Browse = sg.FolderBrowse
|
|
123
125
|
else : Browse = sg.FileBrowse
|
|
124
126
|
|
|
@@ -428,11 +430,12 @@ def _detection_layout(
|
|
|
428
430
|
|
|
429
431
|
if (do_segmentation and is_multichannel) or (is_multichannel and segmentation_done):
|
|
430
432
|
layout += [[sg.Text("nucleus channel signal "), sg.InputText(default_text=default_dict.setdefault('nucleus_channel',default.nucleus_channel), key= "nucleus channel signal", size= 5, tooltip= "Channel from which signal will be measured for nucleus features, \nallowing you to measure signal from a different channel than the one used for segmentation.")]]
|
|
433
|
+
layout += bool_layout(['Interactive threshold selector'],keys = ['show_interactive_threshold_selector'], preset=[default.interactive_threshold_selector])
|
|
431
434
|
|
|
432
435
|
#Deconvolution
|
|
433
436
|
if do_dense_region_deconvolution :
|
|
434
437
|
default_dense_regions_deconvolution = [default_dict.setdefault('alpha',default.alpha), default_dict.setdefault('beta',default.beta)]
|
|
435
|
-
layout += parameters_layout(['alpha', 'beta',], default_values= default_dense_regions_deconvolution, header= '
|
|
438
|
+
layout += parameters_layout(['alpha', 'beta',], default_values= default_dense_regions_deconvolution, header= 'Dense regions deconvolution')
|
|
436
439
|
layout += parameters_layout(['gamma'], unit= 'px', default_values= [default_dict.setdefault('gamma',default.gamma)])
|
|
437
440
|
layout += tuple_layout(opt= {"deconvolution_kernel" : True}, unit= {"deconvolution_kernel" : 'px'}, default_dict=default_dict, deconvolution_kernel = tuple_shape)
|
|
438
441
|
|
|
@@ -441,12 +444,11 @@ def _detection_layout(
|
|
|
441
444
|
layout += parameters_layout(['Cluster radius'],keys=['cluster_size'], unit="radius(nm)", default_values=[default_dict.setdefault('cluster_size',default.cluster_size)])
|
|
442
445
|
layout += parameters_layout(['Min nb spots per cluster'],keys=['min_number_of_spots'], default_values=[default_dict.setdefault('min_number_of_spots', default.min_spot)])
|
|
443
446
|
|
|
444
|
-
layout += bool_layout(['Interactive threshold selector'],keys = ['show_interactive_threshold_selector'], preset=[default.interactive_threshold_selector])
|
|
445
447
|
layout += path_layout(
|
|
446
448
|
keys=['spots_extraction_folder'],
|
|
447
449
|
look_for_dir=True,
|
|
448
450
|
header= "Individual spot extraction",
|
|
449
|
-
preset= default_dict.setdefault('spots_extraction_folder',
|
|
451
|
+
preset= default_dict.setdefault('spots_extraction_folder', "")
|
|
450
452
|
)
|
|
451
453
|
default_filename = default_dict.setdefault("filename","") + "_spot_extraction"
|
|
452
454
|
layout += parameters_layout(
|
|
@@ -39,22 +39,24 @@ def correct_spots(
|
|
|
39
39
|
dim = len(voxel_size)
|
|
40
40
|
|
|
41
41
|
if dim == 3 and type(cell_label) != type(None) :
|
|
42
|
-
cell_label
|
|
43
|
-
cell_label
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
if cell_label.ndim == 2 :
|
|
43
|
+
cell_label = np.repeat(
|
|
44
|
+
cell_label[np.newaxis],
|
|
45
|
+
repeats= len(image),
|
|
46
|
+
axis=0
|
|
47
|
+
)
|
|
47
48
|
if dim == 3 and type(nucleus_label) != type(None) :
|
|
48
|
-
nucleus_label
|
|
49
|
-
nucleus_label
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
if nucleus_label.ndim == 2 :
|
|
50
|
+
nucleus_label = np.repeat(
|
|
51
|
+
nucleus_label[np.newaxis],
|
|
52
|
+
repeats= len(image),
|
|
53
|
+
axis=0
|
|
54
|
+
)
|
|
53
55
|
|
|
54
56
|
scale = compute_anisotropy_coef(voxel_size)
|
|
55
57
|
Viewer = napari.Viewer(ndisplay=2, title= 'Spot correction', axis_labels=['z','y','x'], show= False)
|
|
56
|
-
Viewer.add_image(image, scale=scale, name= "rna signal", blending= 'additive', colormap='
|
|
57
|
-
other_colors = ['
|
|
58
|
+
Viewer.add_image(image, scale=scale, name= "rna signal", blending= 'additive', colormap='green', contrast_limits=[image.min(), image.max()])
|
|
59
|
+
other_colors = ['red', 'blue', 'gray', 'cyan', 'bop orange', 'bop purple'] * ((len(other_images)-1 // 7) + 1)
|
|
58
60
|
for im, color in zip(other_images, other_colors) :
|
|
59
61
|
Viewer.add_image(im, scale=scale, blending='additive', visible=False, colormap=color, contrast_limits=[im.min(), im.max()])
|
|
60
62
|
|
|
@@ -93,11 +95,13 @@ def correct_spots(
|
|
|
93
95
|
"cluster_id" : clusters[:,dim+1],
|
|
94
96
|
"end" : [True] * len(clusters_coordinates)
|
|
95
97
|
},
|
|
96
|
-
feature_defaults= {"spot_number" :
|
|
98
|
+
feature_defaults= {"spot_number" : min_spot_number, "cluster_id" : -2, "end" : True} # napari features default will not work with np.nan passing -2 instead.
|
|
97
99
|
)
|
|
98
100
|
|
|
99
|
-
if type(cell_label) != type(None) and not np.array_equal(nucleus_label, cell_label) :
|
|
100
|
-
|
|
101
|
+
if type(cell_label) != type(None) and not np.array_equal(nucleus_label, cell_label) :
|
|
102
|
+
cell_label_layer = Viewer.add_labels(cell_label, scale=scale, opacity= 0.2, blending= 'additive')
|
|
103
|
+
if type(nucleus_label) != type(None) :
|
|
104
|
+
nucleus_label_layer = Viewer.add_labels(nucleus_label, scale=scale, opacity= 0.2, blending= 'additive')
|
|
101
105
|
|
|
102
106
|
#Adding widget
|
|
103
107
|
if type(clusters) != type(None) :
|
|
@@ -153,7 +157,26 @@ def correct_spots(
|
|
|
153
157
|
new_cluster_radius = None
|
|
154
158
|
new_min_spot_number = None
|
|
155
159
|
|
|
156
|
-
|
|
160
|
+
#Preparing updated segmentation masks
|
|
161
|
+
if type(cell_label) != type(None) and not np.array_equal(nucleus_label, cell_label) :
|
|
162
|
+
new_cell_label = cell_label_layer.data
|
|
163
|
+
else :
|
|
164
|
+
new_cell_label = cell_label
|
|
165
|
+
if type(nucleus_label) != type(None) :
|
|
166
|
+
new_nucleus_label = nucleus_label_layer.data
|
|
167
|
+
else :
|
|
168
|
+
new_nucleus_label = nucleus_label
|
|
169
|
+
|
|
170
|
+
if dim == 3 and type(cell_label) != type(None) :
|
|
171
|
+
if cell_label.ndim == 2 :
|
|
172
|
+
new_cell_label = new_cell_label.max(axis=0)
|
|
173
|
+
if dim == 3 and type(nucleus_label) != type(None) :
|
|
174
|
+
if nucleus_label.ndim == 2 :
|
|
175
|
+
new_nucleus_label = new_nucleus_label.max(axis=0)
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
return new_spots, new_clusters, new_cluster_radius, new_min_spot_number, new_nucleus_label, new_cell_label
|
|
157
180
|
|
|
158
181
|
|
|
159
182
|
# Segmentation
|
|
@@ -137,7 +137,11 @@ def spots_colocalisation(
|
|
|
137
137
|
voxel_size : (z,y,x) tuple
|
|
138
138
|
"""
|
|
139
139
|
|
|
140
|
+
#No cluster or no spots case
|
|
141
|
+
if spot_list1 is np.nan or spot_list2 is np.nan : return np.nan
|
|
140
142
|
if len(spot_list1) == 0 or len(spot_list2) == 0 : return np.nan
|
|
143
|
+
|
|
144
|
+
#Dim check
|
|
141
145
|
if len(spot_list1[0]) != len(spot_list2[0]) :
|
|
142
146
|
raise MissMatchError("dimensionalities of spots 1 and spots 2 don't match.")
|
|
143
147
|
|
|
@@ -170,7 +174,10 @@ def initiate_colocalisation(
|
|
|
170
174
|
) :
|
|
171
175
|
|
|
172
176
|
result_tables = result_tables.set_index('acquisition_id', drop=False)
|
|
173
|
-
|
|
177
|
+
if len(result_tables) != 0 :
|
|
178
|
+
available_spots = dict(zip(result_tables['acquisition_id'].astype(str).str.cat(result_tables['name'],sep='-'), result_tables.index))
|
|
179
|
+
else :
|
|
180
|
+
available_spots = {}
|
|
174
181
|
default_values = dict(get_settings())
|
|
175
182
|
|
|
176
183
|
while True :
|
|
@@ -228,7 +235,7 @@ def _global_coloc(acquisition_id1,acquisition_id2, result_dataframe, colocalisat
|
|
|
228
235
|
assert len(acquisition1) == 1
|
|
229
236
|
assert len(acquisition2) == 1
|
|
230
237
|
|
|
231
|
-
acquisition_couple = (acquisition_id1,acquisition_id2)
|
|
238
|
+
acquisition_couple = (int(acquisition_id1),int(acquisition_id2))
|
|
232
239
|
|
|
233
240
|
voxel_size1 = acquisition1.iloc[0].at['voxel_size']
|
|
234
241
|
voxel_size2 = acquisition2.iloc[0].at['voxel_size']
|
|
@@ -30,6 +30,7 @@ from ..hints import pipeline_parameters
|
|
|
30
30
|
from ..__init__ import __wiki__
|
|
31
31
|
|
|
32
32
|
import os
|
|
33
|
+
import traceback
|
|
33
34
|
import pandas as pd
|
|
34
35
|
import FreeSimpleGUI as sg
|
|
35
36
|
import numpy as np
|
|
@@ -302,61 +303,74 @@ def compute_colocalisation(
|
|
|
302
303
|
return global_coloc_df, cell_coloc_df, max_id
|
|
303
304
|
|
|
304
305
|
if os.path.isfile(spots1_key) :
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
max_id=max_id,
|
|
309
|
-
filename= os.path.basename(spots1_key),
|
|
310
|
-
voxel_size = voxel_size
|
|
311
|
-
)
|
|
312
|
-
result_dataframe = pd.concat([
|
|
313
|
-
result_dataframe,
|
|
314
|
-
fake_acquisition
|
|
315
|
-
], axis=0)
|
|
316
|
-
|
|
317
|
-
if not Spots1['cell_label'].isna().all() :
|
|
318
|
-
fake_cells = reconstruct_cell_data(
|
|
306
|
+
try :
|
|
307
|
+
Spots1 = load_spots(spots1_key)
|
|
308
|
+
fake_acquisition = reconstruct_acquisition_data(
|
|
319
309
|
Spots=Spots1,
|
|
320
310
|
max_id=max_id,
|
|
311
|
+
filename= os.path.basename(spots1_key),
|
|
312
|
+
voxel_size = voxel_size
|
|
321
313
|
)
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
fake_cells
|
|
314
|
+
result_dataframe = pd.concat([
|
|
315
|
+
result_dataframe,
|
|
316
|
+
fake_acquisition
|
|
326
317
|
], axis=0)
|
|
327
318
|
|
|
328
|
-
|
|
329
|
-
|
|
319
|
+
if not Spots1['cell_label'].isna().all() :
|
|
320
|
+
fake_cells = reconstruct_cell_data(
|
|
321
|
+
Spots=Spots1,
|
|
322
|
+
max_id=max_id,
|
|
323
|
+
filename= os.path.basename(spots1_key)
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
cell_result_dataframe = pd.concat([
|
|
327
|
+
cell_result_dataframe,
|
|
328
|
+
fake_cells
|
|
329
|
+
], axis=0)
|
|
330
|
+
|
|
331
|
+
max_id +=1
|
|
332
|
+
acquisition_id1 = fake_acquisition.iloc[0].at['acquisition_id']
|
|
333
|
+
except ValueError as e :
|
|
334
|
+
sg.popup("Could not reconstruct coordinates from selected file (Spots 1)")
|
|
335
|
+
traceback.print_exception(e)
|
|
336
|
+
return global_coloc_df, cell_coloc_df, max_id
|
|
337
|
+
|
|
330
338
|
|
|
331
339
|
else :
|
|
332
340
|
acquisition_id1 = spots1_key
|
|
333
341
|
|
|
334
342
|
if os.path.isfile(spots2_key) :
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
max_id=max_id,
|
|
339
|
-
filename= os.path.basename(spots2_key),
|
|
340
|
-
voxel_size = voxel_size
|
|
341
|
-
)
|
|
342
|
-
result_dataframe = pd.concat([
|
|
343
|
-
result_dataframe,
|
|
344
|
-
fake_acquisition
|
|
345
|
-
], axis=0)
|
|
346
|
-
|
|
347
|
-
if not Spots2['cell_label'].isna().all() :
|
|
348
|
-
fake_cells = reconstruct_cell_data(
|
|
343
|
+
try :
|
|
344
|
+
Spots2 = load_spots(spots2_key)
|
|
345
|
+
fake_acquisition = reconstruct_acquisition_data(
|
|
349
346
|
Spots=Spots2,
|
|
350
347
|
max_id=max_id,
|
|
348
|
+
voxel_size = voxel_size,
|
|
349
|
+
filename= os.path.basename(spots2_key),
|
|
351
350
|
)
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
fake_cells
|
|
351
|
+
result_dataframe = pd.concat([
|
|
352
|
+
result_dataframe,
|
|
353
|
+
fake_acquisition
|
|
356
354
|
], axis=0)
|
|
357
355
|
|
|
358
|
-
|
|
359
|
-
|
|
356
|
+
if not Spots2['cell_label'].isna().all() :
|
|
357
|
+
fake_cells = reconstruct_cell_data(
|
|
358
|
+
Spots=Spots2,
|
|
359
|
+
max_id=max_id,
|
|
360
|
+
filename= os.path.basename(spots2_key)
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
cell_result_dataframe = pd.concat([
|
|
364
|
+
cell_result_dataframe,
|
|
365
|
+
fake_cells
|
|
366
|
+
], axis=0)
|
|
367
|
+
|
|
368
|
+
max_id +=1
|
|
369
|
+
acquisition_id2 = fake_acquisition.iloc[0].at['acquisition_id']
|
|
370
|
+
except ValueError as e :
|
|
371
|
+
sg.popup("Could not reconstruct coordinates from selected file (Spots 2)")
|
|
372
|
+
traceback.print_exception(e)
|
|
373
|
+
return global_coloc_df, cell_coloc_df, max_id
|
|
360
374
|
|
|
361
375
|
else :
|
|
362
376
|
acquisition_id2 = spots2_key
|
|
@@ -660,7 +660,7 @@ def launch_detection(
|
|
|
660
660
|
|
|
661
661
|
if user_parameters['show_napari_corrector'] :
|
|
662
662
|
|
|
663
|
-
spots, clusters, new_cluster_radius, new_min_spot_number = correct_spots(
|
|
663
|
+
spots, clusters, new_cluster_radius, new_min_spot_number, nucleus_label, cell_label = correct_spots(
|
|
664
664
|
image,
|
|
665
665
|
spots,
|
|
666
666
|
user_parameters['voxel_size'],
|
|
@@ -68,7 +68,7 @@ def launch_segmentation(user_parameters: pipeline_parameters, nucleus_label, cyt
|
|
|
68
68
|
#Ask user for parameters
|
|
69
69
|
#if incorrect parameters --> set relaunch to True
|
|
70
70
|
while True :
|
|
71
|
-
segmentation_parameters.setdefault("other_nucleus_image",
|
|
71
|
+
segmentation_parameters.setdefault("other_nucleus_image", "")
|
|
72
72
|
segmentation_parameters.setdefault("cytoplasm_channel", segmentation_parameters["detection_channel"])
|
|
73
73
|
segmentation_parameters.setdefault("cytoplasm_segmentation_3D", segmentation_parameters["do_3D_segmentation"])
|
|
74
74
|
segmentation_parameters.setdefault("nucleus_segmentation_3D", segmentation_parameters["do_3D_segmentation"])
|
small_fish_gui/pipeline/spots.py
CHANGED
|
@@ -50,8 +50,7 @@ def compute_Spots(
|
|
|
50
50
|
if type(cluster_id) == type(None) : #When user doesn't select cluster
|
|
51
51
|
cluster_id = [np.nan]*len(spots)
|
|
52
52
|
|
|
53
|
-
index =
|
|
54
|
-
index = tuple(index)
|
|
53
|
+
index = tuple(spots.T.tolist())
|
|
55
54
|
spot_intensities_list = list(image[index])
|
|
56
55
|
if type(nucleus_label) != type(None) :
|
|
57
56
|
if nucleus_label.ndim == 2 :
|
|
@@ -127,7 +126,7 @@ def reconstruct_acquisition_data(
|
|
|
127
126
|
* shape : tuple[int]
|
|
128
127
|
* filename : str
|
|
129
128
|
"""
|
|
130
|
-
|
|
129
|
+
max_id = int(max_id)
|
|
131
130
|
spots = reconstruct_spots(Spots['coordinates'])
|
|
132
131
|
has_clusters = not Spots['cluster_id'].isna().all()
|
|
133
132
|
spot_number = len(spots)
|
|
@@ -139,7 +138,7 @@ def reconstruct_acquisition_data(
|
|
|
139
138
|
|
|
140
139
|
new_acquisition = pd.DataFrame({
|
|
141
140
|
'acquisition_id' : [max_id + 1],
|
|
142
|
-
'name' : ["
|
|
141
|
+
'name' : ["(loaded_spots)_{}".format(filename.split('.', maxsplit=1)[0])],
|
|
143
142
|
'threshold' : [0],
|
|
144
143
|
'spots' : [spots],
|
|
145
144
|
'clusters' : [clusters],
|
|
@@ -151,7 +150,7 @@ def reconstruct_acquisition_data(
|
|
|
151
150
|
else :
|
|
152
151
|
new_acquisition = pd.DataFrame({
|
|
153
152
|
'acquisition_id' : [max_id + 1],
|
|
154
|
-
'name' : ["
|
|
153
|
+
'name' : ["(loaded_spots)_{}".format(filename.split('.', maxsplit=1)[0])],
|
|
155
154
|
'threshold' : [0],
|
|
156
155
|
'spots' : [spots],
|
|
157
156
|
'spot_number' : [spot_number],
|
|
@@ -175,6 +174,7 @@ def reconstruct_spots(
|
|
|
175
174
|
def reconstruct_cell_data(
|
|
176
175
|
Spots : pd.DataFrame,
|
|
177
176
|
max_id : int,
|
|
177
|
+
filename : str,
|
|
178
178
|
) :
|
|
179
179
|
|
|
180
180
|
has_cluster = not Spots['cluster_id'].isna().all()
|
|
@@ -199,7 +199,7 @@ def reconstruct_cell_data(
|
|
|
199
199
|
cell['clustered_spot_number'] = cell['clustered_spots_coords'].apply(len)
|
|
200
200
|
|
|
201
201
|
cell['acquisition_id'] = max_id + 1
|
|
202
|
-
cell['name'] = "
|
|
202
|
+
cell['name'] = "(loaded_spots)_{}".format(filename.split('.', maxsplit=1)[0])
|
|
203
203
|
cell = cell.rename(columns={"cell_label": "cell_id"})
|
|
204
204
|
|
|
205
205
|
return cell
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: small_fish_gui
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.2
|
|
4
4
|
Summary: Small Fish is a python application for the analysis of smFish images. It provides a ready to use graphical interface to combine famous python packages for cell analysis without any need for coding.
|
|
5
5
|
Project-URL: Homepage, https://github.com/SmallFishGUI/small_fish_gui
|
|
6
6
|
Project-URL: Wiki, https://github.com/SmallFishGUI/small_fish_gui/wiki
|
|
@@ -128,3 +128,11 @@ python -m small_fish_gui
|
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
You are all set! Try it yourself or check the [get started](https://github.com/2Echoes/small_fish_gui/wiki/Get-started) section in the wiki.
|
|
131
|
+
|
|
132
|
+
## Developement
|
|
133
|
+
Bugs to fix :
|
|
134
|
+
* Use of load button during co-localization quantification yields diffrent results than when testing from memory :
|
|
135
|
+
--> Shown results are correct and consistent with results from memory
|
|
136
|
+
--> But background (i.e cell_id = 0) is treated as a cell instead of being filtered
|
|
137
|
+
--> But cells on edges are NOT removed from quantification (they are if test is performed from memory)
|
|
138
|
+
--> But Cluster related metrics are not computed when test is performed from save
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
small_fish_gui/__init__.py,sha256=
|
|
1
|
+
small_fish_gui/__init__.py,sha256=Ue6wty6U37_1rZ9SUrxmxA9r9ydjn0uACU-SqWHt6CE,2163
|
|
2
2
|
small_fish_gui/__main__.py,sha256=xwpFMDuo0kkYvPamyhlTHJ68bymDfbRpPzKy3SKwezY,1639
|
|
3
3
|
small_fish_gui/hints.py,sha256=NEKqCbjXF3guHnc1dzq_LYYGlTxIV6z6wtdwVlmgHos,3349
|
|
4
4
|
small_fish_gui/main_menu.py,sha256=z0ZlidWNGHLYYnBx2Z1i2IX_EGQr-HtIlsOQl-yTw4o,6273
|
|
@@ -8,15 +8,15 @@ small_fish_gui/batch/input.py,sha256=mqnP8LBhyNbtlcqjVlUiVeuHw4YxOX3GgzJbq03isKE
|
|
|
8
8
|
small_fish_gui/batch/integrity.py,sha256=3m3faYeIM6-l5-6butv0sc56dKTz56GNiID0bps_mL8,5085
|
|
9
9
|
small_fish_gui/batch/output.py,sha256=cKZBsO48HaKfxfa6cwcBKw3YRILBCcdC8rpYd2OTEVs,520
|
|
10
10
|
small_fish_gui/batch/pipeline.py,sha256=oVylDQ3v88Wz1BuGoVBTchPGBkVFKRhMMXclSYkr6kY,14462
|
|
11
|
-
small_fish_gui/batch/prompt.py,sha256=
|
|
11
|
+
small_fish_gui/batch/prompt.py,sha256=_WZB-O3oYp8rRdEuf3r8o-ML0EWQn6UTuJVaW2OgpT8,21978
|
|
12
12
|
small_fish_gui/batch/test.py,sha256=FcoCngSeueociwVoG8V3C6lQO7rrRHUfIVA2hJKr4v4,213
|
|
13
13
|
small_fish_gui/batch/update.py,sha256=Gv1805-xUtrJ3BK0HdflBSnSFAEB5RmnAPk6peAR9CA,6169
|
|
14
14
|
small_fish_gui/batch/utils.py,sha256=apHxp72OdjTSUyj4ZwN75NYc12Am4m7N9Sw03TrjLMk,1870
|
|
15
15
|
small_fish_gui/gui/__init__.py,sha256=idpRSg2FFawF0ydfc7Y8ep6gQ4_jhroL_jZURlRE_BM,920
|
|
16
|
-
small_fish_gui/gui/_napari_widgets.py,sha256=
|
|
16
|
+
small_fish_gui/gui/_napari_widgets.py,sha256=9gfikNMLZmeWY9tosD19aGmw4Ulf-BMo8erehJ4KU1k,35321
|
|
17
17
|
small_fish_gui/gui/animation.py,sha256=MnYsA1kxQZ72L_H0knxOs41lG0ZZv1re7gSgYNmZY00,983
|
|
18
|
-
small_fish_gui/gui/layout.py,sha256=
|
|
19
|
-
small_fish_gui/gui/napari_visualiser.py,sha256=
|
|
18
|
+
small_fish_gui/gui/layout.py,sha256=72RZI4Vt5WwZH9cx8SfOCWsZox0udG3Ck3YE_c-aiQ4,30927
|
|
19
|
+
small_fish_gui/gui/napari_visualiser.py,sha256=HsHEp2B7lWKFGLQaGI99u3IPaWzsfG1MHJsx_1t0rf0,14844
|
|
20
20
|
small_fish_gui/gui/prompts.py,sha256=vWLLJZ7jdYIbjT71qHGiE1o9-pTrc607shnKW6EZi8I,18361
|
|
21
21
|
small_fish_gui/gui/testing.ipynb,sha256=2E51kT3BcXvOvOSdmYIy4Cxbe-4HtnOjzPTZQHDZJJw,69148
|
|
22
22
|
small_fish_gui/gui/theme.py,sha256=30nujS48ZRdD1HVbzdEBkiAWlhow1AGgXSQNZcGEsaQ,118
|
|
@@ -31,16 +31,16 @@ small_fish_gui/interface/testing.py,sha256=AUdqmFJ6kBvFTOLRfZZJBBe3nm1key2bGpUDX
|
|
|
31
31
|
small_fish_gui/interface/user_settings.py,sha256=vMpj-s9tzMKQy1CdJ3SO-6yAknU-ZIMT0RZQs8WAGPY,2620
|
|
32
32
|
small_fish_gui/pipeline/__init__.py,sha256=Oww6dcuvnktl5jFKLriz8ZXObKo9MkneE739A8C1reY,739
|
|
33
33
|
small_fish_gui/pipeline/_bigfish_wrapers.py,sha256=WcIu5HLc4bUuU8qmsINP5snXef3Tx9zJDNKES-SiftA,9776
|
|
34
|
-
small_fish_gui/pipeline/_colocalisation.py,sha256=
|
|
34
|
+
small_fish_gui/pipeline/_colocalisation.py,sha256=n7ULhlaKH2M2mKPgnn9On0NOdG-mqPCGuOgYgo13vA0,21922
|
|
35
35
|
small_fish_gui/pipeline/_custom_errors.py,sha256=tQ-AUhgzIFpK30AZiQQrtHCHyGVRDdAoIjzL0Fk-1pA,43
|
|
36
36
|
small_fish_gui/pipeline/_preprocess.py,sha256=zfwhNoAUkVv1TYlyffNQkSTitMXTDokADabBeHuB58U,15766
|
|
37
|
-
small_fish_gui/pipeline/actions.py,sha256=
|
|
38
|
-
small_fish_gui/pipeline/detection.py,sha256=
|
|
39
|
-
small_fish_gui/pipeline/segmentation.py,sha256=
|
|
40
|
-
small_fish_gui/pipeline/spots.py,sha256=
|
|
37
|
+
small_fish_gui/pipeline/actions.py,sha256=dtRCf_UKg-Y9uV1jCBeASeuR7-pZ8dHVEYHs7MW-0pg,21263
|
|
38
|
+
small_fish_gui/pipeline/detection.py,sha256=IE0Wf9NaHcxkCv1cjrOdyfnQUzv8SlXilIT7KI8INP4,35988
|
|
39
|
+
small_fish_gui/pipeline/segmentation.py,sha256=m9XW8XiWCSpGFdi6It6RkeDYTiKtNhfj30kUSBG8pNo,32023
|
|
40
|
+
small_fish_gui/pipeline/spots.py,sha256=rL4BLH0BtPQiinpQHqJ3ooq6_DDS_oa4UBdKQTl_-ok,6841
|
|
41
41
|
small_fish_gui/pipeline/test.py,sha256=w4ZMGDmUDXxVgWTlZ2TKw19W8q5gcE9gLMKe0SWnRrw,2827
|
|
42
42
|
small_fish_gui/pipeline/utils.py,sha256=dYV7WAJ375xM5RdaljjxeKvBC1niQvBl1E55SeIiIYo,563
|
|
43
|
-
small_fish_gui-2.1.
|
|
44
|
-
small_fish_gui-2.1.
|
|
45
|
-
small_fish_gui-2.1.
|
|
46
|
-
small_fish_gui-2.1.
|
|
43
|
+
small_fish_gui-2.1.2.dist-info/METADATA,sha256=g5pFqOzoXqyNLC9Bgk2wWfjWTvjtDaM0HK-2zDKOS6s,6553
|
|
44
|
+
small_fish_gui-2.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
45
|
+
small_fish_gui-2.1.2.dist-info/licenses/LICENSE,sha256=-iFy8VGBYs5VsHglKpk4D-hxqQ2jMJaqmfq_ulIzDks,1303
|
|
46
|
+
small_fish_gui-2.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|