spacr 0.0.35__tar.gz → 0.0.61__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.0.61/MANIFEST.in +1 -0
- {spacr-0.0.35/spacr.egg-info → spacr-0.0.61}/PKG-INFO +14 -29
- {spacr-0.0.35 → spacr-0.0.61}/README.md +8 -27
- {spacr-0.0.35 → spacr-0.0.61}/setup.py +27 -3
- {spacr-0.0.35 → spacr-0.0.61}/spacr/__init__.py +2 -2
- {spacr-0.0.35 → spacr-0.0.61}/spacr/__main__.py +0 -2
- spacr-0.0.61/spacr/alpha.py +807 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/annotate_app.py +113 -117
- {spacr-0.0.35 → spacr-0.0.61}/spacr/core.py +864 -728
- spacr-0.0.35/spacr/train.py → spacr-0.0.61/spacr/deep_spacr.py +203 -15
- {spacr-0.0.35 → spacr-0.0.61}/spacr/foldseek.py +2 -16
- spacr-0.0.61/spacr/graph_learning.py +320 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/gui.py +9 -8
- spacr-0.0.61/spacr/gui_2.py +90 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/gui_classify_app.py +7 -8
- {spacr-0.0.35 → spacr-0.0.61}/spacr/gui_mask_app.py +13 -13
- {spacr-0.0.35 → spacr-0.0.61}/spacr/gui_measure_app.py +8 -10
- {spacr-0.0.35 → spacr-0.0.61}/spacr/gui_utils.py +134 -35
- {spacr-0.0.35 → spacr-0.0.61}/spacr/io.py +311 -467
- {spacr-0.0.35 → spacr-0.0.61}/spacr/mask_app.py +110 -6
- {spacr-0.0.35 → spacr-0.0.61}/spacr/measure.py +19 -5
- spacr-0.0.61/spacr/models/cp/toxo_pv_lumen.CP_model +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/old_code.py +70 -2
- {spacr-0.0.35 → spacr-0.0.61}/spacr/plot.py +23 -6
- spacr-0.0.61/spacr/sequencing.py +1130 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/sim.py +0 -42
- {spacr-0.0.35 → spacr-0.0.61}/spacr/timelapse.py +0 -1
- {spacr-0.0.35 → spacr-0.0.61}/spacr/utils.py +1322 -75
- {spacr-0.0.35 → spacr-0.0.61/spacr.egg-info}/PKG-INFO +14 -29
- {spacr-0.0.35 → spacr-0.0.61}/spacr.egg-info/SOURCES.txt +5 -3
- {spacr-0.0.35 → spacr-0.0.61}/spacr.egg-info/entry_points.txt +1 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr.egg-info/requires.txt +6 -2
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_train.py +1 -1
- spacr-0.0.35/spacr/alpha.py +0 -295
- spacr-0.0.35/spacr/graph_learning.py +0 -276
- spacr-0.0.35/spacr/graph_learning_lap.py +0 -84
- spacr-0.0.35/spacr/umap.py +0 -689
- {spacr-0.0.35 → spacr-0.0.61}/LICENSE +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/setup.cfg +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/chris.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/cli.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/get_alfafold_structures.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/gui_sim_app.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/logger.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr/version.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr.egg-info/dependency_links.txt +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/spacr.egg-info/top_level.txt +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_annotate_app.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_core.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_gui_classify_app.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_gui_mask_app.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_gui_measure_app.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_gui_sim_app.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_gui_utils.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_io.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_mask_app.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_measure.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_plot.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_sim.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_timelapse.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_umap.py +0 -0
- {spacr-0.0.35 → spacr-0.0.61}/tests/test_utils.py +0 -0
spacr-0.0.61/MANIFEST.in
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
include spacr/models/cp/*
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: spacr
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.61
|
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,10 +9,11 @@ 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
|
12
13
|
Requires-Dist: torch>=2.2.1
|
13
14
|
Requires-Dist: torchvision>=0.17.1
|
14
15
|
Requires-Dist: torch-geometric>=2.5.1
|
15
|
-
Requires-Dist: numpy
|
16
|
+
Requires-Dist: numpy<2.0,>=1.26.4
|
16
17
|
Requires-Dist: pandas>=2.2.1
|
17
18
|
Requires-Dist: statsmodels>=0.14.1
|
18
19
|
Requires-Dist: scikit-image>=0.22.0
|
@@ -30,10 +31,13 @@ Requires-Dist: trackpy>=0.6.2
|
|
30
31
|
Requires-Dist: cellpose>=3.0.6
|
31
32
|
Requires-Dist: IPython>=8.18.1
|
32
33
|
Requires-Dist: opencv-python-headless>=4.9.0.80
|
33
|
-
Requires-Dist: umap>=0.
|
34
|
+
Requires-Dist: umap-learn>=0.5.6
|
34
35
|
Requires-Dist: ttkthemes>=3.2.2
|
35
36
|
Requires-Dist: xgboost>=2.0.3
|
36
37
|
Requires-Dist: PyWavelets>=1.6.0
|
38
|
+
Requires-Dist: torchcam>=0.4.0
|
39
|
+
Requires-Dist: ttf_opensans>=2020.10.30
|
40
|
+
Requires-Dist: customtkinter>=5.2.2
|
37
41
|
Requires-Dist: lxml>=5.1.0
|
38
42
|
Provides-Extra: dev
|
39
43
|
Requires-Dist: pytest>=3.9; extra == "dev"
|
@@ -65,9 +69,9 @@ Spatial phenotype analysis of CRISPR-Cas9 screens (SpaCr). The spatial organizat
|
|
65
69
|
|
66
70
|
## Features
|
67
71
|
|
68
|
-
- **Generate Masks:** Generate cellpose masks
|
72
|
+
- **Generate Masks:** Generate cellpose masks of cell, nuclei and pathogen objects.
|
69
73
|
|
70
|
-
- **Object Measurements:** Measurements for each object including scikit-image-regionprops, intensity
|
74
|
+
- **Object Measurements:** Measurements for each object including scikit-image-regionprops, intensity percentiles, shannon-entropy, pearsons and manders correlations, homogenicity and radial distribution. Measurements are saved to a sql database in object level tables.
|
71
75
|
|
72
76
|
- **Crop Images:** Objects (e.g. cells) can be saved as PNGs from the object area or bounding box area of each object. Object paths are saved in an sql database that can be annotated and used to train CNNs/Transformer models for classefication tasks.
|
73
77
|
|
@@ -81,11 +85,13 @@ Spatial phenotype analysis of CRISPR-Cas9 screens (SpaCr). The spatial organizat
|
|
81
85
|
|
82
86
|
- **Simulations:** Simulate spatial phenotype screens.
|
83
87
|
|
88
|
+
- **Sequencing:** Map FASTQ reads to barecode and gRNA barecode metadata.
|
89
|
+
|
84
90
|
- **Misc:** Analyze Ca oscillation, recruitment, infection rate, plaque size/count.
|
85
91
|
|
86
92
|
## Installation
|
87
93
|
|
88
|
-
|
94
|
+
Requires Tkinter for graphical user interface features.
|
89
95
|
|
90
96
|
### Ubuntu
|
91
97
|
|
@@ -105,29 +111,8 @@ install spacr with pip
|
|
105
111
|
pip install spacr
|
106
112
|
```
|
107
113
|
|
108
|
-
|
114
|
+
Run spacr GUI:
|
109
115
|
|
110
|
-
To generate masks:
|
111
|
-
```
|
112
|
-
gui_mask
|
113
|
-
```
|
114
|
-
To generate measurements and cropped images:
|
115
|
-
```
|
116
|
-
gui_measure
|
117
|
-
```
|
118
|
-
To curate masks for finetuning cellpose models:
|
119
|
-
```
|
120
|
-
gui_make_masks
|
121
|
-
```
|
122
|
-
To annotate paths to images in sql database created in gui_measure:
|
123
|
-
```
|
124
|
-
gui_annotate
|
125
|
-
```
|
126
|
-
Train torch CNNs/Transformers to classify single object images.
|
127
|
-
```
|
128
|
-
gui_classify
|
129
|
-
```
|
130
|
-
Simulate spatial phenotype screens.
|
131
116
|
```
|
132
|
-
|
117
|
+
gui
|
133
118
|
```
|
@@ -21,9 +21,9 @@ Spatial phenotype analysis of CRISPR-Cas9 screens (SpaCr). The spatial organizat
|
|
21
21
|
|
22
22
|
## Features
|
23
23
|
|
24
|
-
- **Generate Masks:** Generate cellpose masks
|
24
|
+
- **Generate Masks:** Generate cellpose masks of cell, nuclei and pathogen objects.
|
25
25
|
|
26
|
-
- **Object Measurements:** Measurements for each object including scikit-image-regionprops, intensity
|
26
|
+
- **Object Measurements:** Measurements for each object including scikit-image-regionprops, intensity percentiles, shannon-entropy, pearsons and manders correlations, homogenicity and radial distribution. Measurements are saved to a sql database in object level tables.
|
27
27
|
|
28
28
|
- **Crop Images:** Objects (e.g. cells) can be saved as PNGs from the object area or bounding box area of each object. Object paths are saved in an sql database that can be annotated and used to train CNNs/Transformer models for classefication tasks.
|
29
29
|
|
@@ -37,11 +37,13 @@ Spatial phenotype analysis of CRISPR-Cas9 screens (SpaCr). The spatial organizat
|
|
37
37
|
|
38
38
|
- **Simulations:** Simulate spatial phenotype screens.
|
39
39
|
|
40
|
+
- **Sequencing:** Map FASTQ reads to barecode and gRNA barecode metadata.
|
41
|
+
|
40
42
|
- **Misc:** Analyze Ca oscillation, recruitment, infection rate, plaque size/count.
|
41
43
|
|
42
44
|
## Installation
|
43
45
|
|
44
|
-
|
46
|
+
Requires Tkinter for graphical user interface features.
|
45
47
|
|
46
48
|
### Ubuntu
|
47
49
|
|
@@ -61,29 +63,8 @@ install spacr with pip
|
|
61
63
|
pip install spacr
|
62
64
|
```
|
63
65
|
|
64
|
-
|
66
|
+
Run spacr GUI:
|
65
67
|
|
66
|
-
To generate masks:
|
67
|
-
```
|
68
|
-
gui_mask
|
69
|
-
```
|
70
|
-
To generate measurements and cropped images:
|
71
|
-
```
|
72
|
-
gui_measure
|
73
|
-
```
|
74
|
-
To curate masks for finetuning cellpose models:
|
75
|
-
```
|
76
|
-
gui_make_masks
|
77
|
-
```
|
78
|
-
To annotate paths to images in sql database created in gui_measure:
|
79
|
-
```
|
80
|
-
gui_annotate
|
81
|
-
```
|
82
|
-
Train torch CNNs/Transformers to classify single object images.
|
83
|
-
```
|
84
|
-
gui_classify
|
85
|
-
```
|
86
|
-
Simulate spatial phenotype screens.
|
87
|
-
```
|
88
|
-
gui_sim
|
89
68
|
```
|
69
|
+
gui
|
70
|
+
```
|
@@ -1,14 +1,32 @@
|
|
1
1
|
from setuptools import setup, find_packages
|
2
|
+
import subprocess
|
3
|
+
|
4
|
+
# Function to determine the CUDA version
|
5
|
+
def get_cuda_version():
|
6
|
+
try:
|
7
|
+
output = subprocess.check_output(['nvcc', '--version'], stderr=subprocess.STDOUT).decode('utf-8')
|
8
|
+
if 'release' in output:
|
9
|
+
return output.split('release ')[1].split(',')[0].replace('.', '')
|
10
|
+
except (subprocess.CalledProcessError, FileNotFoundError):
|
11
|
+
return None
|
12
|
+
|
13
|
+
cuda_version = get_cuda_version()
|
14
|
+
|
15
|
+
if cuda_version:
|
16
|
+
dgl_dependency = f'dgl-cu{cuda_version}'
|
17
|
+
else:
|
18
|
+
dgl_dependency = 'dgl' # Fallback to CPU version if no CUDA is detected
|
2
19
|
|
3
20
|
# Ensure you have read the README.md content into a variable, e.g., `long_description`
|
4
21
|
with open("README.md", "r", encoding="utf-8") as fh:
|
5
22
|
long_description = fh.read()
|
6
23
|
|
7
24
|
dependencies = [
|
25
|
+
dgl_dependency,
|
8
26
|
'torch>=2.2.1',
|
9
27
|
'torchvision>=0.17.1',
|
10
28
|
'torch-geometric>=2.5.1',
|
11
|
-
'numpy>=1.26.4',
|
29
|
+
'numpy>=1.26.4,<2.0',
|
12
30
|
'pandas>=2.2.1',
|
13
31
|
'statsmodels>=0.14.1',
|
14
32
|
'scikit-image>=0.22.0',
|
@@ -26,22 +44,27 @@ dependencies = [
|
|
26
44
|
'cellpose>=3.0.6',
|
27
45
|
'IPython>=8.18.1',
|
28
46
|
'opencv-python-headless>=4.9.0.80',
|
29
|
-
'umap>=0.
|
47
|
+
'umap-learn>=0.5.6',
|
30
48
|
'ttkthemes>=3.2.2',
|
31
49
|
'xgboost>=2.0.3',
|
32
50
|
'PyWavelets>=1.6.0',
|
51
|
+
'torchcam>=0.4.0',
|
52
|
+
'ttf_opensans>=2020.10.30',
|
53
|
+
'customtkinter>=5.2.2',
|
33
54
|
'lxml>=5.1.0'
|
34
55
|
]
|
35
56
|
|
36
57
|
setup(
|
37
58
|
name="spacr",
|
38
|
-
version="0.0.
|
59
|
+
version="0.0.61",
|
39
60
|
author="Einar Birnir Olafsson",
|
40
61
|
author_email="olafsson@med.umich.com",
|
41
62
|
description="Spatial phenotype analysis of crisp screens (SpaCr)",
|
42
63
|
long_description=long_description,
|
43
64
|
url="https://github.com/EinarOlafsson/spacr",
|
44
65
|
packages=find_packages(exclude=["tests.*", "tests"]),
|
66
|
+
include_package_data=True,
|
67
|
+
package_data={'spacr': ['models/cp/*'],},
|
45
68
|
install_requires=dependencies,
|
46
69
|
entry_points={
|
47
70
|
'console_scripts': [
|
@@ -52,6 +75,7 @@ setup(
|
|
52
75
|
'classify=spacr.gui_classify_app:gui_classify',
|
53
76
|
'sim=spacr.gui_sim_app:gui_sim',
|
54
77
|
'gui=spacr.gui:gui_app',
|
78
|
+
'gui2=spacr.gui_2:gui_app',
|
55
79
|
],
|
56
80
|
},
|
57
81
|
extras_require={
|
@@ -8,7 +8,7 @@ from . import plot
|
|
8
8
|
from . import measure
|
9
9
|
from . import sim
|
10
10
|
from . import timelapse
|
11
|
-
from . import
|
11
|
+
from . import deep_spacr
|
12
12
|
from . import mask_app
|
13
13
|
from . import annotate_app
|
14
14
|
from . import graph_learning
|
@@ -26,7 +26,7 @@ __all__ = [
|
|
26
26
|
"measure",
|
27
27
|
"sim",
|
28
28
|
"timelapse",
|
29
|
-
"
|
29
|
+
"deep_spacr",
|
30
30
|
"annotate_app",
|
31
31
|
"graph_learning",
|
32
32
|
"gui_utils",
|