celldetective 1.2.2__tar.gz → 1.2.2.post2__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.
Files changed (112) hide show
  1. {celldetective-1.2.2 → celldetective-1.2.2.post2}/PKG-INFO +39 -137
  2. celldetective-1.2.2.post2/README.md +173 -0
  3. celldetective-1.2.2.post2/celldetective/__main__.py +40 -0
  4. celldetective-1.2.2/celldetective/__main__.py → celldetective-1.2.2.post2/celldetective/gui/InitWindow.py +17 -59
  5. celldetective-1.2.2.post2/celldetective/gui/help/DL-segmentation-strategy.json +41 -0
  6. celldetective-1.2.2.post2/celldetective/gui/help/Threshold-vs-DL.json +26 -0
  7. celldetective-1.2.2.post2/celldetective/gui/help/cell-populations.json +11 -0
  8. celldetective-1.2.2.post2/celldetective/gui/help/exp-structure.json +36 -0
  9. celldetective-1.2.2.post2/celldetective/gui/help/feature-btrack.json +11 -0
  10. celldetective-1.2.2.post2/celldetective/gui/help/neighborhood.json +16 -0
  11. celldetective-1.2.2.post2/celldetective/gui/help/prefilter-for-segmentation.json +16 -0
  12. celldetective-1.2.2.post2/celldetective/gui/help/preprocessing.json +51 -0
  13. celldetective-1.2.2.post2/celldetective/gui/help/propagate-classification.json +16 -0
  14. celldetective-1.2.2.post2/celldetective/gui/help/track-postprocessing.json +46 -0
  15. celldetective-1.2.2.post2/celldetective/gui/help/tracking.json +11 -0
  16. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/io.py +60 -23
  17. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/utils.py +5 -4
  18. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective.egg-info/PKG-INFO +39 -137
  19. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective.egg-info/SOURCES.txt +13 -6
  20. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective.egg-info/requires.txt +2 -0
  21. {celldetective-1.2.2 → celldetective-1.2.2.post2}/setup.py +2 -2
  22. celldetective-1.2.2.post2/tests/test_qt.py +101 -0
  23. celldetective-1.2.2/README.md +0 -273
  24. celldetective-1.2.2/celldetective/models/segmentation_effectors/primNK_cfse/config_input.json +0 -29
  25. celldetective-1.2.2/celldetective/models/segmentation_effectors/primNK_cfse/cp-cfse-transfer +0 -0
  26. celldetective-1.2.2/celldetective/models/segmentation_effectors/primNK_cfse/training_instructions.json +0 -37
  27. celldetective-1.2.2/celldetective/models/segmentation_effectors/ricm-bimodal/config_input.json +0 -130
  28. celldetective-1.2.2/celldetective/models/segmentation_effectors/ricm-bimodal/ricm-bimodal +0 -0
  29. celldetective-1.2.2/celldetective/models/segmentation_effectors/ricm-bimodal/training_instructions.json +0 -37
  30. {celldetective-1.2.2 → celldetective-1.2.2.post2}/LICENSE +0 -0
  31. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/__init__.py +0 -0
  32. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/datasets/segmentation_annotations/blank +0 -0
  33. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/datasets/signal_annotations/blank +0 -0
  34. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/events.py +0 -0
  35. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/extra_properties.py +0 -0
  36. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/filters.py +0 -0
  37. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/__init__.py +0 -0
  38. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/about.py +0 -0
  39. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/analyze_block.py +0 -0
  40. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/btrack_options.py +0 -0
  41. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/classifier_widget.py +0 -0
  42. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/configure_new_exp.py +0 -0
  43. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/control_panel.py +0 -0
  44. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/generic_signal_plot.py +0 -0
  45. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/gui_utils.py +0 -0
  46. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/json_readers.py +0 -0
  47. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/layouts.py +0 -0
  48. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/measurement_options.py +0 -0
  49. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/neighborhood_options.py +0 -0
  50. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/plot_measurements.py +0 -0
  51. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/plot_signals_ui.py +0 -0
  52. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/process_block.py +0 -0
  53. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/retrain_segmentation_model_options.py +0 -0
  54. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/retrain_signal_model_options.py +0 -0
  55. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/seg_model_loader.py +0 -0
  56. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/signal_annotator.py +0 -0
  57. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/signal_annotator2.py +0 -0
  58. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/signal_annotator_options.py +0 -0
  59. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/styles.py +0 -0
  60. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/survival_ui.py +0 -0
  61. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/tableUI.py +0 -0
  62. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/thresholds_gui.py +0 -0
  63. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/gui/viewers.py +0 -0
  64. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/icons/logo-large.png +0 -0
  65. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/icons/logo.png +0 -0
  66. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/icons/signals_icon.png +0 -0
  67. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/icons/splash-test.png +0 -0
  68. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/icons/splash.png +0 -0
  69. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/icons/splash0.png +0 -0
  70. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/icons/survival2.png +0 -0
  71. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/icons/vignette_signals2.png +0 -0
  72. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/icons/vignette_signals2.svg +0 -0
  73. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/links/zenodo.json +0 -0
  74. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/measure.py +0 -0
  75. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/models/pair_signal_detection/blank +0 -0
  76. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/models/segmentation_effectors/blank +0 -0
  77. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/models/segmentation_generic/blank +0 -0
  78. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/models/segmentation_targets/blank +0 -0
  79. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/models/signal_detection/blank +0 -0
  80. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/models/tracking_configs/mcf7.json +0 -0
  81. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/models/tracking_configs/ricm.json +0 -0
  82. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/models/tracking_configs/ricm2.json +0 -0
  83. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/neighborhood.py +0 -0
  84. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/preprocessing.py +0 -0
  85. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/relative_measurements.py +0 -0
  86. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/scripts/analyze_signals.py +0 -0
  87. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/scripts/measure_cells.py +0 -0
  88. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/scripts/measure_relative.py +0 -0
  89. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/scripts/segment_cells.py +0 -0
  90. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/scripts/segment_cells_thresholds.py +0 -0
  91. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/scripts/track_cells.py +0 -0
  92. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/scripts/train_segmentation_model.py +0 -0
  93. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/scripts/train_signal_model.py +0 -0
  94. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/segmentation.py +0 -0
  95. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/signals.py +0 -0
  96. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective/tracking.py +0 -0
  97. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective.egg-info/dependency_links.txt +0 -0
  98. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective.egg-info/entry_points.txt +0 -0
  99. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective.egg-info/not-zip-safe +0 -0
  100. {celldetective-1.2.2 → celldetective-1.2.2.post2}/celldetective.egg-info/top_level.txt +0 -0
  101. {celldetective-1.2.2 → celldetective-1.2.2.post2}/setup.cfg +0 -0
  102. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/__init__.py +0 -0
  103. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/test_events.py +0 -0
  104. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/test_filters.py +0 -0
  105. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/test_io.py +0 -0
  106. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/test_measure.py +0 -0
  107. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/test_neighborhood.py +0 -0
  108. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/test_preprocessing.py +0 -0
  109. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/test_segmentation.py +0 -0
  110. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/test_signals.py +0 -0
  111. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/test_tracking.py +0 -0
  112. {celldetective-1.2.2 → celldetective-1.2.2.post2}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: celldetective
3
- Version: 1.2.2
3
+ Version: 1.2.2.post2
4
4
  Summary: description
5
5
  Home-page: http://github.com/remyeltorro/celldetective
6
6
  Author: Rémy Torro
@@ -37,6 +37,8 @@ Requires-Dist: superqt[cmap]
37
37
  Requires-Dist: setuptools
38
38
  Requires-Dist: matplotlib_scalebar
39
39
  Requires-Dist: numpy==1.26.4
40
+ Requires-Dist: pytest
41
+ Requires-Dist: pytest-qt
40
42
 
41
43
  # Celldetective
42
44
 
@@ -51,86 +53,41 @@ Requires-Dist: numpy==1.26.4
51
53
  ![ico4](https://img.shields.io/pypi/v/celldetective)
52
54
  ![ico6](https://img.shields.io/github/downloads/remyeltorro/celldetective/total)
53
55
  ![ico5](https://img.shields.io/pypi/dm/celldetective)
56
+ ![GitHub repo size](https://img.shields.io/github/repo-size/remyeltorro/celldetective)
57
+ ![GitHub License](https://img.shields.io/github/license/remyeltorro/celldetective?link=https%3A%2F%2Fgithub.com%2Fremyeltorro%2Fcelldetective%2Fblob%2Fmain%2FLICENSE)
54
58
  ![ico2](https://img.shields.io/github/forks/remyeltorro/celldetective?link=https%3A%2F%2Fgithub.com%2Fremyeltorro%2Fcelldetective%2Fforks)
55
59
  ![ico3](https://img.shields.io/github/stars/remyeltorro/celldetective?link=https%3A%2F%2Fgithub.com%2Fremyeltorro%2Fcelldetective%2Fstargazers)
56
60
 
57
- Celldetective is a python package and software to perform single-cell
61
+ Celldetective is a python package and graphical user interface to perform single-cell
58
62
  analysis on multimodal time lapse microscopy images.
59
63
 
60
- - **Documentation:** <https://celldetective.readthedocs.io>
61
- - **Source code:** <https://github.com/remyeltorro/celldetective>
62
- - **Bug reports:**
63
- <https://github.com/remyeltorro/celldetective/issues/new/choose>
64
- - **Datasets, models and demos:**
65
- <https://zenodo.org/records/10650279>
64
+ - [Check the full documentation](https://celldetective.readthedocs.io)
65
+ - [Report a bug or request a new feature](https://github.com/remyeltorro/celldetective/issues/new/choose)
66
+ - [Explore the datasets, models and demos](https://zenodo.org/records/10650279)
66
67
 
67
68
  ## Overview
68
69
 
69
- <embed>
70
- <p align="center">
71
- <img src="https://github.com/remyeltorro/celldetective/blob/main/docs/source/_static/celldetective-blocks.png" width="90%" />
72
- </p>
73
- </embed>
70
+ ![Pipeline](https://github.com/remyeltorro/celldetective/raw/main/docs/source/_static/celldetective-blocks.png)
74
71
 
75
- Despite notable efforts in the development of user-friendly softwares
76
- that integrate state-of-the-art solutions to perform single cell
77
- analysis, very few are designed for time-lapse data and even less for
78
- multimodal problems where cells populations are mixed and can only be
79
- separated through the use of multimodal information. Few software
80
- solutions provide, to our knowledge, the extraction of response
81
- functions from single cell events such as the dynamic survival of a
82
- population directly in the GUI, as coding skills are usually required to
83
- do so. We want to study complex data which is often multimodal time
84
- lapse microscopy images of interacting cell populations, without loss of
85
- generality. With a high need for an easy-to-use,
86
- no-coding-skill-required software adapted to images and intended for
87
- biologists, we introduce **Celldetective**, an open-source python-based
88
- software with the following highlight features:
89
-
90
- - **Comprehensive single-cell image analysis** : Celldetective ships
91
- segmentation, tracking, and measurement modules, as well as event
92
- detection from single-cell signals, for up to two populations of
93
- interest.
94
- - **Integration of state-of-the-art solutions** : Celldetective
95
- harnesses state-of-the-art segmentation techniques (StarDist[^1],
96
- Cellpose[^2] ,[^3]) and tracking algorithm (bTrack[^4]), as well as
97
- the napari viewer[^5] where applicable. These algorithms are
98
- interfaced to be well integrated and accessible for the target
99
- audience, in the context of complex biological applications.
100
- - **A framework for event description and annotations** : we propose a
101
- broad and intuitive framework to annotate and automate the detection
102
- of events from single-cell signals through Deep Learning signal
103
- classification and regression. The event formulation is directly
104
- exploited to define population survival responses.
105
- - **A neighborhood scheme to study cell-cell interactions** : we
106
- introduce a neighborhood scheme to relate the spatio-temporal
107
- distribution and measurements of two cell populations, allowing the
108
- study of how cell-cell interactions affect single-cell and
109
- population responses.
110
- - **Deep Learning customization in GUI** : Celldetective facilitates
111
- the specialization of Deep Learning models or the creation of new
112
- ones adapted to user data, by facilitating the creation of training
113
- sets and the training of such models, without having to write a
114
- single line of code.
115
- - **In-software analysis** : Celldetective ships visualization tools
116
- to collapse single-cell signals with respect to an event, build
117
- survival curves, compare measurement distributions across biological
118
- conditions.
119
- - **A library of segmentation and signal models**: we created specific
120
- models to investigate a co-culture of MCF-7 cells and primary NK
121
- cells, that are available directly is the software with a large
122
- collection of generalist models developed by the StarDist and
123
- Cellpose teams, which are a perfect starting point to segment single
124
- cells in a new biological system.
125
- - **Accessible and open source** : Celldetective does not require any
126
- coding skills. The software, its models and datasets are made fully
127
- open source to encourage transparency and reproducibility.
128
72
 
129
- <embed>
130
- <p align="center">
131
- <img src="https://github.com/remyeltorro/celldetective/blob/main/docs/source/_static/signal-annotator.gif" width="90%" />
132
- </p>
133
- </embed>
73
+ Celldetective was designed to analyze time-lapse microscopy images in difficult situations: mixed cell populations that are only separable through multimodal information. This software provides a toolkit for the analysis of cell population interactions.
74
+
75
+
76
+ **Key features**:
77
+ - Achieve single-cell description (segment / track / measure) for up to two populations of interest
78
+ - Signal annotation and traditional or Deep learning automation
79
+ - Mask annotation in napari[^5] and retraining of Deep learning models
80
+ - Neighborhood linking within and across populations and interaction annotations
81
+ - Everything is done graphically, no coding is required!
82
+
83
+ Check out the [highlights](https://celldetective.readthedocs.io/en/latest/overview.html#description) in the documentation!
84
+
85
+ Instead of reinventing the wheel and out of respect for the amazing work done by these teams, we chose to build around StarDist[^1] & Cellpose[^2][^3] (BSD-3 license) for the Deep-learning segmentation and the Bayesian tracker bTrack[^4] (MIT license) for tracking. If you use these models or methods in your Celldetective workflow, don't forget to cite the respective papers!
86
+
87
+ **Target Audience**: The software is targeted to scientists who are interested in quantifying dynamically (or not) cell populations from microscopy images. Experimental scientists who produce such images can also analyze their data, thanks to the graphical interface, that completely removes the need for coding, and the many helper functions that guide the user in the analysis steps. Finally, the modular structure of Celldetective welcomes users with a partial need.
88
+
89
+ ![Signal analysis](https://github.com/remyeltorro/celldetective/raw/main/docs/source/_static/signal-annotator.gif)
90
+
134
91
 
135
92
  # System requirements
136
93
 
@@ -146,28 +103,26 @@ In GPU mode, succesive segmentation and DL signal analysis could be
146
103
  performed without saturating the GPU memory thanks to the subprocess
147
104
  formulation for the different modules. The GPU can be disabled in the
148
105
  startup window. The software does not require a GPU (but model inference
149
- will be longer). A typical analysis of a single movie with a GPU takes
150
- between 5 to 15 minutes. Depending on the number of cells and frames on
106
+ will be longer).
107
+
108
+ A typical analysis of a single movie with a GPU takes
109
+ between 3 to 15 minutes. Depending on the number of cells and frames on
151
110
  the images, this computation time can increase to the order of half an
152
111
  hour on a CPU.
153
112
 
154
- The memory must be sufficient to load a movie stack at once in order to
155
- visualize it in napari. Otherwise, processing is performed frame by
156
- frame, therefore the memory required is extremely low.
113
+ Processing is performed frame by frame, therefore the memory requirement is extremely low. The main bottleneck is in the visualization of segmentation and tracking output. Whole stacks (typically 1-9 Gb) have to be loaded in memory at once to be viewed in napari.
157
114
 
158
115
  ## Software requirements
159
116
 
160
117
  The software was developed simulateously on Ubuntu 20.04 and Windows 11.
161
- It was tested on MacOS, but Tensorflow installation can rquire extra
118
+ It was tested on MacOS, but Tensorflow installation can require extra
162
119
  steps.
163
120
 
164
- - Linux: Ubuntu 20.04.6 LTS (Focal Fossa) (not tested on ulterior
165
- versions)
121
+ - Linux: Ubuntu 20.04.6 LTS (Focal Fossa)
166
122
  - Windows: Windows 11 Home 23H2
167
123
 
168
124
  To use the software, you must install python, *e.g.* through
169
- [Anaconda](https://www.anaconda.com/download). We developed and tested
170
- the software in Python 3.9 and more recently 3.11.
125
+ [Anaconda](https://www.anaconda.com/download). Celldetective is routinely tested on both Ubuntu and Windows for Python versions 3.9, 3.10 and 3.11.
171
126
 
172
127
  # Installation
173
128
 
@@ -197,58 +152,8 @@ environment):
197
152
  pip install --upgrade celldetective
198
153
  ```
199
154
 
200
- ## Development version
201
-
202
- ### From GitHub
203
-
204
- If you want to run the latest development version, you can clone the
205
- repository to your local machine and install Celldetective in
206
- "development" mode. This means that any changes to the cloned repository
207
- will be immediately available in the python environment:
208
-
209
- ``` bash
210
- # creates "celldetective" folder
211
- git clone git://github.com/remyeltorro/celldetective.git
212
- cd celldetective
213
-
214
- # optional: create an environment
215
- conda create -n celldetective python=3.11 pyqt
216
- conda activate celldetective
217
-
218
- # install the celldetective package in editable/development mode
219
- pip install -r requirements.txt
220
- pip install -e .
221
- ```
222
-
223
- To run the latest development version without cloning the repository,
224
- you can also use this line:
225
-
226
- ``` bash
227
- pip install git+https//github.com/remyeltorro/celldetective.git
228
- ```
229
-
230
- ### From a zip file
155
+ For more installation options, please check the [documentation](https://celldetective.readthedocs.io/en/latest/get-started.html#installation).
231
156
 
232
- You can also download the repository as a compressed file. Unzip the
233
- file and open a terminal at the root of the folder (same level as the
234
- file requirements.txt). We recommend that you create a python
235
- environment as Celldetective relies on many packages that may interfere
236
- with package requirements for other projects. Run the following lines to
237
- create an environment named \"celldetective\":
238
-
239
- ``` bash
240
- conda create -n celldetective python=3.11 pyqt
241
- conda activate celldetective
242
- pip install -r requirements.txt
243
- pip install -e .
244
- ```
245
-
246
- The installation of the dependencies will take a few minutes (up to half
247
- an hour if the network is bad). The Celldetective package itself is
248
- light and installs in a few seconds.
249
-
250
- Before launching the software, move to a different directory as running
251
- the package locally can create some bugs when locating the models.
252
157
 
253
158
  # Quick start
254
159
 
@@ -256,14 +161,11 @@ You can launch the GUI by 1) opening a terminal and 2) typing the
256
161
  following:
257
162
 
258
163
  ``` bash
164
+ # conda activate celldetective
259
165
  python -m celldetective
260
166
  ```
261
167
 
262
- # Documentation
263
-
264
- Read the tutorial here:
265
-
266
- <https://celldetective.readthedocs.io/>
168
+ For more information about how to get started, please check the [documentation](https://celldetective.readthedocs.io/en/latest/get-started.html#launching-the-gui).
267
169
 
268
170
  # How to cite?
269
171
 
@@ -0,0 +1,173 @@
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
+ ![ico1](https://img.shields.io/readthedocs/celldetective?link=https%3A%2F%2Fcelldetective.readthedocs.io%2Fen%2Flatest%2Findex.html)
10
+ ![ico17](https://github.com/remyeltorro/celldetective/actions/workflows/test.yml/badge.svg)
11
+ ![ico4](https://img.shields.io/pypi/v/celldetective)
12
+ ![ico6](https://img.shields.io/github/downloads/remyeltorro/celldetective/total)
13
+ ![ico5](https://img.shields.io/pypi/dm/celldetective)
14
+ ![GitHub repo size](https://img.shields.io/github/repo-size/remyeltorro/celldetective)
15
+ ![GitHub License](https://img.shields.io/github/license/remyeltorro/celldetective?link=https%3A%2F%2Fgithub.com%2Fremyeltorro%2Fcelldetective%2Fblob%2Fmain%2FLICENSE)
16
+ ![ico2](https://img.shields.io/github/forks/remyeltorro/celldetective?link=https%3A%2F%2Fgithub.com%2Fremyeltorro%2Fcelldetective%2Fforks)
17
+ ![ico3](https://img.shields.io/github/stars/remyeltorro/celldetective?link=https%3A%2F%2Fgithub.com%2Fremyeltorro%2Fcelldetective%2Fstargazers)
18
+
19
+ Celldetective is a python package and graphical user interface to perform single-cell
20
+ analysis on multimodal time lapse microscopy images.
21
+
22
+ - [Check the full documentation](https://celldetective.readthedocs.io)
23
+ - [Report a bug or request a new feature](https://github.com/remyeltorro/celldetective/issues/new/choose)
24
+ - [Explore the datasets, models and demos](https://zenodo.org/records/10650279)
25
+
26
+ ## Overview
27
+
28
+ ![Pipeline](https://github.com/remyeltorro/celldetective/raw/main/docs/source/_static/celldetective-blocks.png)
29
+
30
+
31
+ Celldetective was designed to analyze time-lapse microscopy images in difficult situations: mixed cell populations that are only separable through multimodal information. This software provides a toolkit for the analysis of cell population interactions.
32
+
33
+
34
+ **Key features**:
35
+ - Achieve single-cell description (segment / track / measure) for up to two populations of interest
36
+ - Signal annotation and traditional or Deep learning automation
37
+ - Mask annotation in napari[^5] and retraining of Deep learning models
38
+ - Neighborhood linking within and across populations and interaction annotations
39
+ - Everything is done graphically, no coding is required!
40
+
41
+ Check out the [highlights](https://celldetective.readthedocs.io/en/latest/overview.html#description) in the documentation!
42
+
43
+ Instead of reinventing the wheel and out of respect for the amazing work done by these teams, we chose to build around StarDist[^1] & Cellpose[^2][^3] (BSD-3 license) for the Deep-learning segmentation and the Bayesian tracker bTrack[^4] (MIT license) for tracking. If you use these models or methods in your Celldetective workflow, don't forget to cite the respective papers!
44
+
45
+ **Target Audience**: The software is targeted to scientists who are interested in quantifying dynamically (or not) cell populations from microscopy images. Experimental scientists who produce such images can also analyze their data, thanks to the graphical interface, that completely removes the need for coding, and the many helper functions that guide the user in the analysis steps. Finally, the modular structure of Celldetective welcomes users with a partial need.
46
+
47
+ ![Signal analysis](https://github.com/remyeltorro/celldetective/raw/main/docs/source/_static/signal-annotator.gif)
48
+
49
+
50
+ # System requirements
51
+
52
+ ## Hardware requirements
53
+
54
+ The software was tested on several machines, including:
55
+
56
+ - An Intel(R) Core(TM) i9-10850K CPU @ 3.60GHz, with a single NVIDIA
57
+ GeForce RTX 3070 (8 Gb of memory) and 16 Gb of memory
58
+ - An Intel(R) Core(TM) i7-9750H CPU @ 2.60 GHz, with 16 Gb of memory
59
+
60
+ In GPU mode, succesive segmentation and DL signal analysis could be
61
+ performed without saturating the GPU memory thanks to the subprocess
62
+ formulation for the different modules. The GPU can be disabled in the
63
+ startup window. The software does not require a GPU (but model inference
64
+ will be longer).
65
+
66
+ A typical analysis of a single movie with a GPU takes
67
+ between 3 to 15 minutes. Depending on the number of cells and frames on
68
+ the images, this computation time can increase to the order of half an
69
+ hour on a CPU.
70
+
71
+ Processing is performed frame by frame, therefore the memory requirement is extremely low. The main bottleneck is in the visualization of segmentation and tracking output. Whole stacks (typically 1-9 Gb) have to be loaded in memory at once to be viewed in napari.
72
+
73
+ ## Software requirements
74
+
75
+ The software was developed simulateously on Ubuntu 20.04 and Windows 11.
76
+ It was tested on MacOS, but Tensorflow installation can require extra
77
+ steps.
78
+
79
+ - Linux: Ubuntu 20.04.6 LTS (Focal Fossa)
80
+ - Windows: Windows 11 Home 23H2
81
+
82
+ To use the software, you must install python, *e.g.* through
83
+ [Anaconda](https://www.anaconda.com/download). Celldetective is routinely tested on both Ubuntu and Windows for Python versions 3.9, 3.10 and 3.11.
84
+
85
+ # Installation
86
+
87
+ ## Stable release
88
+
89
+ Celldetective requires a version of Python between 3.9 and 3.11 (included). If your Python version is older or more recent, consider using `conda` to create an environment as described below.
90
+
91
+ With the proper Python version, Celldetective can be directly installed with `pip`:
92
+
93
+ ``` bash
94
+ pip install celldetective
95
+ ```
96
+
97
+ We recommend that you create an environment to use Celldetective, to protect your package versions and fix the Python version *e.g.*
98
+ with `conda`:
99
+
100
+ ``` bash
101
+ conda create -n celldetective python=3.11 pyqt
102
+ conda activate celldetective
103
+ pip install celldetective
104
+ ```
105
+
106
+ Need an update? Simply type the following in the terminal (in your
107
+ environment):
108
+
109
+ ``` bash
110
+ pip install --upgrade celldetective
111
+ ```
112
+
113
+ For more installation options, please check the [documentation](https://celldetective.readthedocs.io/en/latest/get-started.html#installation).
114
+
115
+
116
+ # Quick start
117
+
118
+ You can launch the GUI by 1) opening a terminal and 2) typing the
119
+ following:
120
+
121
+ ``` bash
122
+ # conda activate celldetective
123
+ python -m celldetective
124
+ ```
125
+
126
+ For more information about how to get started, please check the [documentation](https://celldetective.readthedocs.io/en/latest/get-started.html#launching-the-gui).
127
+
128
+ # How to cite?
129
+
130
+ If you use this software in your research, please cite the
131
+ [Celldetective](https://www.biorxiv.org/content/10.1101/2024.03.15.585250v1)
132
+ paper (currently preprint):
133
+
134
+ ``` raw
135
+ @article {Torro2024.03.15.585250,
136
+ 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},
137
+ title = {Celldetective: an AI-enhanced image analysis tool for unraveling dynamic cell interactions},
138
+ elocation-id = {2024.03.15.585250},
139
+ year = {2024},
140
+ doi = {10.1101/2024.03.15.585250},
141
+ publisher = {Cold Spring Harbor Laboratory},
142
+ 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.},
143
+ URL = {https://www.biorxiv.org/content/early/2024/03/17/2024.03.15.585250},
144
+ eprint = {https://www.biorxiv.org/content/early/2024/03/17/2024.03.15.585250.full.pdf},
145
+ journal = {bioRxiv}
146
+ }
147
+ ```
148
+
149
+ Make sure you to cite the papers of any segmentation model (StarDist,
150
+ Cellpose) or tracker (bTrack) you used through Celldetective.
151
+
152
+ # Bibliography
153
+
154
+ [^1]: Schmidt, U., Weigert, M., Broaddus, C. & Myers, G. Cell Detection
155
+ with Star-Convex Polygons. in Medical Image Computing and Computer
156
+ Assisted Intervention -- MICCAI 2018 (eds. Frangi, A. F., Schnabel,
157
+ J. A., Davatzikos, C., Alberola-López, C. & Fichtinger, G.) 265--273
158
+ (Springer International Publishing, Cham, 2018).
159
+ <doi:10.1007/978-3-030-00934-2_30>.
160
+
161
+ [^2]: Stringer, C., Wang, T., Michaelos, M. & Pachitariu, M. Cellpose: a
162
+ generalist algorithm for cellular segmentation. Nat Methods 18,
163
+ 100--106 (2021).
164
+
165
+ [^3]: Pachitariu, M. & Stringer, C. Cellpose 2.0: how to train your own
166
+ model. Nat Methods 19, 1634--1641 (2022).
167
+
168
+ [^4]: Ulicna, K., Vallardi, G., Charras, G. & Lowe, A. R. Automated Deep
169
+ Lineage Tree Analysis Using a Bayesian Single Cell Tracking
170
+ Approach. Frontiers in Computer Science 3, (2021).
171
+
172
+ [^5]: Ahlers, J. et al. napari: a multi-dimensional image viewer for
173
+ Python. Zenodo <https://doi.org/10.5281/zenodo.8115575> (2023).
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env python3
2
+ import sys
3
+ from PyQt5.QtWidgets import QApplication, QSplashScreen
4
+ from PyQt5.QtGui import QPixmap
5
+ from os import sep
6
+ from celldetective.utils import get_software_location
7
+ from time import time, sleep
8
+ #os.environ['QT_DEBUG_PLUGINS'] = '1'
9
+
10
+ if __name__ == "__main__":
11
+
12
+ splash=True
13
+ print('Loading the libraries...')
14
+
15
+ App = QApplication(sys.argv)
16
+ App.setStyle("Fusion")
17
+
18
+ if splash:
19
+ start = time()
20
+ splash_pix = QPixmap(sep.join([get_software_location(),'celldetective','icons','splash.png']))
21
+ splash = QSplashScreen(splash_pix)
22
+ splash.setMask(splash_pix.mask())
23
+ splash.show()
24
+ #App.processEvents(QEventLoop.AllEvents, 300)
25
+ while time() - start < 1:
26
+ sleep(0.001)
27
+ App.processEvents()
28
+
29
+ from PyQt5.QtWidgets import QFileDialog, QWidget, QVBoxLayout, QCheckBox, QHBoxLayout, QLabel, QLineEdit, QPushButton, QMessageBox, QMenu, QAction
30
+ from PyQt5.QtGui import QIcon, QDesktopServices, QIntValidator
31
+ from celldetective.gui.InitWindow import AppInitWindow
32
+
33
+ print('Libraries successfully loaded...')
34
+
35
+ window = AppInitWindow(App)
36
+
37
+ if splash:
38
+ splash.finish(window)
39
+
40
+ sys.exit(App.exec())
@@ -1,13 +1,22 @@
1
- #!/usr/bin/env python3
2
- import sys
3
- from PyQt5.QtWidgets import QApplication, QSplashScreen, QMainWindow
4
- from PyQt5.QtGui import QPixmap
5
- from os import sep
1
+ from PyQt5.QtWidgets import QApplication, QMainWindow
6
2
  from celldetective.utils import get_software_location
7
- #from PyQt5.QtCore import QEventLoop
8
- from time import time, sleep
9
3
  import os
10
- #os.environ['QT_DEBUG_PLUGINS'] = '1'
4
+ from PyQt5.QtWidgets import QFileDialog, QWidget, QVBoxLayout, QCheckBox, QHBoxLayout, QLabel, QLineEdit, QPushButton, QMessageBox, QMenu, QAction
5
+ from PyQt5.QtCore import Qt, QUrl
6
+ from PyQt5.QtGui import QIcon, QDesktopServices, QIntValidator
7
+ from glob import glob
8
+ from superqt.fonticon import icon
9
+ from fonticon_mdi6 import MDI6
10
+ import gc
11
+ from celldetective.gui import Styles, ControlPanel, ConfigNewExperiment
12
+ from celldetective.gui.gui_utils import center_window
13
+ import subprocess
14
+ import os
15
+ from celldetective.gui.about import AboutWidget
16
+ from celldetective.io import correct_annotation
17
+ import psutil
18
+ import subprocess
19
+ import json
11
20
 
12
21
  class AppInitWindow(QMainWindow):
13
22
 
@@ -389,54 +398,3 @@ class AppInitWindow(QMainWindow):
389
398
  if returnValue == QMessageBox.Ok:
390
399
  self.experiment_path_selection.setText('')
391
400
  return None
392
-
393
- if __name__ == "__main__":
394
-
395
- # import ctypes
396
- # myappid = 'mycompany.myproduct.subproduct.version' # arbitrary string
397
- # ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
398
- splash=True
399
- print('Loading the libraries...')
400
-
401
- App = QApplication(sys.argv)
402
- #App.setWindowIcon(QIcon(os.sep.join([get_software_location(),'celldetective','icons','mexican-hat.png'])))
403
- App.setStyle("Fusion")
404
-
405
- if splash:
406
- start = time()
407
- splash_pix = QPixmap(sep.join([get_software_location(),'celldetective','icons','splash.png']))
408
- splash = QSplashScreen(splash_pix)
409
- splash.setMask(splash_pix.mask())
410
- splash.show()
411
- #App.processEvents(QEventLoop.AllEvents, 300)
412
- while time() - start < 1:
413
- sleep(0.001)
414
- App.processEvents()
415
-
416
- from PyQt5.QtWidgets import QFileDialog, QWidget, QVBoxLayout, QCheckBox, QHBoxLayout, QLabel, QLineEdit, QPushButton, QMessageBox, QMenu, QAction
417
- from PyQt5.QtCore import Qt, QUrl
418
- from PyQt5.QtGui import QIcon, QDesktopServices, QIntValidator
419
- from glob import glob
420
- from superqt.fonticon import icon
421
- from fonticon_mdi6 import MDI6
422
- import gc
423
- from celldetective.gui import Styles, ControlPanel, ConfigNewExperiment
424
- from celldetective.gui.gui_utils import center_window
425
- import subprocess
426
- import os
427
- from celldetective.gui.about import AboutWidget
428
- from celldetective.io import correct_annotation
429
- import psutil
430
- import subprocess
431
- import json
432
- # import matplotlib
433
- # matplotlib.rcParams.update({'font.size': 8})
434
-
435
- print('Libraries successfully loaded...')
436
-
437
- window = AppInitWindow(App)
438
-
439
- if splash:
440
- splash.finish(window)
441
-
442
- sys.exit(App.exec())
@@ -0,0 +1,41 @@
1
+ {
2
+ "Blob-like cell": {
3
+ "yes": {
4
+ "Fluorescence image": {
5
+ "yes": {
6
+ "Mixture of population": {
7
+ "yes": "train custom StarDist model",
8
+ "no": {
9
+ "Cells can be identified from a single channel": {
10
+ "yes": "Use StarDist versatile fluorescence",
11
+ "no" : "train custom StarDist model"
12
+ }
13
+ }
14
+ }
15
+ },
16
+ "no": "train custom StarDist model"
17
+ }
18
+ },
19
+ "no": {
20
+ "Mixture of population": {
21
+ "yes": "train custom cellpose model",
22
+ "no": {
23
+ "Heterogeneity in cell sizes": {
24
+ "yes": "train custom cellpose model",
25
+ "no": {
26
+ "Cells can be identified from at most 2-channels (one cyto-like and one nucleus-like)": {
27
+ "yes": {
28
+ "cyto-like channel is brightfield": {
29
+ "yes": "cellpose livecell",
30
+ "no" : "cellpose cyto3"
31
+ }
32
+ },
33
+ "no": "train custom cellpose model"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "Cell masks can be extracted from a single channel": {
3
+ "yes": {
4
+ "Rare cell-cell contacts": {
5
+ "yes": {
6
+ "Non-cell objects easily separable": {
7
+ "yes": {
8
+ "Background heterogeneities": {
9
+ "yes": {
10
+ "Correction possible": {
11
+ "yes": "Threshold pipeline",
12
+ "no" : "DL"
13
+ }
14
+ },
15
+ "no": "Threshold pipeline"
16
+ }
17
+ },
18
+ "no": "DL"
19
+ }
20
+ },
21
+ "no": "DL"
22
+ }
23
+ },
24
+ "no": "DL"
25
+ }
26
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "Do you have more than one cell population of interest in the images?": {
3
+ "yes": {
4
+ "Do you have more than two cell populations of interest?": {
5
+ "yes": "The study of interactions between more than two cell populations is not currently supported in celldetective. Either study the cell populations two-by-two or group several populations into one (e.g. all effector-like cells vs all target-like cells). You can use the classification tools of celldetective to decompose the responses per cell population at a later stage.",
6
+ "no": "Identify the effector-like population (effects some changes on the other population) and the target-like population. If this characterization is ill-defined, choose a convention and stick to it. Beware, the available non-generalist Deep-learning models differ slightly for the two populations."
7
+ }
8
+ },
9
+ "no": "Pass your cell population as either EFFECTORS or TARGETS and stick with the convention. Beware, the available non-generalist Deep-learning model differs slightly for the two populations."
10
+ }
11
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "Did you test different biological conditions?": {
3
+ "yes": {
4
+ "Did you image several positions (tiles) per biological condition?": {
5
+ "yes": {
6
+ "Did you record a time-lapse?": {
7
+ "yes": "Set N wells for the N biological conditions. Set M positions per well. Put the respective time-lapse stack in each generated position folder.",
8
+ "no": "Set N wells for the N biological conditions. Set a single position per well. Assemble all the tiles into a single stack per condition."
9
+ }
10
+ },
11
+ "no": {
12
+ "Did you record a time-lapse?": {
13
+ "yes": "Set N wells for the N biological conditions. Set a single position per well. Put the respective time-lapse stack in each generated position folder.",
14
+ "no": "There is not enough data to create a valid stack. Consider merging different experiments to generate several positions."
15
+ }
16
+ }
17
+ }
18
+ },
19
+ "no": {
20
+ "Did you image several positions (tiles)?": {
21
+ "yes": {
22
+ "Did you record a time-lapse?": {
23
+ "yes": "Set a single well. Set N positions. Put the respective time-lapse stack in each generated position folder.",
24
+ "no": "Set a single well. Set a single position. Assemble all the tiles into a single stack and put it in this position folder."
25
+ }
26
+ },
27
+ "no": {
28
+ "Did you record a time-lapse?": {
29
+ "yes": "Set a single well and a single position. Put the time-lapse stack in the generated position folder.",
30
+ "no": "There is not enough data to create a valid stack. Consider merging different experiments to generate several positions."
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }