spacr 0.3.47__py3-none-any.whl → 0.3.52__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/chat_bot.py +31 -0
- spacr/gui_elements.py +33 -7
- spacr/gui_utils.py +11 -12
- spacr/measure.py +4 -1
- spacr/ml.py +453 -141
- spacr/plot.py +612 -52
- spacr/sequencing.py +5 -2
- spacr/settings.py +15 -31
- spacr/toxo.py +447 -159
- spacr/utils.py +35 -4
- {spacr-0.3.47.dist-info → spacr-0.3.52.dist-info}/METADATA +3 -1
- {spacr-0.3.47.dist-info → spacr-0.3.52.dist-info}/RECORD +16 -15
- {spacr-0.3.47.dist-info → spacr-0.3.52.dist-info}/LICENSE +0 -0
- {spacr-0.3.47.dist-info → spacr-0.3.52.dist-info}/WHEEL +0 -0
- {spacr-0.3.47.dist-info → spacr-0.3.52.dist-info}/entry_points.txt +0 -0
- {spacr-0.3.47.dist-info → spacr-0.3.52.dist-info}/top_level.txt +0 -0
spacr/utils.py
CHANGED
@@ -4067,7 +4067,7 @@ def generate_path_list_from_db(db_path, file_metadata):
|
|
4067
4067
|
|
4068
4068
|
return all_paths
|
4069
4069
|
|
4070
|
-
def correct_paths(df, base_path):
|
4070
|
+
def correct_paths(df, base_path, folder='data'):
|
4071
4071
|
|
4072
4072
|
if isinstance(df, pd.DataFrame):
|
4073
4073
|
|
@@ -4083,9 +4083,9 @@ def correct_paths(df, base_path):
|
|
4083
4083
|
adjusted_image_paths = []
|
4084
4084
|
for path in image_paths:
|
4085
4085
|
if base_path not in path:
|
4086
|
-
parts = path.split('/
|
4086
|
+
parts = path.split(f'/{folder}/')
|
4087
4087
|
if len(parts) > 1:
|
4088
|
-
new_path = os.path.join(base_path, '
|
4088
|
+
new_path = os.path.join(base_path, f'{folder}', parts[1])
|
4089
4089
|
adjusted_image_paths.append(new_path)
|
4090
4090
|
else:
|
4091
4091
|
adjusted_image_paths.append(path)
|
@@ -5224,4 +5224,35 @@ def correct_metadata_column_names(df):
|
|
5224
5224
|
df = df.rename(columns={'grna_name': 'grna'})
|
5225
5225
|
if 'plate_row' in df.columns:
|
5226
5226
|
df[['plate', 'row']] = df['plate_row'].str.split('_', expand=True)
|
5227
|
-
return df
|
5227
|
+
return df
|
5228
|
+
|
5229
|
+
def control_filelist(folder, mode='column', values=['01','02']):
|
5230
|
+
files = os.listdir(folder)
|
5231
|
+
if mode is 'column':
|
5232
|
+
filtered_files = [file for file in files if file.split('_')[1][1:] in values]
|
5233
|
+
if mode is 'row':
|
5234
|
+
filtered_files = [file for file in files if file.split('_')[1][:1] in values]
|
5235
|
+
return filtered_files
|
5236
|
+
|
5237
|
+
def choose_p_adjust_method(num_groups, num_data_points):
|
5238
|
+
"""
|
5239
|
+
Selects the most appropriate p-value adjustment method based on data characteristics.
|
5240
|
+
|
5241
|
+
Parameters:
|
5242
|
+
- num_groups: Number of unique groups being compared
|
5243
|
+
- num_data_points: Number of data points per group (assuming balanced groups)
|
5244
|
+
|
5245
|
+
Returns:
|
5246
|
+
- A string representing the recommended p-adjustment method
|
5247
|
+
"""
|
5248
|
+
num_comparisons = (num_groups * (num_groups - 1)) // 2 # Number of pairwise comparisons
|
5249
|
+
|
5250
|
+
# Decision logic for choosing the adjustment method
|
5251
|
+
if num_comparisons <= 10 and num_data_points > 5:
|
5252
|
+
return 'holm' # Balanced between power and Type I error control
|
5253
|
+
elif num_comparisons > 10 and num_data_points <= 5:
|
5254
|
+
return 'fdr_bh' # FDR control for large number of comparisons and small sample size
|
5255
|
+
elif num_comparisons <= 10:
|
5256
|
+
return 'sidak' # Less conservative than Bonferroni, good for independent comparisons
|
5257
|
+
else:
|
5258
|
+
return 'bonferroni' # Very conservative, use for strict control of Type I errors
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: spacr
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.52
|
4
4
|
Summary: Spatial phenotype analysis of crisp screens (SpaCr)
|
5
5
|
Home-page: https://github.com/EinarOlafsson/spacr
|
6
6
|
Author: Einar Birnir Olafsson
|
@@ -16,6 +16,7 @@ Requires-Dist: scipy<2.0,>=1.12.0
|
|
16
16
|
Requires-Dist: cellpose<4.0,>=3.0.6
|
17
17
|
Requires-Dist: scikit-image<1.0,>=0.22.0
|
18
18
|
Requires-Dist: scikit-learn<2.0,>=1.4.1
|
19
|
+
Requires-Dist: scikit-posthocs<0.20,>=0.10.0
|
19
20
|
Requires-Dist: mahotas<2.0,>=1.4.13
|
20
21
|
Requires-Dist: btrack<1.0,>=0.6.5
|
21
22
|
Requires-Dist: trackpy<1.0,>=0.6.2
|
@@ -66,6 +67,7 @@ Requires-Dist: gdown
|
|
66
67
|
Requires-Dist: IPython<9.0,>=8.18.1
|
67
68
|
Requires-Dist: ipykernel
|
68
69
|
Requires-Dist: ipywidgets<9.0,>=8.1.2
|
70
|
+
Requires-Dist: brokenaxes<1.0,>=0.6.2
|
69
71
|
Requires-Dist: huggingface-hub<0.25,>=0.24.0
|
70
72
|
Provides-Extra: dev
|
71
73
|
Requires-Dist: pytest<3.11,>=3.9; extra == "dev"
|
@@ -8,26 +8,27 @@ 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/cellpose.py,sha256=RBHMs2vwXcfkj0xqAULpALyzJYXddSRycgZSzmwI7v0,14755
|
11
|
+
spacr/chat_bot.py,sha256=n3Fhqg3qofVXHmh3H9sUcmfYy9MmgRnr48663MVdY9E,1244
|
11
12
|
spacr/core.py,sha256=dW9RrAKFLfVsFhX0-kaVMc2T7b47Ky0pTXK-CEVOeWQ,48235
|
12
13
|
spacr/deep_spacr.py,sha256=HdOcNU8cHcE_19nP7_5uTz-ih3E169ffr2Hm--NvMvA,43255
|
13
14
|
spacr/gui.py,sha256=ARyn9Q_g8HoP-cXh1nzMLVFCKqthY4v2u9yORyaQqQE,8230
|
14
15
|
spacr/gui_core.py,sha256=N7R7yvfK_dJhOReM_kW3Ci8Bokhi1OzsxeKqvSGdvV4,41460
|
15
|
-
spacr/gui_elements.py,sha256=
|
16
|
-
spacr/gui_utils.py,sha256=
|
16
|
+
spacr/gui_elements.py,sha256=Dr9KEek41LggJ2z2zfh28a7w86sZXg1jzF388rF2BT4,138249
|
17
|
+
spacr/gui_utils.py,sha256=aOVI2G71pObolEjuSgAKr86XJZtN98uqqBfCbucMhRQ,45560
|
17
18
|
spacr/io.py,sha256=1rIdJ_8dyn7W4D2zXjaOqlgyo_Y5Z7X86aRp4hNYWCU,144194
|
18
19
|
spacr/logger.py,sha256=lJhTqt-_wfAunCPl93xE65Wr9Y1oIHJWaZMjunHUeIw,1538
|
19
|
-
spacr/measure.py,sha256=
|
20
|
+
spacr/measure.py,sha256=euywVbBXRllht-frnxy9QHV76i8HkPPjm3dJw46kcz0,55085
|
20
21
|
spacr/mediar.py,sha256=FwLvbLQW5LQzPgvJZG8Lw7GniA2vbZx6Jv6vIKu7I5c,14743
|
21
|
-
spacr/ml.py,sha256=
|
22
|
+
spacr/ml.py,sha256=Oykp3drBxZrcwrWQh2n6Xt1OzZER6pSIiaR-W0GO2_E,67353
|
22
23
|
spacr/openai.py,sha256=5vBZ3Jl2llYcW3oaTEXgdyCB2aJujMUIO5K038z7w_A,1246
|
23
|
-
spacr/plot.py,sha256=
|
24
|
-
spacr/sequencing.py,sha256=
|
25
|
-
spacr/settings.py,sha256=
|
24
|
+
spacr/plot.py,sha256=B4nxp7NFyM6MmtarW9zbxydeEvVIMgPqHEElkCIycpA,169566
|
25
|
+
spacr/sequencing.py,sha256=HDpF_C3hRd-fk6ZENPmI3vgYoom3HIvaeIIZWLhaIAY,25037
|
26
|
+
spacr/settings.py,sha256=2Er3G6ApcemIEhyQCsF8zmVdBW8KiKf4nkSismu03s8,77358
|
26
27
|
spacr/sim.py,sha256=1xKhXimNU3ukzIw-3l9cF3Znc_brW8h20yv8fSTzvss,71173
|
27
28
|
spacr/submodules.py,sha256=3C5M4UbI9Ral1MX4PTpucaAaqhL3RADuCOCqaHhMyUg,28048
|
28
29
|
spacr/timelapse.py,sha256=FSYpUtAVy6xc3lwprRYgyDTT9ysUhfRQ4zrP9_h2mvg,39465
|
29
|
-
spacr/toxo.py,sha256=
|
30
|
-
spacr/utils.py,sha256=
|
30
|
+
spacr/toxo.py,sha256=bcH5Ug6xtf3BBxvOFc8e4Jc5R3f6-C46oHhgiSoYl3U,24935
|
31
|
+
spacr/utils.py,sha256=clrjlUOhY-LQH0bTIiNJ9VMBEU9qlRbTvoU7-yNLzsg,222475
|
31
32
|
spacr/version.py,sha256=axH5tnGwtgSnJHb5IDhiu4Zjk5GhLyAEDRe-rnaoFOA,409
|
32
33
|
spacr/resources/MEDIAR/.gitignore,sha256=Ff1q9Nme14JUd-4Q3jZ65aeQ5X4uttptssVDgBVHYo8,152
|
33
34
|
spacr/resources/MEDIAR/LICENSE,sha256=yEj_TRDLUfDpHDNM0StALXIt6mLqSgaV2hcCwa6_TcY,1065
|
@@ -150,9 +151,9 @@ spacr/resources/icons/umap.png,sha256=dOLF3DeLYy9k0nkUybiZMe1wzHQwLJFRmgccppw-8b
|
|
150
151
|
spacr/resources/images/plate1_E01_T0001F001L01A01Z01C02.tif,sha256=Tl0ZUfZ_AYAbu0up_nO0tPRtF1BxXhWQ3T3pURBCCRo,7958528
|
151
152
|
spacr/resources/images/plate1_E01_T0001F001L01A02Z01C01.tif,sha256=m8N-V71rA1TT4dFlENNg8s0Q0YEXXs8slIn7yObmZJQ,7958528
|
152
153
|
spacr/resources/images/plate1_E01_T0001F001L01A03Z01C03.tif,sha256=Pbhk7xn-KUP6RSIhJsxQcrHFImBm3GEpLkzx7WOc-5M,7958528
|
153
|
-
spacr-0.3.
|
154
|
-
spacr-0.3.
|
155
|
-
spacr-0.3.
|
156
|
-
spacr-0.3.
|
157
|
-
spacr-0.3.
|
158
|
-
spacr-0.3.
|
154
|
+
spacr-0.3.52.dist-info/LICENSE,sha256=SR-2MeGc6SCM1UORJYyarSWY_A-JaOMFDj7ReSs9tRM,1083
|
155
|
+
spacr-0.3.52.dist-info/METADATA,sha256=I0OCX9zCPvfgnnGS2JYaV-vdNvirglSfO6IzX68s8uI,6032
|
156
|
+
spacr-0.3.52.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
|
157
|
+
spacr-0.3.52.dist-info/entry_points.txt,sha256=BMC0ql9aNNpv8lUZ8sgDLQMsqaVnX5L535gEhKUP5ho,296
|
158
|
+
spacr-0.3.52.dist-info/top_level.txt,sha256=GJPU8FgwRXGzKeut6JopsSRY2R8T3i9lDgya42tLInY,6
|
159
|
+
spacr-0.3.52.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|