celldetective 1.4.0__py3-none-any.whl → 1.4.1__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.
- celldetective/_version.py +1 -1
- celldetective/exceptions.py +11 -0
- celldetective/filters.py +7 -1
- celldetective/gui/InitWindow.py +4 -1
- celldetective/gui/__init__.py +2 -9
- celldetective/gui/about.py +2 -2
- celldetective/gui/base_annotator.py +786 -0
- celldetective/gui/classifier_widget.py +18 -13
- celldetective/gui/configure_new_exp.py +51 -30
- celldetective/gui/control_panel.py +10 -7
- celldetective/gui/{signal_annotator.py → event_annotator.py} +473 -1437
- celldetective/gui/generic_signal_plot.py +2 -1
- celldetective/gui/gui_utils.py +5 -2
- celldetective/gui/help/neighborhood.json +2 -2
- celldetective/gui/layouts.py +21 -11
- celldetective/gui/{signal_annotator2.py → pair_event_annotator.py} +3 -1
- celldetective/gui/process_block.py +129 -91
- celldetective/gui/processes/downloader.py +37 -34
- celldetective/gui/processes/measure_cells.py +14 -8
- celldetective/gui/processes/segment_cells.py +21 -6
- celldetective/gui/processes/track_cells.py +12 -13
- celldetective/gui/settings/__init__.py +7 -0
- celldetective/gui/settings/_settings_base.py +70 -0
- celldetective/gui/{retrain_signal_model_options.py → settings/_settings_event_model_training.py} +35 -91
- celldetective/gui/{measurement_options.py → settings/_settings_measurements.py} +28 -81
- celldetective/gui/{neighborhood_options.py → settings/_settings_neighborhood.py} +1 -1
- celldetective/gui/settings/_settings_segmentation.py +49 -0
- celldetective/gui/{retrain_segmentation_model_options.py → settings/_settings_segmentation_model_training.py} +33 -79
- celldetective/gui/{signal_annotator_options.py → settings/_settings_signal_annotator.py} +73 -95
- celldetective/gui/{btrack_options.py → settings/_settings_tracking.py} +64 -87
- celldetective/gui/styles.py +2 -1
- celldetective/gui/survival_ui.py +1 -1
- celldetective/gui/tableUI.py +25 -0
- celldetective/gui/table_ops/__init__.py +0 -0
- celldetective/gui/table_ops/merge_groups.py +118 -0
- celldetective/gui/viewers.py +3 -5
- celldetective/gui/workers.py +0 -2
- celldetective/io.py +98 -55
- celldetective/links/zenodo.json +145 -144
- celldetective/measure.py +31 -26
- celldetective/preprocessing.py +34 -21
- celldetective/regionprops/_regionprops.py +16 -5
- celldetective/scripts/measure_cells.py +5 -5
- celldetective/scripts/measure_relative.py +16 -11
- celldetective/scripts/segment_cells.py +4 -4
- celldetective/scripts/segment_cells_thresholds.py +3 -3
- celldetective/scripts/track_cells.py +7 -7
- celldetective/scripts/train_segmentation_model.py +10 -1
- celldetective/tracking.py +10 -4
- celldetective/utils.py +59 -58
- {celldetective-1.4.0.dist-info → celldetective-1.4.1.dist-info}/METADATA +1 -1
- celldetective-1.4.1.dist-info/RECORD +123 -0
- tests/gui/__init__.py +0 -0
- tests/gui/test_new_project.py +228 -0
- tests/{test_qt.py → gui/test_project.py} +22 -26
- tests/test_preprocessing.py +2 -2
- celldetective/models/segmentation_effectors/ricm_bf_all_last/config_input.json +0 -79
- celldetective/models/segmentation_effectors/ricm_bf_all_last/ricm_bf_all_last +0 -0
- celldetective/models/segmentation_effectors/ricm_bf_all_last/training_instructions.json +0 -37
- celldetective/models/segmentation_effectors/test-transfer/config_input.json +0 -39
- celldetective/models/segmentation_effectors/test-transfer/test-transfer +0 -0
- celldetective/models/signal_detection/NucCond/classification_loss.png +0 -0
- celldetective/models/signal_detection/NucCond/classifier.h5 +0 -0
- celldetective/models/signal_detection/NucCond/config_input.json +0 -1
- celldetective/models/signal_detection/NucCond/log_classifier.csv +0 -126
- celldetective/models/signal_detection/NucCond/log_regressor.csv +0 -282
- celldetective/models/signal_detection/NucCond/regression_loss.png +0 -0
- celldetective/models/signal_detection/NucCond/regressor.h5 +0 -0
- celldetective/models/signal_detection/NucCond/scores.npy +0 -0
- celldetective/models/signal_detection/NucCond/test_confusion_matrix.png +0 -0
- celldetective/models/signal_detection/NucCond/test_regression.png +0 -0
- celldetective/models/signal_detection/NucCond/validation_confusion_matrix.png +0 -0
- celldetective/models/signal_detection/NucCond/validation_regression.png +0 -0
- celldetective-1.4.0.dist-info/RECORD +0 -131
- {celldetective-1.4.0.dist-info → celldetective-1.4.1.dist-info}/WHEEL +0 -0
- {celldetective-1.4.0.dist-info → celldetective-1.4.1.dist-info}/entry_points.txt +0 -0
- {celldetective-1.4.0.dist-info → celldetective-1.4.1.dist-info}/licenses/LICENSE +0 -0
- {celldetective-1.4.0.dist-info → celldetective-1.4.1.dist-info}/top_level.txt +0 -0
celldetective/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.4.
|
|
1
|
+
__version__ = "1.4.1"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
class QueryError(Exception):
|
|
2
|
+
"""Base class for query-related errors."""
|
|
3
|
+
|
|
4
|
+
class EmptyQueryError(QueryError):
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
class MissingColumnsError(QueryError):
|
|
8
|
+
def __init__(self, missing_cols):
|
|
9
|
+
msg = f"The following columns are missing from the DataFrame: {missing_cols}"
|
|
10
|
+
super().__init__(msg)
|
|
11
|
+
self.missing_cols = missing_cols
|
celldetective/filters.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
from skimage.filters import difference_of_gaussians, threshold_otsu, threshold_local,
|
|
1
|
+
from skimage.filters import difference_of_gaussians, threshold_multiotsu, threshold_otsu, threshold_local, \
|
|
2
|
+
threshold_niblack, threshold_sauvola
|
|
2
3
|
from celldetective.utils import interpolate_nan
|
|
3
4
|
import scipy.ndimage as snd
|
|
4
5
|
import numpy as np
|
|
@@ -102,6 +103,11 @@ def otsu_filter(img, *kwargs):
|
|
|
102
103
|
binary = img >= thresh
|
|
103
104
|
return binary.astype(float)
|
|
104
105
|
|
|
106
|
+
def multiotsu_filter(img, classes=3, *kwargs):
|
|
107
|
+
thresholds = threshold_multiotsu(img, classes=classes)
|
|
108
|
+
regions = np.digitize(img, bins=thresholds)
|
|
109
|
+
return regions.astype(float)
|
|
110
|
+
|
|
105
111
|
def local_filter(img, *kwargs):
|
|
106
112
|
thresh = threshold_local(img.astype(float), *kwargs)
|
|
107
113
|
binary = img >= thresh
|
celldetective/gui/InitWindow.py
CHANGED
|
@@ -83,7 +83,10 @@ class AppInitWindow(CelldetectiveMainWindow):
|
|
|
83
83
|
self.experiment_path_selection.setDragEnabled(True)
|
|
84
84
|
self.experiment_path_selection.setFixedWidth(430)
|
|
85
85
|
self.experiment_path_selection.textChanged[str].connect(self.check_path_and_enable_opening)
|
|
86
|
-
|
|
86
|
+
try:
|
|
87
|
+
self.foldername = os.getcwd()
|
|
88
|
+
except FileNotFoundError as e:
|
|
89
|
+
self.foldername = ""
|
|
87
90
|
self.experiment_path_selection.setPlaceholderText('/path/to/experiment/folder/')
|
|
88
91
|
self.locate_exp_layout.addWidget(self.experiment_path_selection, 90)
|
|
89
92
|
|
celldetective/gui/__init__.py
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
from .styles import Styles
|
|
2
2
|
from .base_components import CelldetectiveWidget, CelldetectiveMainWindow
|
|
3
|
-
from .btrack_options import ConfigTracking
|
|
4
3
|
from .json_readers import ConfigEditor
|
|
5
4
|
from .tableUI import TableUI
|
|
6
|
-
from .measurement_options import ConfigMeasurements
|
|
7
|
-
from .neighborhood_options import ConfigNeighborhoods
|
|
8
5
|
from .classifier_widget import ClassifierWidget
|
|
9
6
|
from .survival_ui import ConfigSurvival
|
|
10
7
|
from .plot_signals_ui import ConfigSignalPlot
|
|
11
|
-
from .
|
|
12
|
-
from .
|
|
13
|
-
from .signal_annotator2 import SignalAnnotator2
|
|
14
|
-
from .retrain_signal_model_options import ConfigSignalModelTraining
|
|
15
|
-
from .retrain_segmentation_model_options import ConfigSegmentationModelTraining
|
|
8
|
+
from .event_annotator import EventAnnotator
|
|
9
|
+
from .pair_event_annotator import PairEventAnnotator
|
|
16
10
|
from .thresholds_gui import ThresholdConfigWizard
|
|
17
11
|
from .seg_model_loader import SegmentationModelLoader
|
|
18
12
|
from .process_block import ProcessPanel, NeighPanel, PreprocessingPanel
|
|
19
13
|
from .analyze_block import AnalysisPanel
|
|
20
14
|
from .control_panel import ControlPanel
|
|
21
15
|
from .configure_new_exp import ConfigNewExperiment
|
|
22
|
-
|
celldetective/gui/about.py
CHANGED
|
@@ -17,7 +17,7 @@ class AboutWidget(CelldetectiveWidget):
|
|
|
17
17
|
self.setMaximumWidth(320)
|
|
18
18
|
center_window(self)
|
|
19
19
|
|
|
20
|
-
logo = QPixmap(
|
|
20
|
+
logo = QPixmap(self.celldetective_logo_path)
|
|
21
21
|
|
|
22
22
|
# Create the layout
|
|
23
23
|
layout = QVBoxLayout(self)
|
|
@@ -31,7 +31,7 @@ class AboutWidget(CelldetectiveWidget):
|
|
|
31
31
|
""")
|
|
32
32
|
layout.addWidget(self.soft_name, alignment=Qt.AlignCenter)
|
|
33
33
|
|
|
34
|
-
self.version_lbl = QLabel(f"Version {__version__} <a href=\"https://github.com/
|
|
34
|
+
self.version_lbl = QLabel(f"Version {__version__} <a href=\"https://github.com/celldetective/celldetective"
|
|
35
35
|
f"/releases\">(release notes)</a>")
|
|
36
36
|
self.version_lbl.setOpenExternalLinks(True)
|
|
37
37
|
layout.addWidget(self.version_lbl, alignment=Qt.AlignCenter)
|