celldetective 1.0.2__tar.gz → 1.1.0__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.
- celldetective-1.1.0/PKG-INFO +306 -0
- celldetective-1.1.0/README.md +267 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/__main__.py +2 -2
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/events.py +2 -44
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/filters.py +4 -5
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/__init__.py +1 -1
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/analyze_block.py +37 -10
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/btrack_options.py +24 -23
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/classifier_widget.py +62 -19
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/configure_new_exp.py +32 -35
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/control_panel.py +115 -81
- celldetective-1.1.0/celldetective/gui/gui_utils.py +773 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/json_readers.py +7 -6
- celldetective-1.1.0/celldetective/gui/layouts.py +755 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/measurement_options.py +168 -487
- celldetective-1.1.0/celldetective/gui/neighborhood_options.py +504 -0
- celldetective-1.1.0/celldetective/gui/plot_measurements.py +1114 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/plot_signals_ui.py +20 -20
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/process_block.py +449 -169
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/retrain_segmentation_model_options.py +27 -26
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/retrain_signal_model_options.py +25 -24
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/seg_model_loader.py +31 -27
- celldetective-1.1.0/celldetective/gui/signal_annotator.py +2419 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/signal_annotator_options.py +18 -16
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/styles.py +16 -1
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/survival_ui.py +61 -39
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/tableUI.py +60 -23
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/thresholds_gui.py +68 -66
- celldetective-1.1.0/celldetective/gui/viewers.py +596 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/io.py +234 -23
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/measure.py +37 -32
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/neighborhood.py +495 -27
- celldetective-1.1.0/celldetective/preprocessing.py +683 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/scripts/analyze_signals.py +7 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/scripts/measure_cells.py +12 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/scripts/segment_cells.py +5 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/scripts/track_cells.py +11 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/signals.py +221 -98
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/tracking.py +0 -1
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/utils.py +178 -36
- celldetective-1.1.0/celldetective.egg-info/PKG-INFO +306 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective.egg-info/SOURCES.txt +17 -2
- celldetective-1.1.0/celldetective.egg-info/requires.txt +28 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective.egg-info/top_level.txt +1 -0
- celldetective-1.1.0/setup.py +40 -0
- celldetective-1.1.0/tests/__init__.py +0 -0
- celldetective-1.1.0/tests/test_events.py +28 -0
- celldetective-1.1.0/tests/test_filters.py +24 -0
- celldetective-1.1.0/tests/test_io.py +70 -0
- celldetective-1.1.0/tests/test_measure.py +141 -0
- celldetective-1.1.0/tests/test_neighborhood.py +70 -0
- celldetective-1.1.0/tests/test_segmentation.py +93 -0
- celldetective-1.1.0/tests/test_signals.py +135 -0
- celldetective-1.1.0/tests/test_tracking.py +164 -0
- celldetective-1.1.0/tests/test_utils.py +71 -0
- celldetective-1.0.2/PKG-INFO +0 -192
- celldetective-1.0.2/README.rst +0 -181
- celldetective-1.0.2/celldetective/gui/gui_utils.py +0 -495
- celldetective-1.0.2/celldetective/gui/neighborhood_options.py +0 -452
- celldetective-1.0.2/celldetective/gui/signal_annotator.py +0 -2388
- celldetective-1.0.2/celldetective.egg-info/PKG-INFO +0 -192
- celldetective-1.0.2/setup.py +0 -21
- {celldetective-1.0.2 → celldetective-1.1.0}/LICENSE +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/__init__.py +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/datasets/segmentation_annotations/blank +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/datasets/signal_annotations/blank +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/extra_properties.py +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/gui/about.py +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/icons/logo-large.png +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/icons/logo.png +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/icons/signals_icon.png +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/icons/splash-test.png +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/icons/splash.png +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/icons/splash0.png +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/icons/survival2.png +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/icons/vignette_signals2.png +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/icons/vignette_signals2.svg +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/links/zenodo.json +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/models/segmentation_effectors/blank +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/models/segmentation_generic/blank +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/models/segmentation_targets/blank +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/models/signal_detection/blank +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/models/tracking_configs/mcf7.json +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/models/tracking_configs/ricm.json +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/models/tracking_configs/ricm2.json +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/scripts/segment_cells_thresholds.py +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/scripts/train_segmentation_model.py +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/scripts/train_signal_model.py +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective/segmentation.py +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective.egg-info/dependency_links.txt +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective.egg-info/entry_points.txt +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/celldetective.egg-info/not-zip-safe +0 -0
- {celldetective-1.0.2 → celldetective-1.1.0}/setup.cfg +0 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: celldetective
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: description
|
|
5
|
+
Home-page: http://github.com/remyeltorro/celldetective
|
|
6
|
+
Author: Rémy Torro
|
|
7
|
+
Author-email: remy.torro@inserm.fr
|
|
8
|
+
License: GPL-3.0
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: wheel
|
|
12
|
+
Requires-Dist: nbsphinx
|
|
13
|
+
Requires-Dist: nbsphinx_link
|
|
14
|
+
Requires-Dist: sphinx_rtd_theme
|
|
15
|
+
Requires-Dist: sphinx==5.0.2
|
|
16
|
+
Requires-Dist: jinja2<3.1
|
|
17
|
+
Requires-Dist: ipykernel
|
|
18
|
+
Requires-Dist: stardist
|
|
19
|
+
Requires-Dist: cellpose<3
|
|
20
|
+
Requires-Dist: scikit-learn
|
|
21
|
+
Requires-Dist: btrack
|
|
22
|
+
Requires-Dist: tensorflow<=2.12.1
|
|
23
|
+
Requires-Dist: napari
|
|
24
|
+
Requires-Dist: tqdm
|
|
25
|
+
Requires-Dist: mahotas
|
|
26
|
+
Requires-Dist: fonticon-materialdesignicons6
|
|
27
|
+
Requires-Dist: art
|
|
28
|
+
Requires-Dist: lifelines
|
|
29
|
+
Requires-Dist: setuptools
|
|
30
|
+
Requires-Dist: scipy
|
|
31
|
+
Requires-Dist: seaborn
|
|
32
|
+
Requires-Dist: opencv-python-headless==4.7.0.72
|
|
33
|
+
Requires-Dist: liblapack
|
|
34
|
+
Requires-Dist: gputools
|
|
35
|
+
Requires-Dist: lmfit~=1.2.2
|
|
36
|
+
Requires-Dist: superqt[cmap]>=0.6.1
|
|
37
|
+
Requires-Dist: setuptools
|
|
38
|
+
Requires-Dist: matplotlib_scalebar
|
|
39
|
+
|
|
40
|
+
# Celldetective
|
|
41
|
+
|
|
42
|
+
<embed>
|
|
43
|
+
<p align="center">
|
|
44
|
+
<img src="https://github.com/remyeltorro/celldetective/blob/main/celldetective/icons/logo-large.png" width="33%" />
|
|
45
|
+
</p>
|
|
46
|
+
</embed>
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+

|
|
50
|
+

|
|
51
|
+

|
|
52
|
+

|
|
53
|
+

|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
Celldetective is a python package and software to perform single-cell
|
|
57
|
+
analysis on multimodal time lapse microscopy images.
|
|
58
|
+
|
|
59
|
+
- **Documentation:** <https://celldetective.readthedocs.io>
|
|
60
|
+
- **Source code:** <https://github.com/remyeltorro/celldetective>
|
|
61
|
+
- **Bug reports:**
|
|
62
|
+
<https://github.com/remyeltorro/celldetective/issues/new/choose>
|
|
63
|
+
- **Datasets, models and demos:**
|
|
64
|
+
<https://zenodo.org/records/10650279>
|
|
65
|
+
|
|
66
|
+
## Overview
|
|
67
|
+
|
|
68
|
+
<embed>
|
|
69
|
+
<p align="center">
|
|
70
|
+
<img src="https://github.com/remyeltorro/celldetective/blob/main/docs/source/_static/celldetective-blocks.png" width="90%" />
|
|
71
|
+
</p>
|
|
72
|
+
</embed>
|
|
73
|
+
|
|
74
|
+
Despite notable efforts in the development of user-friendly softwares
|
|
75
|
+
that integrate state-of-the-art solutions to perform single cell
|
|
76
|
+
analysis, very few are designed for time-lapse data and even less for
|
|
77
|
+
multimodal problems where cells populations are mixed and can only be
|
|
78
|
+
separated through the use of multimodal information. Few software
|
|
79
|
+
solutions provide, to our knowledge, the extraction of response
|
|
80
|
+
functions from single cell events such as the dynamic survival of a
|
|
81
|
+
population directly in the GUI, as coding skills are usually required to
|
|
82
|
+
do so. We want to study complex data which is often multimodal time
|
|
83
|
+
lapse microscopy images of interacting cell populations, without loss of
|
|
84
|
+
generality. With a high need for an easy-to-use,
|
|
85
|
+
no-coding-skill-required software adapted to images and intended for
|
|
86
|
+
biologists, we introduce **Celldetective**, an open-source python-based
|
|
87
|
+
software with the following highlight features:
|
|
88
|
+
|
|
89
|
+
- **Comprehensive single-cell image analysis** : Celldetective ships
|
|
90
|
+
segmentation, tracking, and measurement modules, as well as event
|
|
91
|
+
detection from single-cell signals, for up to two populations of
|
|
92
|
+
interest.
|
|
93
|
+
- **Integration of state-of-the-art solutions** : Celldetective
|
|
94
|
+
harnesses state-of-the-art segmentation techniques (StarDist[^1],
|
|
95
|
+
Cellpose[^2] ,[^3]) and tracking algorithm (bTrack[^4]), as well as
|
|
96
|
+
the napari viewer[^5] where applicable. These algorithms are
|
|
97
|
+
interfaced to be well integrated and accessible for the target
|
|
98
|
+
audience, in the context of complex biological applications.
|
|
99
|
+
- **A framework for event description and annotations** : we propose a
|
|
100
|
+
broad and intuitive framework to annotate and automate the detection
|
|
101
|
+
of events from single-cell signals through Deep Learning signal
|
|
102
|
+
classification and regression. The event formulation is directly
|
|
103
|
+
exploited to define population survival responses.
|
|
104
|
+
- **A neighborhood scheme to study cell-cell interactions** : we
|
|
105
|
+
introduce a neighborhood scheme to relate the spatio-temporal
|
|
106
|
+
distribution and measurements of two cell populations, allowing the
|
|
107
|
+
study of how cell-cell interactions affect single-cell and
|
|
108
|
+
population responses.
|
|
109
|
+
- **Deep Learning customization in GUI** : Celldetective facilitates
|
|
110
|
+
the specialization of Deep Learning models or the creation of new
|
|
111
|
+
ones adapted to user data, by facilitating the creation of training
|
|
112
|
+
sets and the training of such models, without having to write a
|
|
113
|
+
single line of code.
|
|
114
|
+
- **In-software analysis** : Celldetective ships visualization tools
|
|
115
|
+
to collapse single-cell signals with respect to an event, build
|
|
116
|
+
survival curves, compare measurement distributions across biological
|
|
117
|
+
conditions.
|
|
118
|
+
- **A library of segmentation and signal models**: we created specific
|
|
119
|
+
models to investigate a co-culture of MCF-7 cells and primary NK
|
|
120
|
+
cells, that are available directly is the software with a large
|
|
121
|
+
collection of generalist models developed by the StarDist and
|
|
122
|
+
Cellpose teams, which are a perfect starting point to segment single
|
|
123
|
+
cells in a new biological system.
|
|
124
|
+
- **Accessible and open source** : Celldetective does not require any
|
|
125
|
+
coding skills. The software, its models and datasets are made fully
|
|
126
|
+
open source to encourage transparency and reproducibility.
|
|
127
|
+
|
|
128
|
+
<embed>
|
|
129
|
+
<p align="center">
|
|
130
|
+
<img src="https://github.com/remyeltorro/celldetective/blob/main/docs/source/_static/signal-annotator.gif" width="90%" />
|
|
131
|
+
</p>
|
|
132
|
+
</embed>
|
|
133
|
+
|
|
134
|
+
# System requirements
|
|
135
|
+
|
|
136
|
+
## Hardware requirements
|
|
137
|
+
|
|
138
|
+
The software was tested on several machines, including:
|
|
139
|
+
|
|
140
|
+
- An Intel(R) Core(TM) i9-10850K CPU @ 3.60GHz, with a single NVIDIA
|
|
141
|
+
GeForce RTX 3070 (8 Gb of memory) and 16 Gb of memory
|
|
142
|
+
- An Intel(R) Core(TM) i7-9750H CPU @ 2.60 GHz, with 16 Gb of memory
|
|
143
|
+
|
|
144
|
+
In GPU mode, succesive segmentation and DL signal analysis could be
|
|
145
|
+
performed without saturating the GPU memory thanks to the subprocess
|
|
146
|
+
formulation for the different modules. The GPU can be disabled in the
|
|
147
|
+
startup window. The software does not require a GPU (but model inference
|
|
148
|
+
will be longer). A typical analysis of a single movie with a GPU takes
|
|
149
|
+
between 5 to 15 minutes. Depending on the number of cells and frames on
|
|
150
|
+
the images, this computation time can increase to the order of half an
|
|
151
|
+
hour on a CPU.
|
|
152
|
+
|
|
153
|
+
The memory must be sufficient to load a movie stack at once in order to
|
|
154
|
+
visualize it in napari. Otherwise, processing is performed frame by
|
|
155
|
+
frame, therefore the memory required is extremely low.
|
|
156
|
+
|
|
157
|
+
## Software requirements
|
|
158
|
+
|
|
159
|
+
The software was developed simulateously on Ubuntu 20.04 and Windows 11.
|
|
160
|
+
It was tested on MacOS, but Tensorflow installation can rquire extra
|
|
161
|
+
steps.
|
|
162
|
+
|
|
163
|
+
- Linux: Ubuntu 20.04.6 LTS (Focal Fossa) (not tested on ulterior
|
|
164
|
+
versions)
|
|
165
|
+
- Windows: Windows 11 Home 23H2
|
|
166
|
+
|
|
167
|
+
To use the software, you must install python, *e.g.* through
|
|
168
|
+
[Anaconda](https://www.anaconda.com/download). We developed and tested
|
|
169
|
+
the software in Python 3.9.18.
|
|
170
|
+
|
|
171
|
+
# Installation
|
|
172
|
+
|
|
173
|
+
## Stable release
|
|
174
|
+
|
|
175
|
+
Celldetective can be installed with `pip`:
|
|
176
|
+
|
|
177
|
+
``` bash
|
|
178
|
+
pip install celldetective
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
We recommend that you create an environment to use Celldetective, *e.g.*
|
|
182
|
+
with `conda`:
|
|
183
|
+
|
|
184
|
+
``` bash
|
|
185
|
+
conda create -n celldetective python=3.9.18 pyqt
|
|
186
|
+
conda activate celldetective
|
|
187
|
+
pip install celldetective
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Need an update? Simply type the following in the terminal (in your
|
|
191
|
+
environment):
|
|
192
|
+
|
|
193
|
+
``` bash
|
|
194
|
+
pip install --upgrade celldetective
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Development version
|
|
198
|
+
|
|
199
|
+
### From GitHub
|
|
200
|
+
|
|
201
|
+
If you want to run the latest development version, you can clone the
|
|
202
|
+
repository to your local machine and install Celldetective in
|
|
203
|
+
"development" mode. This means that any changes to the cloned repository
|
|
204
|
+
will be immediately available in the python environment:
|
|
205
|
+
|
|
206
|
+
``` bash
|
|
207
|
+
# creates "celldetective" folder
|
|
208
|
+
git clone git://github.com/remyeltorro/celldetective.git
|
|
209
|
+
cd celldetective
|
|
210
|
+
|
|
211
|
+
# install the celldetective package in editable/development mode
|
|
212
|
+
pip install -r requirements.txt
|
|
213
|
+
pip install -e .
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
To run the latest development version without cloning the repository,
|
|
217
|
+
you can also use this line:
|
|
218
|
+
|
|
219
|
+
``` bash
|
|
220
|
+
pip install git+https//github.com/remyeltorro/celldetective.git
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### From a zip file
|
|
224
|
+
|
|
225
|
+
You can also download the repository as a compressed file. Unzip the
|
|
226
|
+
file and open a terminal at the root of the folder (same level as the
|
|
227
|
+
file requirements.txt). We recommend that you create a python
|
|
228
|
+
environment as Celldetective relies on many packages that may interfere
|
|
229
|
+
with package requirements for other projects. Run the following lines to
|
|
230
|
+
create an environment named \"celldetective\":
|
|
231
|
+
|
|
232
|
+
``` bash
|
|
233
|
+
conda create -n celldetective python=3.9.18 pyqt
|
|
234
|
+
conda activate celldetective
|
|
235
|
+
pip install -r requirements.txt
|
|
236
|
+
pip install .
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
The installation of the dependencies will take a few minutes (up to half
|
|
240
|
+
an hour if the network is bad). The Celldetective package itself is
|
|
241
|
+
light and installs in a few seconds.
|
|
242
|
+
|
|
243
|
+
Before launching the software, move to a different directory as running
|
|
244
|
+
the package locally can create some bugs when locating the models.
|
|
245
|
+
|
|
246
|
+
# Quick start
|
|
247
|
+
|
|
248
|
+
You can launch the GUI by 1) opening a terminal and 2) typing the
|
|
249
|
+
following:
|
|
250
|
+
|
|
251
|
+
``` bash
|
|
252
|
+
python -m celldetective
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
# Documentation
|
|
256
|
+
|
|
257
|
+
Read the tutorial here:
|
|
258
|
+
|
|
259
|
+
<https://celldetective.readthedocs.io/>
|
|
260
|
+
|
|
261
|
+
# How to cite?
|
|
262
|
+
|
|
263
|
+
If you use this software in your research, please cite the
|
|
264
|
+
[Celldetective](https://www.biorxiv.org/content/10.1101/2024.03.15.585250v1)
|
|
265
|
+
paper (currently preprint):
|
|
266
|
+
|
|
267
|
+
``` raw
|
|
268
|
+
@article {Torro2024.03.15.585250,
|
|
269
|
+
author = {R{\'e}my Torro and Beatriz D{\`\i}az-Bello and Dalia El Arawi and Lorna Ammer and Patrick Chames and Kheya Sengupta and Laurent Limozin},
|
|
270
|
+
title = {Celldetective: an AI-enhanced image analysis tool for unraveling dynamic cell interactions},
|
|
271
|
+
elocation-id = {2024.03.15.585250},
|
|
272
|
+
year = {2024},
|
|
273
|
+
doi = {10.1101/2024.03.15.585250},
|
|
274
|
+
publisher = {Cold Spring Harbor Laboratory},
|
|
275
|
+
abstract = {A current key challenge in bioimaging is the analysis of multimodal and multidimensional data reporting dynamic interactions between diverse cell populations. We developed Celldetective, a software that integrates AI-based segmentation and tracking algorithms and automated signal analysis into a user-friendly graphical interface. It offers complete interactive visualization, annotation, and training capabilities. We demonstrate it by analyzing original experimental data of spreading immune effector cells as well as antibody-dependent cell cytotoxicity events using multimodal fluorescence microscopy.Competing Interest StatementThe authors have declared no competing interest.},
|
|
276
|
+
URL = {https://www.biorxiv.org/content/early/2024/03/17/2024.03.15.585250},
|
|
277
|
+
eprint = {https://www.biorxiv.org/content/early/2024/03/17/2024.03.15.585250.full.pdf},
|
|
278
|
+
journal = {bioRxiv}
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Make sure you to cite the papers of any segmentation model (StarDist,
|
|
283
|
+
Cellpose) or tracker (bTrack) you used through Celldetective.
|
|
284
|
+
|
|
285
|
+
# Bibliography
|
|
286
|
+
|
|
287
|
+
[^1]: Schmidt, U., Weigert, M., Broaddus, C. & Myers, G. Cell Detection
|
|
288
|
+
with Star-Convex Polygons. in Medical Image Computing and Computer
|
|
289
|
+
Assisted Intervention -- MICCAI 2018 (eds. Frangi, A. F., Schnabel,
|
|
290
|
+
J. A., Davatzikos, C., Alberola-López, C. & Fichtinger, G.) 265--273
|
|
291
|
+
(Springer International Publishing, Cham, 2018).
|
|
292
|
+
<doi:10.1007/978-3-030-00934-2_30>.
|
|
293
|
+
|
|
294
|
+
[^2]: Stringer, C., Wang, T., Michaelos, M. & Pachitariu, M. Cellpose: a
|
|
295
|
+
generalist algorithm for cellular segmentation. Nat Methods 18,
|
|
296
|
+
100--106 (2021).
|
|
297
|
+
|
|
298
|
+
[^3]: Pachitariu, M. & Stringer, C. Cellpose 2.0: how to train your own
|
|
299
|
+
model. Nat Methods 19, 1634--1641 (2022).
|
|
300
|
+
|
|
301
|
+
[^4]: Ulicna, K., Vallardi, G., Charras, G. & Lowe, A. R. Automated Deep
|
|
302
|
+
Lineage Tree Analysis Using a Bayesian Single Cell Tracking
|
|
303
|
+
Approach. Frontiers in Computer Science 3, (2021).
|
|
304
|
+
|
|
305
|
+
[^5]: Ahlers, J. et al. napari: a multi-dimensional image viewer for
|
|
306
|
+
Python. Zenodo <https://doi.org/10.5281/zenodo.8115575> (2023).
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# Celldetective
|
|
2
|
+
|
|
3
|
+
<embed>
|
|
4
|
+
<p align="center">
|
|
5
|
+
<img src="https://github.com/remyeltorro/celldetective/blob/main/celldetective/icons/logo-large.png" width="33%" />
|
|
6
|
+
</p>
|
|
7
|
+
</embed>
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
Celldetective is a python package and software to perform single-cell
|
|
18
|
+
analysis on multimodal time lapse microscopy images.
|
|
19
|
+
|
|
20
|
+
- **Documentation:** <https://celldetective.readthedocs.io>
|
|
21
|
+
- **Source code:** <https://github.com/remyeltorro/celldetective>
|
|
22
|
+
- **Bug reports:**
|
|
23
|
+
<https://github.com/remyeltorro/celldetective/issues/new/choose>
|
|
24
|
+
- **Datasets, models and demos:**
|
|
25
|
+
<https://zenodo.org/records/10650279>
|
|
26
|
+
|
|
27
|
+
## Overview
|
|
28
|
+
|
|
29
|
+
<embed>
|
|
30
|
+
<p align="center">
|
|
31
|
+
<img src="https://github.com/remyeltorro/celldetective/blob/main/docs/source/_static/celldetective-blocks.png" width="90%" />
|
|
32
|
+
</p>
|
|
33
|
+
</embed>
|
|
34
|
+
|
|
35
|
+
Despite notable efforts in the development of user-friendly softwares
|
|
36
|
+
that integrate state-of-the-art solutions to perform single cell
|
|
37
|
+
analysis, very few are designed for time-lapse data and even less for
|
|
38
|
+
multimodal problems where cells populations are mixed and can only be
|
|
39
|
+
separated through the use of multimodal information. Few software
|
|
40
|
+
solutions provide, to our knowledge, the extraction of response
|
|
41
|
+
functions from single cell events such as the dynamic survival of a
|
|
42
|
+
population directly in the GUI, as coding skills are usually required to
|
|
43
|
+
do so. We want to study complex data which is often multimodal time
|
|
44
|
+
lapse microscopy images of interacting cell populations, without loss of
|
|
45
|
+
generality. With a high need for an easy-to-use,
|
|
46
|
+
no-coding-skill-required software adapted to images and intended for
|
|
47
|
+
biologists, we introduce **Celldetective**, an open-source python-based
|
|
48
|
+
software with the following highlight features:
|
|
49
|
+
|
|
50
|
+
- **Comprehensive single-cell image analysis** : Celldetective ships
|
|
51
|
+
segmentation, tracking, and measurement modules, as well as event
|
|
52
|
+
detection from single-cell signals, for up to two populations of
|
|
53
|
+
interest.
|
|
54
|
+
- **Integration of state-of-the-art solutions** : Celldetective
|
|
55
|
+
harnesses state-of-the-art segmentation techniques (StarDist[^1],
|
|
56
|
+
Cellpose[^2] ,[^3]) and tracking algorithm (bTrack[^4]), as well as
|
|
57
|
+
the napari viewer[^5] where applicable. These algorithms are
|
|
58
|
+
interfaced to be well integrated and accessible for the target
|
|
59
|
+
audience, in the context of complex biological applications.
|
|
60
|
+
- **A framework for event description and annotations** : we propose a
|
|
61
|
+
broad and intuitive framework to annotate and automate the detection
|
|
62
|
+
of events from single-cell signals through Deep Learning signal
|
|
63
|
+
classification and regression. The event formulation is directly
|
|
64
|
+
exploited to define population survival responses.
|
|
65
|
+
- **A neighborhood scheme to study cell-cell interactions** : we
|
|
66
|
+
introduce a neighborhood scheme to relate the spatio-temporal
|
|
67
|
+
distribution and measurements of two cell populations, allowing the
|
|
68
|
+
study of how cell-cell interactions affect single-cell and
|
|
69
|
+
population responses.
|
|
70
|
+
- **Deep Learning customization in GUI** : Celldetective facilitates
|
|
71
|
+
the specialization of Deep Learning models or the creation of new
|
|
72
|
+
ones adapted to user data, by facilitating the creation of training
|
|
73
|
+
sets and the training of such models, without having to write a
|
|
74
|
+
single line of code.
|
|
75
|
+
- **In-software analysis** : Celldetective ships visualization tools
|
|
76
|
+
to collapse single-cell signals with respect to an event, build
|
|
77
|
+
survival curves, compare measurement distributions across biological
|
|
78
|
+
conditions.
|
|
79
|
+
- **A library of segmentation and signal models**: we created specific
|
|
80
|
+
models to investigate a co-culture of MCF-7 cells and primary NK
|
|
81
|
+
cells, that are available directly is the software with a large
|
|
82
|
+
collection of generalist models developed by the StarDist and
|
|
83
|
+
Cellpose teams, which are a perfect starting point to segment single
|
|
84
|
+
cells in a new biological system.
|
|
85
|
+
- **Accessible and open source** : Celldetective does not require any
|
|
86
|
+
coding skills. The software, its models and datasets are made fully
|
|
87
|
+
open source to encourage transparency and reproducibility.
|
|
88
|
+
|
|
89
|
+
<embed>
|
|
90
|
+
<p align="center">
|
|
91
|
+
<img src="https://github.com/remyeltorro/celldetective/blob/main/docs/source/_static/signal-annotator.gif" width="90%" />
|
|
92
|
+
</p>
|
|
93
|
+
</embed>
|
|
94
|
+
|
|
95
|
+
# System requirements
|
|
96
|
+
|
|
97
|
+
## Hardware requirements
|
|
98
|
+
|
|
99
|
+
The software was tested on several machines, including:
|
|
100
|
+
|
|
101
|
+
- An Intel(R) Core(TM) i9-10850K CPU @ 3.60GHz, with a single NVIDIA
|
|
102
|
+
GeForce RTX 3070 (8 Gb of memory) and 16 Gb of memory
|
|
103
|
+
- An Intel(R) Core(TM) i7-9750H CPU @ 2.60 GHz, with 16 Gb of memory
|
|
104
|
+
|
|
105
|
+
In GPU mode, succesive segmentation and DL signal analysis could be
|
|
106
|
+
performed without saturating the GPU memory thanks to the subprocess
|
|
107
|
+
formulation for the different modules. The GPU can be disabled in the
|
|
108
|
+
startup window. The software does not require a GPU (but model inference
|
|
109
|
+
will be longer). A typical analysis of a single movie with a GPU takes
|
|
110
|
+
between 5 to 15 minutes. Depending on the number of cells and frames on
|
|
111
|
+
the images, this computation time can increase to the order of half an
|
|
112
|
+
hour on a CPU.
|
|
113
|
+
|
|
114
|
+
The memory must be sufficient to load a movie stack at once in order to
|
|
115
|
+
visualize it in napari. Otherwise, processing is performed frame by
|
|
116
|
+
frame, therefore the memory required is extremely low.
|
|
117
|
+
|
|
118
|
+
## Software requirements
|
|
119
|
+
|
|
120
|
+
The software was developed simulateously on Ubuntu 20.04 and Windows 11.
|
|
121
|
+
It was tested on MacOS, but Tensorflow installation can rquire extra
|
|
122
|
+
steps.
|
|
123
|
+
|
|
124
|
+
- Linux: Ubuntu 20.04.6 LTS (Focal Fossa) (not tested on ulterior
|
|
125
|
+
versions)
|
|
126
|
+
- Windows: Windows 11 Home 23H2
|
|
127
|
+
|
|
128
|
+
To use the software, you must install python, *e.g.* through
|
|
129
|
+
[Anaconda](https://www.anaconda.com/download). We developed and tested
|
|
130
|
+
the software in Python 3.9.18.
|
|
131
|
+
|
|
132
|
+
# Installation
|
|
133
|
+
|
|
134
|
+
## Stable release
|
|
135
|
+
|
|
136
|
+
Celldetective can be installed with `pip`:
|
|
137
|
+
|
|
138
|
+
``` bash
|
|
139
|
+
pip install celldetective
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
We recommend that you create an environment to use Celldetective, *e.g.*
|
|
143
|
+
with `conda`:
|
|
144
|
+
|
|
145
|
+
``` bash
|
|
146
|
+
conda create -n celldetective python=3.9.18 pyqt
|
|
147
|
+
conda activate celldetective
|
|
148
|
+
pip install celldetective
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Need an update? Simply type the following in the terminal (in your
|
|
152
|
+
environment):
|
|
153
|
+
|
|
154
|
+
``` bash
|
|
155
|
+
pip install --upgrade celldetective
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Development version
|
|
159
|
+
|
|
160
|
+
### From GitHub
|
|
161
|
+
|
|
162
|
+
If you want to run the latest development version, you can clone the
|
|
163
|
+
repository to your local machine and install Celldetective in
|
|
164
|
+
"development" mode. This means that any changes to the cloned repository
|
|
165
|
+
will be immediately available in the python environment:
|
|
166
|
+
|
|
167
|
+
``` bash
|
|
168
|
+
# creates "celldetective" folder
|
|
169
|
+
git clone git://github.com/remyeltorro/celldetective.git
|
|
170
|
+
cd celldetective
|
|
171
|
+
|
|
172
|
+
# install the celldetective package in editable/development mode
|
|
173
|
+
pip install -r requirements.txt
|
|
174
|
+
pip install -e .
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
To run the latest development version without cloning the repository,
|
|
178
|
+
you can also use this line:
|
|
179
|
+
|
|
180
|
+
``` bash
|
|
181
|
+
pip install git+https//github.com/remyeltorro/celldetective.git
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### From a zip file
|
|
185
|
+
|
|
186
|
+
You can also download the repository as a compressed file. Unzip the
|
|
187
|
+
file and open a terminal at the root of the folder (same level as the
|
|
188
|
+
file requirements.txt). We recommend that you create a python
|
|
189
|
+
environment as Celldetective relies on many packages that may interfere
|
|
190
|
+
with package requirements for other projects. Run the following lines to
|
|
191
|
+
create an environment named \"celldetective\":
|
|
192
|
+
|
|
193
|
+
``` bash
|
|
194
|
+
conda create -n celldetective python=3.9.18 pyqt
|
|
195
|
+
conda activate celldetective
|
|
196
|
+
pip install -r requirements.txt
|
|
197
|
+
pip install .
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The installation of the dependencies will take a few minutes (up to half
|
|
201
|
+
an hour if the network is bad). The Celldetective package itself is
|
|
202
|
+
light and installs in a few seconds.
|
|
203
|
+
|
|
204
|
+
Before launching the software, move to a different directory as running
|
|
205
|
+
the package locally can create some bugs when locating the models.
|
|
206
|
+
|
|
207
|
+
# Quick start
|
|
208
|
+
|
|
209
|
+
You can launch the GUI by 1) opening a terminal and 2) typing the
|
|
210
|
+
following:
|
|
211
|
+
|
|
212
|
+
``` bash
|
|
213
|
+
python -m celldetective
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
# Documentation
|
|
217
|
+
|
|
218
|
+
Read the tutorial here:
|
|
219
|
+
|
|
220
|
+
<https://celldetective.readthedocs.io/>
|
|
221
|
+
|
|
222
|
+
# How to cite?
|
|
223
|
+
|
|
224
|
+
If you use this software in your research, please cite the
|
|
225
|
+
[Celldetective](https://www.biorxiv.org/content/10.1101/2024.03.15.585250v1)
|
|
226
|
+
paper (currently preprint):
|
|
227
|
+
|
|
228
|
+
``` raw
|
|
229
|
+
@article {Torro2024.03.15.585250,
|
|
230
|
+
author = {R{\'e}my Torro and Beatriz D{\`\i}az-Bello and Dalia El Arawi and Lorna Ammer and Patrick Chames and Kheya Sengupta and Laurent Limozin},
|
|
231
|
+
title = {Celldetective: an AI-enhanced image analysis tool for unraveling dynamic cell interactions},
|
|
232
|
+
elocation-id = {2024.03.15.585250},
|
|
233
|
+
year = {2024},
|
|
234
|
+
doi = {10.1101/2024.03.15.585250},
|
|
235
|
+
publisher = {Cold Spring Harbor Laboratory},
|
|
236
|
+
abstract = {A current key challenge in bioimaging is the analysis of multimodal and multidimensional data reporting dynamic interactions between diverse cell populations. We developed Celldetective, a software that integrates AI-based segmentation and tracking algorithms and automated signal analysis into a user-friendly graphical interface. It offers complete interactive visualization, annotation, and training capabilities. We demonstrate it by analyzing original experimental data of spreading immune effector cells as well as antibody-dependent cell cytotoxicity events using multimodal fluorescence microscopy.Competing Interest StatementThe authors have declared no competing interest.},
|
|
237
|
+
URL = {https://www.biorxiv.org/content/early/2024/03/17/2024.03.15.585250},
|
|
238
|
+
eprint = {https://www.biorxiv.org/content/early/2024/03/17/2024.03.15.585250.full.pdf},
|
|
239
|
+
journal = {bioRxiv}
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Make sure you to cite the papers of any segmentation model (StarDist,
|
|
244
|
+
Cellpose) or tracker (bTrack) you used through Celldetective.
|
|
245
|
+
|
|
246
|
+
# Bibliography
|
|
247
|
+
|
|
248
|
+
[^1]: Schmidt, U., Weigert, M., Broaddus, C. & Myers, G. Cell Detection
|
|
249
|
+
with Star-Convex Polygons. in Medical Image Computing and Computer
|
|
250
|
+
Assisted Intervention -- MICCAI 2018 (eds. Frangi, A. F., Schnabel,
|
|
251
|
+
J. A., Davatzikos, C., Alberola-López, C. & Fichtinger, G.) 265--273
|
|
252
|
+
(Springer International Publishing, Cham, 2018).
|
|
253
|
+
<doi:10.1007/978-3-030-00934-2_30>.
|
|
254
|
+
|
|
255
|
+
[^2]: Stringer, C., Wang, T., Michaelos, M. & Pachitariu, M. Cellpose: a
|
|
256
|
+
generalist algorithm for cellular segmentation. Nat Methods 18,
|
|
257
|
+
100--106 (2021).
|
|
258
|
+
|
|
259
|
+
[^3]: Pachitariu, M. & Stringer, C. Cellpose 2.0: how to train your own
|
|
260
|
+
model. Nat Methods 19, 1634--1641 (2022).
|
|
261
|
+
|
|
262
|
+
[^4]: Ulicna, K., Vallardi, G., Charras, G. & Lowe, A. R. Automated Deep
|
|
263
|
+
Lineage Tree Analysis Using a Bayesian Single Cell Tracking
|
|
264
|
+
Approach. Frontiers in Computer Science 3, (2021).
|
|
265
|
+
|
|
266
|
+
[^5]: Ahlers, J. et al. napari: a multi-dimensional image viewer for
|
|
267
|
+
Python. Zenodo <https://doi.org/10.5281/zenodo.8115575> (2023).
|
|
@@ -15,10 +15,10 @@ class AppInitWindow(QMainWindow):
|
|
|
15
15
|
Initial window to set the experiment folder or create a new one.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
def __init__(self,
|
|
18
|
+
def __init__(self, parent_window=None):
|
|
19
19
|
super().__init__()
|
|
20
20
|
|
|
21
|
-
self.
|
|
21
|
+
self.parent_window = parent_window
|
|
22
22
|
self.Styles = Styles()
|
|
23
23
|
self.init_styles()
|
|
24
24
|
self.setWindowTitle("celldetective")
|
|
@@ -1,49 +1,7 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
|
|
3
|
-
def switch_to_events(classes, times, max_times, first_detections=None, left_censored=False, FrameToMin=None):
|
|
4
|
-
|
|
5
|
-
events = []
|
|
6
|
-
survival_times = []
|
|
7
|
-
if first_detections is None:
|
|
8
|
-
first_detections = np.zeros_like(max_times)
|
|
9
|
-
|
|
10
|
-
for c,t,mt,ft in zip(classes, times, max_times, first_detections):
|
|
11
|
-
|
|
12
|
-
if left_censored:
|
|
13
|
-
#print('left censored is True: exclude cells that exist in first frame')
|
|
14
|
-
if ft>0.:
|
|
15
|
-
if c==0:
|
|
16
|
-
if t>0:
|
|
17
|
-
dt = t - ft
|
|
18
|
-
#print('event: dt = ',dt, t, ft)
|
|
19
|
-
if dt>0:
|
|
20
|
-
events.append(1)
|
|
21
|
-
survival_times.append(dt)
|
|
22
|
-
elif c==1:
|
|
23
|
-
dt = mt - ft
|
|
24
|
-
if dt>0:
|
|
25
|
-
events.append(0)
|
|
26
|
-
survival_times.append(dt)
|
|
27
|
-
else:
|
|
28
|
-
pass
|
|
29
|
-
else:
|
|
30
|
-
if c==0:
|
|
31
|
-
if t>0:
|
|
32
|
-
events.append(1)
|
|
33
|
-
survival_times.append(t - ft)
|
|
34
|
-
elif c==1:
|
|
35
|
-
events.append(0)
|
|
36
|
-
survival_times.append(mt - ft)
|
|
37
|
-
else:
|
|
38
|
-
pass
|
|
39
3
|
|
|
40
|
-
|
|
41
|
-
print('convert to minutes!', FrameToMin)
|
|
42
|
-
survival_times = [s*FrameToMin for s in survival_times]
|
|
43
|
-
return events, survival_times
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def switch_to_events_v2(classes, event_times, max_times, origin_times=None, left_censored=True, FrameToMin=None):
|
|
4
|
+
def switch_to_events(classes, event_times, max_times, origin_times=None, left_censored=True, FrameToMin=None):
|
|
47
5
|
|
|
48
6
|
|
|
49
7
|
"""
|
|
@@ -144,6 +102,6 @@ def switch_to_events_v2(classes, event_times, max_times, origin_times=None, left
|
|
|
144
102
|
pass
|
|
145
103
|
|
|
146
104
|
if FrameToMin is not None:
|
|
147
|
-
print('convert to minutes!', FrameToMin)
|
|
105
|
+
#print('convert to minutes!', FrameToMin)
|
|
148
106
|
survival_times = [s*FrameToMin for s in survival_times]
|
|
149
107
|
return events, survival_times
|
|
@@ -35,8 +35,8 @@ def variance_filter(img, size):
|
|
|
35
35
|
|
|
36
36
|
size = int(size)
|
|
37
37
|
img = img.astype(float)
|
|
38
|
-
win_mean = snd.uniform_filter(img, (size,size))
|
|
39
|
-
win_sqr_mean = snd.uniform_filter(img**2, (size,size))
|
|
38
|
+
win_mean = snd.uniform_filter(img, (size,size), mode='wrap')
|
|
39
|
+
win_sqr_mean = snd.uniform_filter(img**2, (size,size), mode='wrap')
|
|
40
40
|
img = win_sqr_mean - win_mean**2
|
|
41
41
|
|
|
42
42
|
return img
|
|
@@ -45,8 +45,8 @@ def std_filter(img, size):
|
|
|
45
45
|
|
|
46
46
|
size = int(size)
|
|
47
47
|
img = img.astype(float)
|
|
48
|
-
win_mean = snd.uniform_filter(img, (size,size))
|
|
49
|
-
win_sqr_mean = snd.uniform_filter(img**2, (size, size))
|
|
48
|
+
win_mean = snd.uniform_filter(img, (size,size), mode='wrap')
|
|
49
|
+
win_sqr_mean = snd.uniform_filter(img**2, (size, size), mode='wrap')
|
|
50
50
|
win_sqr_mean[win_sqr_mean!=win_sqr_mean] = 0.
|
|
51
51
|
win_sqr_mean[win_sqr_mean<=0.] = 0. # add this to prevent sqrt from breaking
|
|
52
52
|
img = np.sqrt(win_sqr_mean - win_mean**2)
|
|
@@ -65,7 +65,6 @@ def otsu_filter(img, *kwargs):
|
|
|
65
65
|
return binary.astype(float)
|
|
66
66
|
|
|
67
67
|
def local_filter(img, *kwargs):
|
|
68
|
-
print(*kwargs)
|
|
69
68
|
thresh = threshold_local(img.astype(float), *kwargs)
|
|
70
69
|
binary = img >= thresh
|
|
71
70
|
return binary.astype(float)
|
|
@@ -13,7 +13,7 @@ from .retrain_signal_model_options import ConfigSignalModelTraining
|
|
|
13
13
|
from .retrain_segmentation_model_options import ConfigSegmentationModelTraining
|
|
14
14
|
from .thresholds_gui import ThresholdConfigWizard
|
|
15
15
|
from .seg_model_loader import SegmentationModelLoader
|
|
16
|
-
from .process_block import ProcessPanel, NeighPanel
|
|
16
|
+
from .process_block import ProcessPanel, NeighPanel, PreprocessingPanel
|
|
17
17
|
from .analyze_block import AnalysisPanel
|
|
18
18
|
from .control_panel import ControlPanel
|
|
19
19
|
from .configure_new_exp import ConfigNewExperiment
|