small-fish-gui 2.1.2__py3-none-any.whl → 2.1.3__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/gui/napari_visualiser.py +4 -1
- small_fish_gui/pipeline/_colocalisation.py +4 -1
- small_fish_gui/pipeline/spots.py +11 -13
- {small_fish_gui-2.1.2.dist-info → small_fish_gui-2.1.3.dist-info}/METADATA +1 -1
- {small_fish_gui-2.1.2.dist-info → small_fish_gui-2.1.3.dist-info}/RECORD +8 -8
- {small_fish_gui-2.1.2.dist-info → small_fish_gui-2.1.3.dist-info}/WHEEL +0 -0
- {small_fish_gui-2.1.2.dist-info → small_fish_gui-2.1.3.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.3"
|
|
41
41
|
__wiki__ = "https://github.com/2Echoes/small_fish_gui/wiki"
|
|
42
42
|
|
|
43
43
|
import os, platform
|
|
@@ -309,7 +309,10 @@ def interactive_detection(
|
|
|
309
309
|
if dense_region_deconvolution : updated_parameters.update(dense_region_deconvolver.get_detection_parameters())
|
|
310
310
|
signal = Viewer.layers['raw signal'].data
|
|
311
311
|
|
|
312
|
-
spots
|
|
312
|
+
if 'decovoluted spots' in Viewer.layers :
|
|
313
|
+
spots = Viewer.layers['decovoluted spots'].data.astype(np.int32)
|
|
314
|
+
else :
|
|
315
|
+
spots = Viewer.layers['single spots'].data.astype(np.int32)
|
|
313
316
|
|
|
314
317
|
return spots, signal, updated_parameters
|
|
315
318
|
|
|
@@ -359,6 +359,7 @@ def _cell_coloc(
|
|
|
359
359
|
pivot_values_columns = ['rna_coords', 'total_rna_number']
|
|
360
360
|
if 'clusters' in acquisition2.columns or 'clusters' in acquisition1.columns:
|
|
361
361
|
pivot_values_columns.extend(['clustered_spots_coords','clustered_spot_number'])
|
|
362
|
+
print(cell_dataframe.loc[:,["clustered_spots_coords"]])
|
|
362
363
|
cell_dataframe.loc[:,['cell_id']] = cell_dataframe['cell_id'].astype(int)
|
|
363
364
|
colocalisation_df = cell_dataframe.pivot(
|
|
364
365
|
columns=['name', 'acquisition_id'],
|
|
@@ -387,7 +388,9 @@ def _cell_coloc(
|
|
|
387
388
|
colocalisation_df[("spots_with_spots_fraction",coloc_name_backward,"backward")] = colocalisation_df[("spots_with_spots_count",coloc_name_backward,"backward")].astype(float) / colocalisation_df[('total_rna_number',acquisition_name_id2,acquisition_id2)].astype(float)
|
|
388
389
|
|
|
389
390
|
if 'clusters' in acquisition2.columns:
|
|
390
|
-
if len(acquisition2['clusters'].iat[0]) > 0 :
|
|
391
|
+
if len(acquisition2['clusters'].iat[0]) > 0 or len(acquisition2['clustered_spots_coords'][acquisition2['clustered_spots_coords'] != -1]) > 0 :
|
|
392
|
+
|
|
393
|
+
print("COLOCALISATION_DF\n", colocalisation_df.loc[:,('clustered_spots_coords',acquisition_name_id2,acquisition_id2)])
|
|
391
394
|
|
|
392
395
|
#spots to clusters
|
|
393
396
|
colocalisation_df[("spots_with_clustered_spots_count",coloc_name_forward,"forward")] = colocalisation_df.apply(
|
small_fish_gui/pipeline/spots.py
CHANGED
|
@@ -115,16 +115,6 @@ def reconstruct_acquisition_data(
|
|
|
115
115
|
) -> pd.DataFrame:
|
|
116
116
|
"""
|
|
117
117
|
Aim : creating a acquisition to add to result_dataframe from loaded spots for co-localization use
|
|
118
|
-
|
|
119
|
-
**Needed keys for colocalization**
|
|
120
|
-
* acquisition_id
|
|
121
|
-
* name
|
|
122
|
-
* spots : np.ndarray[int] (nb_spots, nb_coordinates)
|
|
123
|
-
* clusters : np.ndarray[int] (nb_cluster, nb_coordinate + 2)
|
|
124
|
-
* spots_cluster_id : list[int]
|
|
125
|
-
* voxel_size : tuple[int]
|
|
126
|
-
* shape : tuple[int]
|
|
127
|
-
* filename : str
|
|
128
118
|
"""
|
|
129
119
|
max_id = int(max_id)
|
|
130
120
|
spots = reconstruct_spots(Spots['coordinates'])
|
|
@@ -133,15 +123,18 @@ def reconstruct_acquisition_data(
|
|
|
133
123
|
|
|
134
124
|
if has_clusters :
|
|
135
125
|
|
|
136
|
-
clusters = np.empty(shape=(0,5), dtype=int)
|
|
137
|
-
spot_cluster_id = Spots['cluster_id'].to_numpy().astype(int)
|
|
126
|
+
clusters = np.empty(shape=(0,5), dtype=int)
|
|
127
|
+
spot_cluster_id = Spots['cluster_id'].to_numpy().astype(int)
|
|
128
|
+
clustered_spots = spots[spot_cluster_id != -1]
|
|
129
|
+
print("clustered_spots : ", clustered_spots)
|
|
138
130
|
|
|
139
131
|
new_acquisition = pd.DataFrame({
|
|
140
132
|
'acquisition_id' : [max_id + 1],
|
|
141
133
|
'name' : ["(loaded_spots)_{}".format(filename.split('.', maxsplit=1)[0])],
|
|
142
134
|
'threshold' : [0],
|
|
143
135
|
'spots' : [spots],
|
|
144
|
-
'clusters' : [clusters],
|
|
136
|
+
'clusters' : [clusters.tolist()],
|
|
137
|
+
'clustered_spots_coords' : [clustered_spots.tolist()],
|
|
145
138
|
'spots_cluster_id' : [spot_cluster_id],
|
|
146
139
|
'spot_number' : [spot_number],
|
|
147
140
|
'filename' : [filename],
|
|
@@ -158,6 +151,11 @@ def reconstruct_acquisition_data(
|
|
|
158
151
|
'voxel_size' : [voxel_size],
|
|
159
152
|
})
|
|
160
153
|
|
|
154
|
+
print("Reconstructed acquisition : \n", new_acquisition)
|
|
155
|
+
print("\n", new_acquisition.columns)
|
|
156
|
+
if 'clusters' in new_acquisition.columns :
|
|
157
|
+
print("\n", new_acquisition['clusters'])
|
|
158
|
+
|
|
161
159
|
return new_acquisition
|
|
162
160
|
|
|
163
161
|
def reconstruct_spots(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: small_fish_gui
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
small_fish_gui/__init__.py,sha256=
|
|
1
|
+
small_fish_gui/__init__.py,sha256=LXbX5bfmwGeIZqpQAvwXrknqBfev-XlPYsJqXKB2Ch8,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
|
|
@@ -16,7 +16,7 @@ small_fish_gui/gui/__init__.py,sha256=idpRSg2FFawF0ydfc7Y8ep6gQ4_jhroL_jZURlRE_B
|
|
|
16
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
18
|
small_fish_gui/gui/layout.py,sha256=72RZI4Vt5WwZH9cx8SfOCWsZox0udG3Ck3YE_c-aiQ4,30927
|
|
19
|
-
small_fish_gui/gui/napari_visualiser.py,sha256=
|
|
19
|
+
small_fish_gui/gui/napari_visualiser.py,sha256=eU2kqp16EHA3NwbGFBZAiTOiAI_K4zbnMOCtbW4fNuM,14978
|
|
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=r96rrWS5lim5bPCcoQMs83DRApCGxJ3ADruFhhYHxN0,22228
|
|
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
37
|
small_fish_gui/pipeline/actions.py,sha256=dtRCf_UKg-Y9uV1jCBeASeuR7-pZ8dHVEYHs7MW-0pg,21263
|
|
38
38
|
small_fish_gui/pipeline/detection.py,sha256=IE0Wf9NaHcxkCv1cjrOdyfnQUzv8SlXilIT7KI8INP4,35988
|
|
39
39
|
small_fish_gui/pipeline/segmentation.py,sha256=m9XW8XiWCSpGFdi6It6RkeDYTiKtNhfj30kUSBG8pNo,32023
|
|
40
|
-
small_fish_gui/pipeline/spots.py,sha256=
|
|
40
|
+
small_fish_gui/pipeline/spots.py,sha256=lG9hvn0MqnDWUr2VfSEm8LHoprSlGoDHQFuQGlJHaxM,6807
|
|
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.3.dist-info/METADATA,sha256=pFbXtb_Zd3RskgJg-chYrG11YZL32xahnim4TpuTusk,6553
|
|
44
|
+
small_fish_gui-2.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
45
|
+
small_fish_gui-2.1.3.dist-info/licenses/LICENSE,sha256=-iFy8VGBYs5VsHglKpk4D-hxqQ2jMJaqmfq_ulIzDks,1303
|
|
46
|
+
small_fish_gui-2.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|