small-fish-gui 1.0.4__py3-none-any.whl → 1.1.0__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/README.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # Small Fish
2
2
  **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.
3
3
 
4
- Cell segmentation is peformed using *cellpose* (published work) : https://github.com/MouseLand/cellpose
4
+ Cell segmentation (**2D**) is peformed using *cellpose* (published work) : https://github.com/MouseLand/cellpose; compatible with your own cellpose models.
5
5
 
6
6
  Spot detection is performed via *big-fish* (published work) : https://github.com/fish-quant/big-fish
7
7
 
8
8
  Time stacks are not yet supported.
9
9
 
10
+ ## What can you do with small fish ?
11
+
12
+ - Single molecule quantification (including a lot of spatial features)
13
+ - Foci/Transcription site quantification
14
+ - Nuclear signal quantification
15
+ - Signal to noise analysis
16
+ - multichannel colocalisation
17
+
10
18
  ## Installation
11
19
 
12
20
  It is higly recommanded to create a specific [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) or [virtual](https://docs.python.org/3.6/library/venv.html) environnement to install small fish.
@@ -227,7 +227,7 @@ def _mapping_help() :
227
227
  This window present the shape of your image : example (1080,1080,4)
228
228
  1080x1080 are the xy dimension (pixel resolution); and 4 is the number of channel. Another example a 3D multichannel
229
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! /!\
230
+ The machine understand the order of the information such as (1080,1080,4) positions are (0,1,2). It starts from zero!
231
231
  The mapping purpose is to link the position to the type of informations, in this case we want :
232
232
 
233
233
  x : 1
@@ -374,6 +374,38 @@ def launch_post_detection(image, spots, image_input_values: dict,) :
374
374
 
375
375
  return spots, fov_res
376
376
 
377
+ def _compute_cell_snr(image: np.ndarray, bbox, spots, voxel_size, spot_size) :
378
+
379
+ min_y, min_x, max_y, max_x = bbox
380
+ image= image[min_y: max_y, min_x: max_x]
381
+
382
+ if len(spots) == 0 :
383
+ res = {
384
+ 'snr_mean' : np.NaN,
385
+ 'snr_median' : np.NaN,
386
+ 'snr_std' : np.NaN,
387
+ }
388
+
389
+ return res
390
+
391
+ if len(spots[0]) == 3 :
392
+ Z,Y,X = zip(*spots)
393
+ spots = np.array(
394
+ list(zip(Y,X)),
395
+ dtype= int
396
+ )
397
+ voxel_size = voxel_size[1:]
398
+ spot_size = spot_size[1:]
399
+
400
+ snr_dict = compute_snr_spots(
401
+ image= image,
402
+ spots= spots,
403
+ spot_radius= spot_size,
404
+ voxel_size=voxel_size
405
+ )
406
+
407
+ return snr_dict
408
+
377
409
  @add_default_loading
378
410
  def launch_cell_extraction(acquisition_id, spots, clusters, image, nucleus_signal, cell_label, nucleus_label, user_parameters) :
379
411
 
@@ -414,6 +446,7 @@ def launch_cell_extraction(acquisition_id, spots, clusters, image, nucleus_signa
414
446
 
415
447
  #Nucleus features : area is computed in bigfish
416
448
  features_names += ['nucleus_mean_signal', 'nucleus_median_signal', 'nucleus_max_signal', 'nucleus_min_signal']
449
+ features_names += ['snr_mean', 'snr_median', 'snr_std']
417
450
 
418
451
  result_frame = pd.DataFrame()
419
452
 
@@ -450,8 +483,22 @@ def launch_cell_extraction(acquisition_id, spots, clusters, image, nucleus_signa
450
483
  compute_topography=True
451
484
  )
452
485
 
486
+ #Signal to noise
487
+ snr_dict = _compute_cell_snr(
488
+ image,
489
+ cell_bbox,
490
+ spots=rna_coords,
491
+ voxel_size=voxel_size,
492
+ spot_size=user_parameters['spot_size']
493
+ )
494
+
495
+ snr_mean = snr_dict['snr_mean']
496
+ snr_median = snr_dict['snr_median']
497
+ snr_std = snr_dict['snr_std']
498
+
453
499
  features = list(features)
454
500
  features += [np.mean(nuc_signal), np.median(nuc_signal), np.max(nuc_signal), np.min(nuc_signal)]
501
+ features += [snr_mean, snr_median, snr_std]
455
502
 
456
503
  features = [acquisition_id, cell_id, cell_bbox] + features
457
504
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: small_fish_gui
3
- Version: 1.0.4
3
+ Version: 1.1.0
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/2Echoes/small_fish
6
6
  Project-URL: Issues, https://github.com/2Echoes/small_fish/issues
@@ -1,5 +1,5 @@
1
1
  small_fish_gui/LICENSE,sha256=-iFy8VGBYs5VsHglKpk4D-hxqQ2jMJaqmfq_ulIzDks,1303
2
- small_fish_gui/README.md,sha256=ZTYZCvrjrC0380pYFrB_9IN-lDGIbwz4A174Spb0jyU,1320
2
+ small_fish_gui/README.md,sha256=Q8_AtxcruV2TUA6ODjfccatoTAP8AZkmP7G1MWY8f5U,1612
3
3
  small_fish_gui/__init__.py,sha256=aAh4brM-eTSnFOWpYSFgMIqJzbjJX45RHIWi7ppl_nA,1941
4
4
  small_fish_gui/__main__.py,sha256=sQ_HejagRTOcVpMuwUnLSO4MTZwqZ8uEplLHgqVpa6o,464
5
5
  small_fish_gui/requirements.txt,sha256=9OMfUAnLdHevq6w_fVoDmVmkSMJeFofkOK_86_fu9C0,321
@@ -9,7 +9,7 @@ small_fish_gui/.github/workflows/python-publish.yml,sha256=5Ltnuhw9TevhzndlBmdUg
9
9
  small_fish_gui/gui/__init__.py,sha256=178HC3t2z4EnP0iBnMcaP_pyh5xHwOkEE6p3WJwBQeU,911
10
10
  small_fish_gui/gui/animation.py,sha256=6_Y15_NzJ_TYBYseu3sSKaVkYRp2UCsVClAWOk3dESY,714
11
11
  small_fish_gui/gui/general_help_screenshot.png,sha256=X4E6Td5f04K-pBUPDaBJRAE3D5b8fuEdiAUKhkIDr-0,54210
12
- small_fish_gui/gui/help_module.py,sha256=pVSpGwhkI3bNr1EgBjnd-SukPTx6wcuFnAyyVNMZmWo,9608
12
+ small_fish_gui/gui/help_module.py,sha256=PmgkkDs7bZ2-po83A_PK9uldQcHjehYmqre21nYb6DQ,9600
13
13
  small_fish_gui/gui/layout.py,sha256=E_Z87S1YUR1gx2447OM0156dKXbzMA_q9joCO4hsZd8,7644
14
14
  small_fish_gui/gui/mapping_help_screenshot.png,sha256=HcuRh5TYciUogUasza5vZ_QSshaiHsskQK23mh9vQS8,34735
15
15
  small_fish_gui/gui/prompts.py,sha256=mlw9NT5k3I8kTMB7w6W6QETbSIav_A7RhCmMVD7NFV0,12279
@@ -27,10 +27,10 @@ small_fish_gui/pipeline/_preprocess.py,sha256=AlB86KuCA0UKA0XbTgXTJbg92Az34hzba_
27
27
  small_fish_gui/pipeline/_segmentation.py,sha256=IaeqsjwIweKH9LEm6qbDqssGW7R0MRZSh7PtF4etIEI,12772
28
28
  small_fish_gui/pipeline/_signaltonoise.py,sha256=7A9t7xu7zghI6cr201Ldm-LjJ5NOuP56VSeJ8KIzcUo,8497
29
29
  small_fish_gui/pipeline/actions.py,sha256=n6lr_LqV4PT5uw6KfovehUuUK-yTJ66G-IhY2uhHF_k,5472
30
- small_fish_gui/pipeline/detection.py,sha256=l4G2UHJmrzIg_alAge2GY0h5D34N_oqWzfgjfe2SI04,26032
30
+ small_fish_gui/pipeline/detection.py,sha256=e8EpXZD8zt8daA3dou4RvKNFZEYZS7bKGAOqfd4fJmw,27250
31
31
  small_fish_gui/pipeline/main.py,sha256=4_Qk-NRhjOEsgN7T35NXOHj4OdDmZGS5kVeKde-yCiI,2593
32
32
  small_fish_gui/pipeline/test.py,sha256=w4ZMGDmUDXxVgWTlZ2TKw19W8q5gcE9gLMKe0SWnRrw,2827
33
- small_fish_gui-1.0.4.dist-info/METADATA,sha256=Ts0ZLtdXghljsj3JiBpsQcDsCtwUu76gvZhY91kd5pA,2567
34
- small_fish_gui-1.0.4.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
35
- small_fish_gui-1.0.4.dist-info/licenses/LICENSE,sha256=-iFy8VGBYs5VsHglKpk4D-hxqQ2jMJaqmfq_ulIzDks,1303
36
- small_fish_gui-1.0.4.dist-info/RECORD,,
33
+ small_fish_gui-1.1.0.dist-info/METADATA,sha256=VuIyufjeCNpPSx9d4gmoxz7VEcRtgP11rbPOf9v_SUc,2567
34
+ small_fish_gui-1.1.0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
35
+ small_fish_gui-1.1.0.dist-info/licenses/LICENSE,sha256=-iFy8VGBYs5VsHglKpk4D-hxqQ2jMJaqmfq_ulIzDks,1303
36
+ small_fish_gui-1.1.0.dist-info/RECORD,,