spacr 0.2.41__py3-none-any.whl → 0.2.46__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.
- spacr/core.py +46 -66
- spacr/gui.py +20 -38
- spacr/gui_core.py +327 -625
- spacr/gui_elements.py +175 -24
- spacr/gui_utils.py +324 -62
- spacr/io.py +43 -46
- spacr/plot.py +106 -0
- spacr/resources/icons/logo.pdf +2786 -6
- spacr/resources/icons/logo_spacr.png +0 -0
- spacr/resources/icons/logo_spacr_1.png +0 -0
- spacr/settings.py +0 -2
- spacr/utils.py +4 -24
- {spacr-0.2.41.dist-info → spacr-0.2.46.dist-info}/METADATA +1 -1
- {spacr-0.2.41.dist-info → spacr-0.2.46.dist-info}/RECORD +18 -16
- {spacr-0.2.41.dist-info → spacr-0.2.46.dist-info}/LICENSE +0 -0
- {spacr-0.2.41.dist-info → spacr-0.2.46.dist-info}/WHEEL +0 -0
- {spacr-0.2.41.dist-info → spacr-0.2.46.dist-info}/entry_points.txt +0 -0
- {spacr-0.2.41.dist-info → spacr-0.2.46.dist-info}/top_level.txt +0 -0
Binary file
|
Binary file
|
spacr/settings.py
CHANGED
@@ -1115,8 +1115,6 @@ categories = {
|
|
1115
1115
|
|
1116
1116
|
descriptions = {
|
1117
1117
|
'mask': "\n\nHelp:\n- Generate Cells, Nuclei, Pathogens, and Cytoplasm masks from intensity images in src.\n- To ensure that spacr is installed correctly:\n- 1. Downloade the training set (click Download).\n- 2. Import settings (click settings navigate to downloaded dataset settings folder and import preprocess_generate_masks_settings.csv).\n- 3. Run the module.\n- 4. Proceed to the Measure module (click Measure in the menue bar).\n- For further help, click the Help button in the menue bar.",
|
1118
|
-
|
1119
|
-
#'mask': "Help. Generate masks for Cells, Nuclei, and Pathogens . Function: preprocess_generate_masks from spacr.core.\n\nKey Features:\n- Automated Mask Generation: Automatically generate accurate masks for various cellular components using Cellpose, a robust deep learning model for cell segmentation.\n- Versatility: Capable of handling different types of biological samples, including cells, nuclei, and pathogens.\n- Integration: Directly integrates with other modules, providing the foundational masks required for subsequent analysis.",
|
1120
1118
|
|
1121
1119
|
'measure': "Capture Measurements from Cells, Nuclei, Pathogens, and Cytoplasm objects. Generate single object PNG images for one or several objects. (Requires masks from the Mask module). Function: measure_crop from spacr.measure.\n\nKey Features:\n- Comprehensive Measurement Capture: Obtain detailed measurements for various cellular components, including area, perimeter, intensity, and more.\n- Image Generation: Create high-resolution PNG images of individual objects, facilitating further analysis and visualization.\n- Mask Dependency: Requires accurate masks generated by the Mask module to ensure precise measurements.",
|
1122
1120
|
|
spacr/utils.py
CHANGED
@@ -87,27 +87,6 @@ from scipy.stats import f_oneway, kruskal
|
|
87
87
|
from sklearn.cluster import KMeans
|
88
88
|
from scipy import stats
|
89
89
|
|
90
|
-
def print_progress_v1(files_processed, files_to_process, n_jobs, time_ls=None, batch_size=None, operation_type=""):
|
91
|
-
if isinstance(files_processed, list):
|
92
|
-
files_processed = len(files_processed)
|
93
|
-
if isinstance(files_to_process, list):
|
94
|
-
files_to_process = len(files_to_process)
|
95
|
-
if isinstance(batch_size, list):
|
96
|
-
batch_size = len(batch_size)
|
97
|
-
|
98
|
-
if time_ls is not None:
|
99
|
-
average_time = np.mean(time_ls) if len(time_ls) > 0 else 0
|
100
|
-
time_left = (((files_to_process-files_processed)*average_time)/n_jobs)/60
|
101
|
-
if batch_size is None:
|
102
|
-
print(f'Time/image: {average_time:.3f}sec')
|
103
|
-
print(f'Time_left: {time_left:.3f} min.')
|
104
|
-
else:
|
105
|
-
average_time_img = average_time/batch_size
|
106
|
-
print(f'Time/batch:{average_time:.3f}sec')
|
107
|
-
print(f'Time/image {average_time_img:.3f}')
|
108
|
-
print(f'Time_left: {time_left:.3f} min.')
|
109
|
-
|
110
|
-
print(f'Progress: {files_processed}/{files_to_process}, operation_type: {operation_type}')
|
111
90
|
|
112
91
|
def print_progress(files_processed, files_to_process, n_jobs, time_ls=None, batch_size=None, operation_type=""):
|
113
92
|
if isinstance(files_processed, list):
|
@@ -2989,11 +2968,13 @@ def _choose_model(model_name, device, object_type='cell', restore_type=None, obj
|
|
2989
2968
|
if restore_type == None:
|
2990
2969
|
if model_name in ['cyto', 'cyto2', 'cyto3', 'nuclei']:
|
2991
2970
|
model = cp_models.Cellpose(gpu=torch.cuda.is_available(), model_type=model_name, device=device)
|
2992
|
-
|
2971
|
+
return model
|
2993
2972
|
else:
|
2994
2973
|
if object_type == 'nucleus':
|
2995
2974
|
restore = f'{type}_nuclei'
|
2996
2975
|
model = denoise.CellposeDenoiseModel(gpu=torch.cuda.is_available(), model_type="nuclei",restore_type=restore, chan2_restore=False, device=device)
|
2976
|
+
return model
|
2977
|
+
|
2997
2978
|
else:
|
2998
2979
|
restore = f'{type}_cyto3'
|
2999
2980
|
if model_name =='cyto2':
|
@@ -3001,8 +2982,7 @@ def _choose_model(model_name, device, object_type='cell', restore_type=None, obj
|
|
3001
2982
|
if model_name =='cyto':
|
3002
2983
|
chan2_restore = False
|
3003
2984
|
model = denoise.CellposeDenoiseModel(gpu=torch.cuda.is_available(), model_type="cyto3",restore_type=restore, chan2_restore=chan2_restore, device=device)
|
3004
|
-
|
3005
|
-
return model
|
2985
|
+
return model
|
3006
2986
|
|
3007
2987
|
class SelectChannels:
|
3008
2988
|
def __init__(self, channels):
|
@@ -8,23 +8,23 @@ spacr/app_measure.py,sha256=_K7APYIeOKpV6e_LcqabBjvEi7mfq9Fch8175x1x0k8,162
|
|
8
8
|
spacr/app_sequencing.py,sha256=DjG26jy4cpddnV8WOOAIiExtOe9MleVMY4MFa5uTo5w,157
|
9
9
|
spacr/app_umap.py,sha256=ZWAmf_OsIKbYvolYuWPMYhdlVe-n2CADoJulAizMiEo,153
|
10
10
|
spacr/chris.py,sha256=YlBjSgeZaY8HPy6jkrT_ISAnCMAKVfvCxF0I9eAZLFM,2418
|
11
|
-
spacr/core.py,sha256=
|
11
|
+
spacr/core.py,sha256=U-tolrwOOOunfl8Zxa8bEXvNrKyoTRd-3qh2uxIxpVU,147607
|
12
12
|
spacr/deep_spacr.py,sha256=ASBsN4JpHp_3S-91JUsB34IWTjTGPYI7jKV2qZnUR5M,37005
|
13
13
|
spacr/graph_learning.py,sha256=1tR-ZxvXE3dBz1Saw7BeVFcrsUFu9OlUZeZVifih9eo,13070
|
14
|
-
spacr/gui.py,sha256=
|
15
|
-
spacr/gui_core.py,sha256=
|
16
|
-
spacr/gui_elements.py,sha256=
|
17
|
-
spacr/gui_utils.py,sha256=
|
18
|
-
spacr/io.py,sha256=
|
14
|
+
spacr/gui.py,sha256=NoqaHYjqvyiexfXMsFWrRYjcyqAOhEIYnR-82LkKzdk,7277
|
15
|
+
spacr/gui_core.py,sha256=Kykg_7hcavvnuRmdFkhlGw8uGx8JinRRqS0XEPRZgRc,30541
|
16
|
+
spacr/gui_elements.py,sha256=vxgsCaF_YkvTieliJkHLDZjGnH79vS8vOixdYhElhf4,102043
|
17
|
+
spacr/gui_utils.py,sha256=NouEDCUq9F4AwzKQKPGltDEA4EBMk1K0UkZJCiGkWk0,26800
|
18
|
+
spacr/io.py,sha256=jmWgCoqgZRrU2CU2yVy6_4LWjSW0Vol_cxDSgleqFWI,115481
|
19
19
|
spacr/logger.py,sha256=7Zqr3TuuOQLWT32gYr2q1qvv7x0a2JhLANmZcnBXAW8,670
|
20
20
|
spacr/measure.py,sha256=u7j3z8wJyDQt24vh0nUmrI7uS1hei_9p_zlmAwoT4zI,55295
|
21
|
-
spacr/plot.py,sha256=
|
21
|
+
spacr/plot.py,sha256=ihyseFapQuF1JPzno2FaTpltgFYZZjTdrF56s5mYbQ8,73626
|
22
22
|
spacr/sequencing.py,sha256=fHZRnoMSxmhMdadkei3lUeBdckqFyptWdQyWsDW3aaU,83304
|
23
|
-
spacr/settings.py,sha256=
|
23
|
+
spacr/settings.py,sha256=Js1-CwR8It9DKIfikfpt0GXpFNJN08udyGLaHZ6IMnE,65395
|
24
24
|
spacr/sim.py,sha256=FveaVgBi3eypO2oVB5Dx-v0CC1Ny7UPfXkJiiRRodAk,71212
|
25
25
|
spacr/sim_app.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
26
|
spacr/timelapse.py,sha256=KMYCgHzf9LTZe-lWl5mvH2EjbKRE6OhpwdY13wEumGc,39504
|
27
|
-
spacr/utils.py,sha256=
|
27
|
+
spacr/utils.py,sha256=_aIhV_2frswNZCVXgPOJeO1Pfm_WbdOEhd8phWLKkII,188277
|
28
28
|
spacr/version.py,sha256=axH5tnGwtgSnJHb5IDhiu4Zjk5GhLyAEDRe-rnaoFOA,409
|
29
29
|
spacr/resources/icons/abort.png,sha256=avtIRT7aCJsdZ1WnY_rZStm6cCji5bYPLnlptdcTNcM,6583
|
30
30
|
spacr/resources/icons/annotate.png,sha256=GFgh7DiUMwPG_-xE6W1qU8V_qzSwBi1xKenfoaQxeFA,15495
|
@@ -33,7 +33,9 @@ spacr/resources/icons/cellpose_masks.png,sha256=HVWOIOBF8p3-On-2UahwMyQXp7awsoC5
|
|
33
33
|
spacr/resources/icons/classify.png,sha256=-iv4sqAwUVJO3CG6fHKHf3_BB0s-I2i4prg-iR7dSBM,35897
|
34
34
|
spacr/resources/icons/default.png,sha256=KoNhaSHukO4wDyivyYEgSbb5mGj-sAxmhKikLLtNpWs,20341
|
35
35
|
spacr/resources/icons/download.png,sha256=1nUoWRaTc4vIsK6gompdeqk0cIv2GdH-gCNHaEBX6Mc,20467
|
36
|
-
spacr/resources/icons/
|
36
|
+
spacr/resources/icons/logo.pdf,sha256=VB4cS41V3VV_QxD7l6CwdQKQiYLErugLBxWoCoxjQU0,377925
|
37
|
+
spacr/resources/icons/logo_spacr.png,sha256=qG3e3bdrAefhl1281rfo0R2XP0qA-c-oaBCXjxMGXkw,42587
|
38
|
+
spacr/resources/icons/logo_spacr_1.png,sha256=g9y2ZmnV3hab8r1idDfytm8AaHbBiQdu_93Jd7YKzwA,610892
|
37
39
|
spacr/resources/icons/make_masks.png,sha256=iB4kaTgbgyygSJSNstVKhRIXKSgWYkeh7Gt3ox-kWDI,42493
|
38
40
|
spacr/resources/icons/map_barcodes.png,sha256=ED6yCopk3hP7tICSvT8U_qA1bOOb0WHqmxVkmRxnbtE,7896
|
39
41
|
spacr/resources/icons/mask.png,sha256=DcBes-3UJ7XjRfj_P4RttRp680ZKZeH9a-DSk7bIF5U,37658
|
@@ -50,9 +52,9 @@ spacr/resources/icons/umap.png,sha256=dOLF3DeLYy9k0nkUybiZMe1wzHQwLJFRmgccppw-8b
|
|
50
52
|
spacr/resources/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model,sha256=z8BbHWZPRnE9D_BHO0fBREE85c1vkltDs-incs2ytXQ,26566572
|
51
53
|
spacr/resources/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model_settings.csv,sha256=fBAGuL_B8ERVdVizO3BHozTDSbZUh1yFzsYK3wkQN68,420
|
52
54
|
spacr/resources/models/cp/toxo_pv_lumen.CP_model,sha256=2y_CindYhmTvVwBH39SNILF3rI3x9SsRn6qrMxHy3l0,26562451
|
53
|
-
spacr-0.2.
|
54
|
-
spacr-0.2.
|
55
|
-
spacr-0.2.
|
56
|
-
spacr-0.2.
|
57
|
-
spacr-0.2.
|
58
|
-
spacr-0.2.
|
55
|
+
spacr-0.2.46.dist-info/LICENSE,sha256=SR-2MeGc6SCM1UORJYyarSWY_A-JaOMFDj7ReSs9tRM,1083
|
56
|
+
spacr-0.2.46.dist-info/METADATA,sha256=JysKwJVHTY9sdZOuYT6mGygPOxGLpwFkmmpVYcTZwuI,5156
|
57
|
+
spacr-0.2.46.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
58
|
+
spacr-0.2.46.dist-info/entry_points.txt,sha256=BMC0ql9aNNpv8lUZ8sgDLQMsqaVnX5L535gEhKUP5ho,296
|
59
|
+
spacr-0.2.46.dist-info/top_level.txt,sha256=GJPU8FgwRXGzKeut6JopsSRY2R8T3i9lDgya42tLInY,6
|
60
|
+
spacr-0.2.46.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|