spacr 0.1.1__tar.gz → 0.1.6__tar.gz
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-0.1.1/spacr.egg-info → spacr-0.1.6}/PKG-INFO +13 -22
- {spacr-0.1.1 → spacr-0.1.6}/README.rst +10 -19
- {spacr-0.1.1 → spacr-0.1.6}/setup.py +40 -20
- {spacr-0.1.1 → spacr-0.1.6}/spacr/__init__.py +19 -12
- spacr-0.1.1/spacr/annotate_app_v2.py → spacr-0.1.6/spacr/app_annotate.py +182 -155
- spacr-0.1.6/spacr/app_classify.py +8 -0
- spacr-0.1.1/spacr/mask_app.py → spacr-0.1.6/spacr/app_make_masks.py +75 -75
- spacr-0.1.6/spacr/app_mask.py +8 -0
- spacr-0.1.6/spacr/app_measure.py +8 -0
- spacr-0.1.6/spacr/app_sequencing.py +8 -0
- spacr-0.1.6/spacr/app_umap.py +8 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/core.py +8 -6
- {spacr-0.1.1 → spacr-0.1.6}/spacr/deep_spacr.py +3 -1
- spacr-0.1.1/spacr/gui_2.py → spacr-0.1.6/spacr/gui.py +46 -42
- spacr-0.1.6/spacr/gui_core.py +608 -0
- spacr-0.1.6/spacr/gui_elements.py +322 -0
- spacr-0.1.6/spacr/gui_run.py +58 -0
- spacr-0.1.6/spacr/gui_utils.py +139 -0
- spacr-0.1.6/spacr/gui_wrappers.py +137 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/measure.py +24 -3
- {spacr-0.1.1 → spacr-0.1.6}/spacr/sequencing.py +1 -17
- spacr-0.1.6/spacr/settings.py +912 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/utils.py +60 -7
- {spacr-0.1.1 → spacr-0.1.6/spacr.egg-info}/PKG-INFO +13 -22
- {spacr-0.1.1 → spacr-0.1.6}/spacr.egg-info/SOURCES.txt +12 -8
- spacr-0.1.6/spacr.egg-info/entry_points.txt +8 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr.egg-info/requires.txt +2 -2
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_annotate_app.py +1 -1
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_gui_classify_app.py +1 -1
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_gui_mask_app.py +1 -1
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_gui_measure_app.py +1 -1
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_gui_sim_app.py +1 -1
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_mask_app.py +1 -1
- spacr-0.1.1/spacr/annotate_app.py +0 -511
- spacr-0.1.1/spacr/gui.py +0 -145
- spacr-0.1.1/spacr/gui_classify_app.py +0 -187
- spacr-0.1.1/spacr/gui_mask_app.py +0 -245
- spacr-0.1.1/spacr/gui_measure_app.py +0 -236
- spacr-0.1.1/spacr/gui_utils.py +0 -1095
- spacr-0.1.1/spacr/settings.py +0 -477
- spacr-0.1.1/spacr.egg-info/entry_points.txt +0 -9
- {spacr-0.1.1 → spacr-0.1.6}/LICENSE +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/MANIFEST.in +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/setup.cfg +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/__main__.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/chris.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/graph_learning.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/io.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/logger.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model_settings.csv +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/models/cp/toxo_pv_lumen.CP_model +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/plot.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/sim.py +0 -0
- /spacr-0.1.1/spacr/gui_sim_app.py → /spacr-0.1.6/spacr/sim_app.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/timelapse.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr/version.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr.egg-info/dependency_links.txt +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/spacr.egg-info/top_level.txt +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_core.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_gui_utils.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_io.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_measure.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_plot.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_sim.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_timelapse.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_train.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_umap.py +0 -0
- {spacr-0.1.1 → spacr-0.1.6}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: spacr
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.6
|
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
|
@@ -9,7 +9,6 @@ Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
10
10
|
Classifier: Operating System :: OS Independent
|
11
11
|
License-File: LICENSE
|
12
|
-
Requires-Dist: dgl==0.9.1
|
13
12
|
Requires-Dist: torch<3.0,>=2.2.1
|
14
13
|
Requires-Dist: torchvision<1.0,>=0.17.1
|
15
14
|
Requires-Dist: torch-geometric<3.0,>=2.5.1
|
@@ -40,8 +39,9 @@ Requires-Dist: ttf_opensans>=2020.10.30
|
|
40
39
|
Requires-Dist: customtkinter<6.0,>=5.2.2
|
41
40
|
Requires-Dist: biopython<2.0,>=1.80
|
42
41
|
Requires-Dist: lxml<6.0,>=5.1.0
|
42
|
+
Requires-Dist: huggingface-hub<0.25,>=0.24.0
|
43
43
|
Provides-Extra: dev
|
44
|
-
Requires-Dist: pytest
|
44
|
+
Requires-Dist: pytest<3.11,>=3.9; extra == "dev"
|
45
45
|
Provides-Extra: headless
|
46
46
|
Requires-Dist: opencv-python-headless; extra == "headless"
|
47
47
|
Provides-Extra: full
|
@@ -63,7 +63,7 @@ Requires-Dist: opencv-python; extra == "full"
|
|
63
63
|
SpaCr
|
64
64
|
=====
|
65
65
|
|
66
|
-
Spatial phenotype analysis of CRISPR-Cas9 screens (SpaCr). The spatial organization of organelles and proteins within cells constitutes a key level of functional regulation. In the context of infectious disease, the spatial relationships between host cell structures and intracellular pathogens are critical to
|
66
|
+
Spatial phenotype analysis of CRISPR-Cas9 screens (SpaCr). The spatial organization of organelles and proteins within cells constitutes a key level of functional regulation. In the context of infectious disease, the spatial relationships between host cell structures and intracellular pathogens are critical to understanding host clearance mechanisms and how pathogens evade them. SpaCr is a Python-based software package for generating single-cell image data for deep-learning sub-cellular/cellular phenotypic classification from pooled genetic CRISPR-Cas9 screens. SpaCr provides a flexible toolset to extract single-cell images and measurements from high-content cell painting experiments, train deep-learning models to classify cellular/subcellular phenotypes, simulate, and analyze pooled CRISPR-Cas9 imaging screens.
|
67
67
|
|
68
68
|
Features
|
69
69
|
--------
|
@@ -72,9 +72,9 @@ Features
|
|
72
72
|
|
73
73
|
- **Object Measurements:** Measurements for each object including scikit-image-regionprops, intensity percentiles, shannon-entropy, pearsons and manders correlations, homogeneity, and radial distribution. Measurements are saved to a SQL database in object-level tables.
|
74
74
|
|
75
|
-
- **Crop Images:**
|
75
|
+
- **Crop Images:** Save objects (cells, nuclei, pathogen, cytoplasm) as images. Object image paths are saved in a SQL database.
|
76
76
|
|
77
|
-
- **Train CNNs or Transformers:** Train Torch
|
77
|
+
- **Train CNNs or Transformers:** Train Torch models to classify single object images.
|
78
78
|
|
79
79
|
- **Manual Annotation:** Supports manual annotation of single-cell images and segmentation to refine training datasets for training CNNs/Transformers or cellpose, respectively.
|
80
80
|
|
@@ -91,29 +91,20 @@ Features
|
|
91
91
|
Installation
|
92
92
|
------------
|
93
93
|
|
94
|
-
|
94
|
+
If using Windows, switch to Linux—it's free, open-source, and better.
|
95
95
|
|
96
|
-
|
97
|
-
~~~~~~
|
96
|
+
Before installing SpaCr on OSX ensure OpenMP is installed::
|
98
97
|
|
99
|
-
|
98
|
+
brew install libomp
|
100
99
|
|
101
|
-
(Tkinter is included with the standard Python installation on macOS
|
102
|
-
|
103
|
-
On Linux:
|
104
|
-
|
105
|
-
::
|
100
|
+
SpaCr GUI requires Tkinter. On Linux, ensure Tkinter is installed. (Tkinter is included with the standard Python installation on macOS and Windows)::
|
106
101
|
|
107
102
|
sudo apt-get install python3-tk
|
108
103
|
|
109
|
-
Install
|
110
|
-
|
111
|
-
::
|
104
|
+
Install SpaCr with pip::
|
112
105
|
|
113
106
|
pip install spacr
|
114
107
|
|
115
|
-
Run
|
116
|
-
|
117
|
-
::
|
108
|
+
Run SpaCr GUI::
|
118
109
|
|
119
|
-
|
110
|
+
spacr
|
@@ -14,7 +14,7 @@
|
|
14
14
|
SpaCr
|
15
15
|
=====
|
16
16
|
|
17
|
-
Spatial phenotype analysis of CRISPR-Cas9 screens (SpaCr). The spatial organization of organelles and proteins within cells constitutes a key level of functional regulation. In the context of infectious disease, the spatial relationships between host cell structures and intracellular pathogens are critical to
|
17
|
+
Spatial phenotype analysis of CRISPR-Cas9 screens (SpaCr). The spatial organization of organelles and proteins within cells constitutes a key level of functional regulation. In the context of infectious disease, the spatial relationships between host cell structures and intracellular pathogens are critical to understanding host clearance mechanisms and how pathogens evade them. SpaCr is a Python-based software package for generating single-cell image data for deep-learning sub-cellular/cellular phenotypic classification from pooled genetic CRISPR-Cas9 screens. SpaCr provides a flexible toolset to extract single-cell images and measurements from high-content cell painting experiments, train deep-learning models to classify cellular/subcellular phenotypes, simulate, and analyze pooled CRISPR-Cas9 imaging screens.
|
18
18
|
|
19
19
|
Features
|
20
20
|
--------
|
@@ -23,9 +23,9 @@ Features
|
|
23
23
|
|
24
24
|
- **Object Measurements:** Measurements for each object including scikit-image-regionprops, intensity percentiles, shannon-entropy, pearsons and manders correlations, homogeneity, and radial distribution. Measurements are saved to a SQL database in object-level tables.
|
25
25
|
|
26
|
-
- **Crop Images:**
|
26
|
+
- **Crop Images:** Save objects (cells, nuclei, pathogen, cytoplasm) as images. Object image paths are saved in a SQL database.
|
27
27
|
|
28
|
-
- **Train CNNs or Transformers:** Train Torch
|
28
|
+
- **Train CNNs or Transformers:** Train Torch models to classify single object images.
|
29
29
|
|
30
30
|
- **Manual Annotation:** Supports manual annotation of single-cell images and segmentation to refine training datasets for training CNNs/Transformers or cellpose, respectively.
|
31
31
|
|
@@ -42,29 +42,20 @@ Features
|
|
42
42
|
Installation
|
43
43
|
------------
|
44
44
|
|
45
|
-
|
45
|
+
If using Windows, switch to Linux—it's free, open-source, and better.
|
46
46
|
|
47
|
-
|
48
|
-
~~~~~~
|
47
|
+
Before installing SpaCr on OSX ensure OpenMP is installed::
|
49
48
|
|
50
|
-
|
49
|
+
brew install libomp
|
51
50
|
|
52
|
-
(Tkinter is included with the standard Python installation on macOS
|
53
|
-
|
54
|
-
On Linux:
|
55
|
-
|
56
|
-
::
|
51
|
+
SpaCr GUI requires Tkinter. On Linux, ensure Tkinter is installed. (Tkinter is included with the standard Python installation on macOS and Windows)::
|
57
52
|
|
58
53
|
sudo apt-get install python3-tk
|
59
54
|
|
60
|
-
Install
|
61
|
-
|
62
|
-
::
|
55
|
+
Install SpaCr with pip::
|
63
56
|
|
64
57
|
pip install spacr
|
65
58
|
|
66
|
-
Run
|
67
|
-
|
68
|
-
::
|
59
|
+
Run SpaCr GUI::
|
69
60
|
|
70
|
-
|
61
|
+
spacr
|
@@ -10,19 +10,11 @@ def get_cuda_version():
|
|
10
10
|
except (subprocess.CalledProcessError, FileNotFoundError):
|
11
11
|
return None
|
12
12
|
|
13
|
-
cuda_version = get_cuda_version()
|
14
|
-
|
15
|
-
if cuda_version:
|
16
|
-
dgl_dependency = f'dgl-cu{cuda_version}==0.9.1' # Specify the version of DGL compatible with your setup
|
17
|
-
else:
|
18
|
-
dgl_dependency = 'dgl==0.9.1' # Fallback to CPU version if no CUDA is detected
|
19
|
-
|
20
13
|
# Ensure you have read the README.rst content into a variable, e.g., `long_description`
|
21
14
|
with open("README.rst", "r", encoding="utf-8") as fh:
|
22
15
|
long_description = fh.read()
|
23
16
|
|
24
17
|
dependencies = [
|
25
|
-
dgl_dependency,
|
26
18
|
'torch>=2.2.1,<3.0',
|
27
19
|
'torchvision>=0.17.1,<1.0',
|
28
20
|
'torch-geometric>=2.5.1,<3.0',
|
@@ -52,12 +44,13 @@ dependencies = [
|
|
52
44
|
'ttf_opensans>=2020.10.30',
|
53
45
|
'customtkinter>=5.2.2,<6.0',
|
54
46
|
'biopython>=1.80,<2.0',
|
55
|
-
'lxml>=5.1.0,<6.0'
|
47
|
+
'lxml>=5.1.0,<6.0',
|
48
|
+
'huggingface-hub>=0.24.0,<0.25'
|
56
49
|
]
|
57
50
|
|
58
51
|
setup(
|
59
52
|
name="spacr",
|
60
|
-
version="0.1.
|
53
|
+
version="0.1.6",
|
61
54
|
author="Einar Birnir Olafsson",
|
62
55
|
author_email="olafsson@med.umich.com",
|
63
56
|
description="Spatial phenotype analysis of crisp screens (SpaCr)",
|
@@ -69,18 +62,17 @@ setup(
|
|
69
62
|
install_requires=dependencies,
|
70
63
|
entry_points={
|
71
64
|
'console_scripts': [
|
72
|
-
'mask=spacr.
|
73
|
-
'measure=spacr.
|
74
|
-
'make_masks=spacr.
|
75
|
-
'annotate=spacr.
|
76
|
-
'classify=spacr.
|
77
|
-
'sim=spacr.
|
78
|
-
'
|
79
|
-
'gui2=spacr.gui_2:gui_app',
|
65
|
+
'mask=spacr.app_mask:start_mask_app',
|
66
|
+
'measure=spacr.app_measure:start_measure_app',
|
67
|
+
'make_masks=spacr.app_make_masks:gui_make_masks',
|
68
|
+
'annotate=spacr.app_annotate:gui_annotate',
|
69
|
+
'classify=spacr.app_classify:start_classify_app',
|
70
|
+
'sim=spacr.app_sim:gui_sim',
|
71
|
+
'spacr=spacr.gui:gui_app',
|
80
72
|
],
|
81
73
|
},
|
82
74
|
extras_require={
|
83
|
-
'dev': ['pytest>=3.9'],
|
75
|
+
'dev': ['pytest>=3.9,<3.11'],
|
84
76
|
'headless': ['opencv-python-headless'],
|
85
77
|
'full': ['opencv-python'],
|
86
78
|
},
|
@@ -89,4 +81,32 @@ setup(
|
|
89
81
|
"License :: OSI Approved :: MIT License",
|
90
82
|
"Operating System :: OS Independent",
|
91
83
|
]
|
92
|
-
)
|
84
|
+
)
|
85
|
+
|
86
|
+
cuda_version = get_cuda_version()
|
87
|
+
|
88
|
+
if cuda_version:
|
89
|
+
dgl = f'dgl-cu{cuda_version}==0.9.1'
|
90
|
+
else:
|
91
|
+
dgl = 'dgl==0.9.1' # Fallback to CPU version if no CUDA is detected
|
92
|
+
try:
|
93
|
+
subprocess.run(['pip', 'install', dgl], check=True)
|
94
|
+
except subprocess.CalledProcessError:
|
95
|
+
subprocess.run(['pip', 'install', 'dgl'], check=True)
|
96
|
+
|
97
|
+
deps = ['pyqtgraph>=0.13.7,<0.14',
|
98
|
+
'pyqt6>=6.7.1,<6.8',
|
99
|
+
'pyqt6.sip',
|
100
|
+
'qtpy>=2.4.1,<2.5',
|
101
|
+
'superqt>=0.6.7,<0.7',
|
102
|
+
'pyqtgraph',
|
103
|
+
'pyqt6',
|
104
|
+
'pyqt6.sip',
|
105
|
+
'qtpy',
|
106
|
+
'superqt']
|
107
|
+
|
108
|
+
for dep in deps:
|
109
|
+
try:
|
110
|
+
subprocess.run(['pip', 'install', dep], check=True)
|
111
|
+
except subprocess.CalledProcessError:
|
112
|
+
pass
|
@@ -12,13 +12,18 @@ from . import sim
|
|
12
12
|
from . import sequencing
|
13
13
|
from . import timelapse
|
14
14
|
from . import deep_spacr
|
15
|
-
from . import
|
16
|
-
from . import annotate_app_v2
|
15
|
+
from . import app_annotate
|
17
16
|
from . import gui_utils
|
18
|
-
from . import
|
19
|
-
from . import
|
20
|
-
from . import
|
21
|
-
from . import
|
17
|
+
from . import gui_elements
|
18
|
+
from . import gui_core
|
19
|
+
from . import gui_run
|
20
|
+
from . import gui_wrappers
|
21
|
+
from . import app_make_masks
|
22
|
+
from . import app_mask
|
23
|
+
from . import app_measure
|
24
|
+
from . import app_classify
|
25
|
+
from . import app_sequencing
|
26
|
+
from . import app_umap
|
22
27
|
from . import logger
|
23
28
|
|
24
29
|
|
@@ -33,13 +38,15 @@ __all__ = [
|
|
33
38
|
"sequencing"
|
34
39
|
"timelapse",
|
35
40
|
"deep_spacr",
|
36
|
-
"
|
37
|
-
"annotate_app_v2",
|
41
|
+
"app_annotate",
|
38
42
|
"gui_utils",
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
+
"app_make_masks",
|
44
|
+
"app_make_masks_v2",
|
45
|
+
"app_mask",
|
46
|
+
"app_measure",
|
47
|
+
"app_classify",
|
48
|
+
"app_sequencing",
|
49
|
+
"app_umap",
|
43
50
|
"logger"
|
44
51
|
]
|
45
52
|
|