napari-spatial-correlation-plotter 0.0.1__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 (17) hide show
  1. napari_spatial_correlation_plotter-0.0.1/LICENSE +22 -0
  2. napari_spatial_correlation_plotter-0.0.1/MANIFEST.in +5 -0
  3. napari_spatial_correlation_plotter-0.0.1/PKG-INFO +141 -0
  4. napari_spatial_correlation_plotter-0.0.1/README.md +100 -0
  5. napari_spatial_correlation_plotter-0.0.1/pyproject.toml +56 -0
  6. napari_spatial_correlation_plotter-0.0.1/setup.cfg +67 -0
  7. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter/__init__.py +6 -0
  8. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter/_nice_colormap.py +260 -0
  9. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter/_tests/__init__.py +0 -0
  10. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter/_widget.py +1059 -0
  11. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter/napari.yaml +14 -0
  12. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter.egg-info/PKG-INFO +141 -0
  13. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter.egg-info/SOURCES.txt +16 -0
  14. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter.egg-info/dependency_links.txt +1 -0
  15. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter.egg-info/entry_points.txt +2 -0
  16. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter.egg-info/requires.txt +14 -0
  17. napari_spatial_correlation_plotter-0.0.1/src/napari_spatial_correlation_plotter.egg-info/top_level.txt +1 -0
@@ -0,0 +1,22 @@
1
+
2
+ The MIT License (MIT)
3
+
4
+ Copyright (c) 2024 Jules Vanaret
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
@@ -0,0 +1,5 @@
1
+ include LICENSE
2
+ include README.md
3
+
4
+ recursive-exclude * __pycache__
5
+ recursive-exclude * *.py[co]
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.1
2
+ Name: napari-spatial-correlation-plotter
3
+ Version: 0.0.1
4
+ Summary: A simple plugin to use FooBar segmentation within napari
5
+ Home-page: https://github.com/jules-vanaret/napari-spatial-correlation-plotter
6
+ Author: Jules Vanaret
7
+ Author-email: jules.vanaret@univ-amu.fr
8
+ License: MIT
9
+ Project-URL: Bug Tracker, https://github.com/jules-vanaret/napari-spatial-correlation-plotter/issues
10
+ Project-URL: Documentation, https://github.com/jules-vanaret/napari-spatial-correlation-plotter#README.md
11
+ Project-URL: Source Code, https://github.com/jules-vanaret/napari-spatial-correlation-plotter
12
+ Project-URL: User Support, https://github.com/jules-vanaret/napari-spatial-correlation-plotter/issues
13
+ Classifier: Development Status :: 2 - Pre-Alpha
14
+ Classifier: Framework :: napari
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
25
+ Requires-Python: >=3.8
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: numpy
29
+ Requires-Dist: magicgui
30
+ Requires-Dist: matplotlib
31
+ Requires-Dist: scikit-image
32
+ Requires-Dist: qtpy
33
+ Requires-Dist: pyclesperanto_prototype
34
+ Provides-Extra: testing
35
+ Requires-Dist: tox; extra == "testing"
36
+ Requires-Dist: pytest; extra == "testing"
37
+ Requires-Dist: pytest-cov; extra == "testing"
38
+ Requires-Dist: pytest-qt; extra == "testing"
39
+ Requires-Dist: napari; extra == "testing"
40
+ Requires-Dist: pyqt5; extra == "testing"
41
+
42
+ # :herb: napari-spatial-correlation-plotter
43
+
44
+ [![License MIT](https://img.shields.io/pypi/l/napari-spatial-correlation-plotter.svg?color=green)](https://github.com/jules-vanaret/napari-spatial-correlation-plotter/raw/main/LICENSE)
45
+ [![PyPI](https://img.shields.io/pypi/v/napari-spatial-correlation-plotter.svg?color=green)](https://pypi.org/project/napari-spatial-correlation-plotter)
46
+ [![Python Version](https://img.shields.io/pypi/pyversions/napari-spatial-correlation-plotter.svg?color=green)](https://python.org)
47
+ [![tests](https://github.com/jules-vanaret/napari-spatial-correlation-plotter/workflows/tests/badge.svg)](https://github.com/jules-vanaret/napari-spatial-correlation-plotter/actions)
48
+ [![codecov](https://codecov.io/gh/jules-vanaret/napari-spatial-correlation-plotter/branch/main/graph/badge.svg)](https://codecov.io/gh/jules-vanaret/napari-spatial-correlation-plotter)
49
+ [![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-spatial-correlation-plotter)](https://napari-hub.org/plugins/napari-spatial-correlation-plotter)
50
+
51
+ <img src="https://github.com/GuignardLab/tapenade/blob/Packaging/imgs/tapenade3.png" width="100">
52
+
53
+ A plugin to dynamically interact with the spatial correlation heatmap obtained by comparing two continuous fields of biophysical properties in 3D tissues.
54
+
55
+ `napari-spatial-correlation-plotter` is a [napari] plugin that is part of the [Tapenade](https://github.com/GuignardLab/tapenade) project. Tapenade is a tool for the analysis of dense 3D tissues acquired with deep imaging microscopy. It is designed to be user-friendly and to provide a comprehensive analysis of the data.
56
+
57
+ If you use this plugin for your research, please [cite us](https://github.com/GuignardLab/tapenade/blob/main/README.md#how-to-cite).
58
+
59
+ ## Overview
60
+
61
+ While working with large and dense 3D and 3D+time gastruloid datasets, we found that being able to visualise and interact with the data dynamically greatly helped processing it.
62
+ During the pre-processing stage, dynamical exploration and interaction led to faster tuning of the parameters by allowing direct visual feedback, and gave key biophysical insight during the analysis stage.
63
+
64
+ This plugins allows the user to analyse the spatial correlations of two 3D fields loaded in Napari (e.g two fluorescent markers). The user can dynamically vary the analysis length scale, which corresponds to the standard deviation of the Gaussian kernel used for smoothing the 3D fields.
65
+ If a layer of segmented nuclei instances is additionally specified, the histogram is constructed by binning values at the nuclei level (each point corresponds to an individual nucleus). Otherwise, individual voxel values are used.
66
+ The user can dynamically interact with the correlation heatmap by manually selecting a region in the plot. The corresponding cells (or voxels) that contributed to the region's statistics will be displayed in 3D on an independant Napari layer for the user to interact with and gain biological insight.
67
+
68
+ <img src="imgs/Fig_Napari_correlation.png">
69
+
70
+ ## Installation
71
+
72
+ The plugin obviously requires [napari] to run. If you don't have it yet, follow the instructions [here](https://napari.org/stable/tutorials/fundamentals/installation.html).
73
+
74
+ The simplest way to install `napari-spatial-correlation-plotter` is via the [napari] plugin manager. Open Napari, go to `Plugins > Install/Uninstall Packages...` and search for `napari-spatial-correlation-plotter`. Click on the install button and you are ready to go!
75
+
76
+ You can also install `napari-spatial-correlation-plotter` via [pip]:
77
+
78
+ pip install napari-spatial-correlation-plotter
79
+
80
+ To install latest development version :
81
+
82
+ pip install git+https://github.com/jules-vanaret/napari-spatial-correlation-plotter.git
83
+
84
+ ## Usage
85
+
86
+ <img src="imgs/corr_0.png">
87
+
88
+ Steps:
89
+ 1. First, load your images (and optionally mask and labels) in Napari. You can drag and drop them from your file explorer to the Napari viewer, or open them using the `File > Open files...` menu.
90
+ 2. Click on the `Plugins > Spatial Correlation Plotter` menu to open the plugin.
91
+ 3. Select the first layer you want to study from the combo box `Quantity X`.
92
+ 4. Select the second layer you want to study from the combo box `Quantity Y`. In this example, labels have loaded in step 1. Labels layers can be chosen as `Quantity X` or `Quantity Y` so that the quantity to study is the object instance density (in this example, the labels come from nuclei segmentation, so this leads to studying the nuclei density, or equivalently the cell density) or instance volume fraction.
93
+ 5. Optionally, a mask layer (with boolean values, 0 for outside, 1 for inside) can be selected to restrict the analysis to a specific region of the image.
94
+ 6. Optionally, a labels layer can be selected so that the histogram is constructed by binning values obtained by averaging the two fields in the segegmented instances (in this case, the quantitites will be averaged inside nuclei).
95
+ 7. Use the `Blur sigma` slider to vary the length scale of the analysis. This corresponds to the standard deviation of the Gaussian kernel used for masked gaussian smoothing the 3D fields. If set to 0, no smoothing is applied, which can be useful to study the raw data or if the quantities are already coming from smoothed data.
96
+ 8. Click on the `Compute correlation heatmap` button to compute and plot the correlation heatmap.
97
+ 9. If the image does not properly fit in the window (e.g if the borders are cut), you can use the `Configure subplots > Tight layout` button to adjust the plot size.
98
+ 10. You can adjust the histogram binning by changing the `Heatmap bins` sliders. If the histogram range is too large (e.g due to outliers), you can adjust the `Percentiles` sliders to focus on the most relevant part of the histogram. You can also check options to (i) `Show individual cells` to display the individual points that compose the histogram as an additional scatter, (ii) `Show linear fit` to display the linear fit of the histogram, (iii) `Display quadrants` to display vertical and horizontal lines that divide the histogram in 4 quadrants. The lines are placed at the median of the histogram values in X and Y. For instance, once checked, these options lead to the following plot:
99
+
100
+ <img src="imgs/corr_1.png" width=280>
101
+
102
+ 11. You can click on the `Save the figure` button to save the current plot (many formats are available, including .png, .svg, .jpeg).
103
+ 12. You can interact with the plot by manually drawing a region of interest directly on the plot to automatically select and display the corresponding cells in 3D on an independant Napari Labels layer `clustered labels`. By using a left click, you can draw an arbitrary shape. By using a right click, you can draw a rectangle. If `Shift` is pressed while drawing, several groups of cells can appear on the `clustered labels` layer, each with a different color.
104
+ 13. To trigger the grid view like in the example image, you can click on the `Toggle grid mode` button. This will display all layers in a grid view. By right clicking the button, you can parametrize the grid view (e.g number of columns, number of rows, etc).
105
+ 14. You can switch between 2D and 3D view at all time by clicking on the `Toggle 2D/3D view` button (it resembles a square when in 2D mode, or a cube when in 3D mode).
106
+
107
+ ## Contributing
108
+
109
+ Contributions are very welcome. Tests can be run with [tox], please ensure
110
+ the coverage at least stays the same before you submit a pull request.
111
+
112
+ ## License
113
+
114
+ Distributed under the terms of the [MIT] license,
115
+ "napari-spatial-correlation-plotter" is free and open source software
116
+
117
+ ## Issues
118
+
119
+ If you encounter any problems, please [file an issue] along with a detailed description.
120
+
121
+ ----------------------------------
122
+
123
+ This [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.
124
+
125
+ [napari]: https://github.com/napari/napari
126
+ [Cookiecutter]: https://github.com/audreyr/cookiecutter
127
+ [@napari]: https://github.com/napari
128
+ [MIT]: http://opensource.org/licenses/MIT
129
+ [BSD-3]: http://opensource.org/licenses/BSD-3-Clause
130
+ [GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt
131
+ [GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt
132
+ [Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0
133
+ [Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt
134
+ [cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin
135
+
136
+ [file an issue]: https://github.com/jules-vanaret/napari-spatial-correlation-plotter/issues
137
+
138
+ [napari]: https://github.com/napari/napari
139
+ [tox]: https://tox.readthedocs.io/en/latest/
140
+ [pip]: https://pypi.org/project/pip/
141
+ [PyPI]: https://pypi.org/
@@ -0,0 +1,100 @@
1
+ # :herb: napari-spatial-correlation-plotter
2
+
3
+ [![License MIT](https://img.shields.io/pypi/l/napari-spatial-correlation-plotter.svg?color=green)](https://github.com/jules-vanaret/napari-spatial-correlation-plotter/raw/main/LICENSE)
4
+ [![PyPI](https://img.shields.io/pypi/v/napari-spatial-correlation-plotter.svg?color=green)](https://pypi.org/project/napari-spatial-correlation-plotter)
5
+ [![Python Version](https://img.shields.io/pypi/pyversions/napari-spatial-correlation-plotter.svg?color=green)](https://python.org)
6
+ [![tests](https://github.com/jules-vanaret/napari-spatial-correlation-plotter/workflows/tests/badge.svg)](https://github.com/jules-vanaret/napari-spatial-correlation-plotter/actions)
7
+ [![codecov](https://codecov.io/gh/jules-vanaret/napari-spatial-correlation-plotter/branch/main/graph/badge.svg)](https://codecov.io/gh/jules-vanaret/napari-spatial-correlation-plotter)
8
+ [![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-spatial-correlation-plotter)](https://napari-hub.org/plugins/napari-spatial-correlation-plotter)
9
+
10
+ <img src="https://github.com/GuignardLab/tapenade/blob/Packaging/imgs/tapenade3.png" width="100">
11
+
12
+ A plugin to dynamically interact with the spatial correlation heatmap obtained by comparing two continuous fields of biophysical properties in 3D tissues.
13
+
14
+ `napari-spatial-correlation-plotter` is a [napari] plugin that is part of the [Tapenade](https://github.com/GuignardLab/tapenade) project. Tapenade is a tool for the analysis of dense 3D tissues acquired with deep imaging microscopy. It is designed to be user-friendly and to provide a comprehensive analysis of the data.
15
+
16
+ If you use this plugin for your research, please [cite us](https://github.com/GuignardLab/tapenade/blob/main/README.md#how-to-cite).
17
+
18
+ ## Overview
19
+
20
+ While working with large and dense 3D and 3D+time gastruloid datasets, we found that being able to visualise and interact with the data dynamically greatly helped processing it.
21
+ During the pre-processing stage, dynamical exploration and interaction led to faster tuning of the parameters by allowing direct visual feedback, and gave key biophysical insight during the analysis stage.
22
+
23
+ This plugins allows the user to analyse the spatial correlations of two 3D fields loaded in Napari (e.g two fluorescent markers). The user can dynamically vary the analysis length scale, which corresponds to the standard deviation of the Gaussian kernel used for smoothing the 3D fields.
24
+ If a layer of segmented nuclei instances is additionally specified, the histogram is constructed by binning values at the nuclei level (each point corresponds to an individual nucleus). Otherwise, individual voxel values are used.
25
+ The user can dynamically interact with the correlation heatmap by manually selecting a region in the plot. The corresponding cells (or voxels) that contributed to the region's statistics will be displayed in 3D on an independant Napari layer for the user to interact with and gain biological insight.
26
+
27
+ <img src="imgs/Fig_Napari_correlation.png">
28
+
29
+ ## Installation
30
+
31
+ The plugin obviously requires [napari] to run. If you don't have it yet, follow the instructions [here](https://napari.org/stable/tutorials/fundamentals/installation.html).
32
+
33
+ The simplest way to install `napari-spatial-correlation-plotter` is via the [napari] plugin manager. Open Napari, go to `Plugins > Install/Uninstall Packages...` and search for `napari-spatial-correlation-plotter`. Click on the install button and you are ready to go!
34
+
35
+ You can also install `napari-spatial-correlation-plotter` via [pip]:
36
+
37
+ pip install napari-spatial-correlation-plotter
38
+
39
+ To install latest development version :
40
+
41
+ pip install git+https://github.com/jules-vanaret/napari-spatial-correlation-plotter.git
42
+
43
+ ## Usage
44
+
45
+ <img src="imgs/corr_0.png">
46
+
47
+ Steps:
48
+ 1. First, load your images (and optionally mask and labels) in Napari. You can drag and drop them from your file explorer to the Napari viewer, or open them using the `File > Open files...` menu.
49
+ 2. Click on the `Plugins > Spatial Correlation Plotter` menu to open the plugin.
50
+ 3. Select the first layer you want to study from the combo box `Quantity X`.
51
+ 4. Select the second layer you want to study from the combo box `Quantity Y`. In this example, labels have loaded in step 1. Labels layers can be chosen as `Quantity X` or `Quantity Y` so that the quantity to study is the object instance density (in this example, the labels come from nuclei segmentation, so this leads to studying the nuclei density, or equivalently the cell density) or instance volume fraction.
52
+ 5. Optionally, a mask layer (with boolean values, 0 for outside, 1 for inside) can be selected to restrict the analysis to a specific region of the image.
53
+ 6. Optionally, a labels layer can be selected so that the histogram is constructed by binning values obtained by averaging the two fields in the segegmented instances (in this case, the quantitites will be averaged inside nuclei).
54
+ 7. Use the `Blur sigma` slider to vary the length scale of the analysis. This corresponds to the standard deviation of the Gaussian kernel used for masked gaussian smoothing the 3D fields. If set to 0, no smoothing is applied, which can be useful to study the raw data or if the quantities are already coming from smoothed data.
55
+ 8. Click on the `Compute correlation heatmap` button to compute and plot the correlation heatmap.
56
+ 9. If the image does not properly fit in the window (e.g if the borders are cut), you can use the `Configure subplots > Tight layout` button to adjust the plot size.
57
+ 10. You can adjust the histogram binning by changing the `Heatmap bins` sliders. If the histogram range is too large (e.g due to outliers), you can adjust the `Percentiles` sliders to focus on the most relevant part of the histogram. You can also check options to (i) `Show individual cells` to display the individual points that compose the histogram as an additional scatter, (ii) `Show linear fit` to display the linear fit of the histogram, (iii) `Display quadrants` to display vertical and horizontal lines that divide the histogram in 4 quadrants. The lines are placed at the median of the histogram values in X and Y. For instance, once checked, these options lead to the following plot:
58
+
59
+ <img src="imgs/corr_1.png" width=280>
60
+
61
+ 11. You can click on the `Save the figure` button to save the current plot (many formats are available, including .png, .svg, .jpeg).
62
+ 12. You can interact with the plot by manually drawing a region of interest directly on the plot to automatically select and display the corresponding cells in 3D on an independant Napari Labels layer `clustered labels`. By using a left click, you can draw an arbitrary shape. By using a right click, you can draw a rectangle. If `Shift` is pressed while drawing, several groups of cells can appear on the `clustered labels` layer, each with a different color.
63
+ 13. To trigger the grid view like in the example image, you can click on the `Toggle grid mode` button. This will display all layers in a grid view. By right clicking the button, you can parametrize the grid view (e.g number of columns, number of rows, etc).
64
+ 14. You can switch between 2D and 3D view at all time by clicking on the `Toggle 2D/3D view` button (it resembles a square when in 2D mode, or a cube when in 3D mode).
65
+
66
+ ## Contributing
67
+
68
+ Contributions are very welcome. Tests can be run with [tox], please ensure
69
+ the coverage at least stays the same before you submit a pull request.
70
+
71
+ ## License
72
+
73
+ Distributed under the terms of the [MIT] license,
74
+ "napari-spatial-correlation-plotter" is free and open source software
75
+
76
+ ## Issues
77
+
78
+ If you encounter any problems, please [file an issue] along with a detailed description.
79
+
80
+ ----------------------------------
81
+
82
+ This [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.
83
+
84
+ [napari]: https://github.com/napari/napari
85
+ [Cookiecutter]: https://github.com/audreyr/cookiecutter
86
+ [@napari]: https://github.com/napari
87
+ [MIT]: http://opensource.org/licenses/MIT
88
+ [BSD-3]: http://opensource.org/licenses/BSD-3-Clause
89
+ [GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt
90
+ [GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt
91
+ [Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0
92
+ [Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt
93
+ [cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin
94
+
95
+ [file an issue]: https://github.com/jules-vanaret/napari-spatial-correlation-plotter/issues
96
+
97
+ [napari]: https://github.com/napari/napari
98
+ [tox]: https://tox.readthedocs.io/en/latest/
99
+ [pip]: https://pypi.org/project/pip/
100
+ [PyPI]: https://pypi.org/
@@ -0,0 +1,56 @@
1
+ [build-system]
2
+ requires = ["setuptools>=42.0.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+
6
+
7
+ [tool.black]
8
+ line-length = 79
9
+ target-version = ['py38', 'py39', 'py310']
10
+
11
+
12
+ [tool.ruff]
13
+ line-length = 79
14
+ lint.select = [
15
+ "E", "F", "W", #flake8
16
+ "UP", # pyupgrade
17
+ "I", # isort
18
+ "BLE", # flake8-blind-exception
19
+ "B", # flake8-bugbear
20
+ "A", # flake8-builtins
21
+ "C4", # flake8-comprehensions
22
+ "ISC", # flake8-implicit-str-concat
23
+ "G", # flake8-logging-format
24
+ "PIE", # flake8-pie
25
+ "SIM", # flake8-simplify
26
+ ]
27
+ lint.ignore = [
28
+ "E501", # line too long. let black handle this
29
+ "UP006", "UP007", # type annotation. As using magicgui require runtime type annotation then we disable this.
30
+ "SIM117", # flake8-simplify - some of merged with statements are not looking great with black, reanble after drop python 3.9
31
+ ]
32
+
33
+ exclude = [
34
+ ".bzr",
35
+ ".direnv",
36
+ ".eggs",
37
+ ".git",
38
+ ".mypy_cache",
39
+ ".pants.d",
40
+ ".ruff_cache",
41
+ ".svn",
42
+ ".tox",
43
+ ".venv",
44
+ "__pypackages__",
45
+ "_build",
46
+ "buck-out",
47
+ "build",
48
+ "dist",
49
+ "node_modules",
50
+ "venv",
51
+ "*vendored*",
52
+ "*_vendor*",
53
+ ]
54
+
55
+ target-version = "py38"
56
+ fix = true
@@ -0,0 +1,67 @@
1
+ [metadata]
2
+ name = napari-spatial-correlation-plotter
3
+ version = attr: napari_spatial_correlation_plotter.__version__
4
+ description = A simple plugin to use FooBar segmentation within napari
5
+ long_description = file: README.md
6
+ long_description_content_type = text/markdown
7
+ url = https://github.com/jules-vanaret/napari-spatial-correlation-plotter
8
+ author = Jules Vanaret
9
+ author_email = jules.vanaret@univ-amu.fr
10
+ license = MIT
11
+ license_files = LICENSE
12
+ classifiers =
13
+ Development Status :: 2 - Pre-Alpha
14
+ Framework :: napari
15
+ Intended Audience :: Developers
16
+ License :: OSI Approved :: MIT License
17
+ Operating System :: OS Independent
18
+ Programming Language :: Python
19
+ Programming Language :: Python :: 3
20
+ Programming Language :: Python :: 3 :: Only
21
+ Programming Language :: Python :: 3.8
22
+ Programming Language :: Python :: 3.9
23
+ Programming Language :: Python :: 3.10
24
+ Topic :: Scientific/Engineering :: Image Processing
25
+ project_urls =
26
+ Bug Tracker = https://github.com/jules-vanaret/napari-spatial-correlation-plotter/issues
27
+ Documentation = https://github.com/jules-vanaret/napari-spatial-correlation-plotter#README.md
28
+ Source Code = https://github.com/jules-vanaret/napari-spatial-correlation-plotter
29
+ User Support = https://github.com/jules-vanaret/napari-spatial-correlation-plotter/issues
30
+
31
+ [options]
32
+ packages = find:
33
+ install_requires =
34
+ numpy
35
+ magicgui
36
+ matplotlib
37
+ scikit-image
38
+ qtpy
39
+ pyclesperanto_prototype
40
+ python_requires = >=3.8
41
+ include_package_data = True
42
+ package_dir =
43
+ =src
44
+
45
+ [options.packages.find]
46
+ where = src
47
+
48
+ [options.entry_points]
49
+ napari.manifest =
50
+ napari-spatial-correlation-plotter = napari_spatial_correlation_plotter:napari.yaml
51
+
52
+ [options.extras_require]
53
+ testing =
54
+ tox
55
+ pytest # https://docs.pytest.org/en/latest/contents.html
56
+ pytest-cov # https://pytest-cov.readthedocs.io/en/latest/
57
+ pytest-qt # https://pytest-qt.readthedocs.io/en/latest/
58
+ napari
59
+ pyqt5
60
+
61
+ [options.package_data]
62
+ * = *.yaml
63
+
64
+ [egg_info]
65
+ tag_build =
66
+ tag_date = 0
67
+
@@ -0,0 +1,6 @@
1
+ __version__ = "0.0.1"
2
+ from ._widget import PlotterWidget
3
+
4
+ __all__ = (
5
+ "PlotterWidget",
6
+ )
@@ -0,0 +1,260 @@
1
+ def get_nice_colormap():
2
+ colours_w_old_colors = [
3
+ "#ff7f0e",
4
+ "#1f77b4",
5
+ "#2ca02c",
6
+ "#d62728",
7
+ "#9467bd",
8
+ "#8c564b",
9
+ "#e377c2",
10
+ "#7f7f7f",
11
+ "#bcbd22",
12
+ "#17becf",
13
+ "#ccebc5",
14
+ "#ffed6f",
15
+ "#0054b6",
16
+ "#6aa866",
17
+ "#ffbfff",
18
+ "#8d472a",
19
+ "#417239",
20
+ "#d48fd0",
21
+ "#8b7e32",
22
+ "#7989dc",
23
+ "#f1d200",
24
+ "#a1e9f6",
25
+ "#924c28",
26
+ "#dc797e",
27
+ "#b86e85",
28
+ "#79ea30",
29
+ "#4723b9",
30
+ "#3de658",
31
+ "#de3ce7",
32
+ "#86e851",
33
+ "#9734d7",
34
+ "#d0f23c",
35
+ "#3c4ce7",
36
+ "#93d229",
37
+ "#8551e9",
38
+ "#eeea3c",
39
+ "#ca56ee",
40
+ "#2af385",
41
+ "#ea48cd",
42
+ "#7af781",
43
+ "#7026a8",
44
+ "#51d967",
45
+ "#ad3bc2",
46
+ "#4ab735",
47
+ "#3b1784",
48
+ "#afc626",
49
+ "#3d44bc",
50
+ "#d5cc31",
51
+ "#6065e6",
52
+ "#8fca40",
53
+ "#9e2399",
54
+ "#27ca6f",
55
+ "#e530a4",
56
+ "#54f2ad",
57
+ "#c236aa",
58
+ "#a1e76b",
59
+ "#a96fe6",
60
+ "#64a725",
61
+ "#d26de1",
62
+ "#52b958",
63
+ "#867af4",
64
+ "#ecbe2b",
65
+ "#4f83f7",
66
+ "#bbd14f",
67
+ "#2f65d0",
68
+ "#ddf47c",
69
+ "#27165e",
70
+ "#92e986",
71
+ "#8544ad",
72
+ "#91a824",
73
+ "#2e8bf3",
74
+ "#ec6e1b",
75
+ "#2b6abe",
76
+ "#eb3e22",
77
+ "#43e8cf",
78
+ "#e52740",
79
+ "#5ef3e7",
80
+ "#ed2561",
81
+ "#6ceac0",
82
+ "#681570",
83
+ "#8eec9c",
84
+ "#8f2071",
85
+ "#add465",
86
+ "#3a4093",
87
+ "#e3ce58",
88
+ "#5a3281",
89
+ "#82bf5d",
90
+ "#e1418b",
91
+ "#3d8e2a",
92
+ "#e86ec2",
93
+ "#66ca7d",
94
+ "#ae1e63",
95
+ "#4abb81",
96
+ "#dc3b6c",
97
+ "#409e59",
98
+ "#b34b9d",
99
+ "#87a943",
100
+ "#958df3",
101
+ "#e59027",
102
+ "#667edb",
103
+ "#ddad3c",
104
+ "#545daf",
105
+ "#e4e68b",
106
+ "#22123e",
107
+ "#b9e997",
108
+ "#6c2c76",
109
+ "#b0c163",
110
+ "#866ecb",
111
+ "#5f892d",
112
+ "#d889e2",
113
+ "#276222",
114
+ "#ab98ed",
115
+ "#79801a",
116
+ "#8f5baa",
117
+ "#ab972e",
118
+ "#7899e9",
119
+ "#dc5622",
120
+ "#4a9de3",
121
+ "#bd2e10",
122
+ "#54d5d6",
123
+ "#bc2f25",
124
+ "#40bd9c",
125
+ "#c72e45",
126
+ "#9ae5b4",
127
+ "#891954",
128
+ "#d6ecb1",
129
+ "#0e0d2c",
130
+ "#e9c779",
131
+ "#193163",
132
+ "#f07641",
133
+ "#4ab5dc",
134
+ "#e35342",
135
+ "#6dd3e7",
136
+ "#92230d",
137
+ "#a3e9e2",
138
+ "#951a28",
139
+ "#48a7b4",
140
+ "#a8421a",
141
+ "#88c4e9",
142
+ "#c55a2b",
143
+ "#2e5c9d",
144
+ "#bb8524",
145
+ "#737bc6",
146
+ "#c2bc64",
147
+ "#661952",
148
+ "#92bc82",
149
+ "#46123b",
150
+ "#d6e5c8",
151
+ "#190b1f",
152
+ "#e5a860",
153
+ "#1d1d3c",
154
+ "#f27c58",
155
+ "#06121f",
156
+ "#ebcfa3",
157
+ "#06121f",
158
+ "#f3a27d",
159
+ "#06121f",
160
+ "#eb6065",
161
+ "#297a53",
162
+ "#af437c",
163
+ "#365412",
164
+ "#be9ee2",
165
+ "#636b24",
166
+ "#e9a1d5",
167
+ "#1c2c0c",
168
+ "#e3bce6",
169
+ "#06121f",
170
+ "#cf8042",
171
+ "#06121f",
172
+ "#bfdee0",
173
+ "#751718",
174
+ "#80c1ab",
175
+ "#bb3f44",
176
+ "#2b9083",
177
+ "#781731",
178
+ "#618d58",
179
+ "#93457c",
180
+ "#7f954c",
181
+ "#4b2a5c",
182
+ "#c3bd83",
183
+ "#290d1b",
184
+ "#ced0ec",
185
+ "#6a2d0a",
186
+ "#9db5ea",
187
+ "#a35c1b",
188
+ "#4781b1",
189
+ "#9e4e22",
190
+ "#33547a",
191
+ "#876a1c",
192
+ "#514e80",
193
+ "#a59952",
194
+ "#b86198",
195
+ "#1d3621",
196
+ "#eb7ba2",
197
+ "#002a33",
198
+ "#e38273",
199
+ "#17212e",
200
+ "#e8c4c5",
201
+ "#281c2e",
202
+ "#b3b18a",
203
+ "#581430",
204
+ "#659c84",
205
+ "#a23a50",
206
+ "#2d7681",
207
+ "#a44634",
208
+ "#608ea2",
209
+ "#783121",
210
+ "#94a9bc",
211
+ "#4b1615",
212
+ "#a4ae9f",
213
+ "#7c3258",
214
+ "#aa8242",
215
+ "#7a6ea2",
216
+ "#5f5621",
217
+ "#c27dae",
218
+ "#403911",
219
+ "#a499c7",
220
+ "#805124",
221
+ "#717e9e",
222
+ "#b8644f",
223
+ "#143b44",
224
+ "#ce6472",
225
+ "#142a25",
226
+ "#dd9ca6",
227
+ "#21344a",
228
+ "#d7a78c",
229
+ "#3c3551",
230
+ "#928853",
231
+ "#ad486c",
232
+ "#3a4d2d",
233
+ "#8c5481",
234
+ "#516b4d",
235
+ "#994440",
236
+ "#2e5667",
237
+ "#af7e5c",
238
+ "#432432",
239
+ "#b49bb0",
240
+ "#382718",
241
+ "#b67576",
242
+ "#294d46",
243
+ "#935c54",
244
+ "#52756e",
245
+ "#6d363c",
246
+ "#85856a",
247
+ "#644466",
248
+ "#635738",
249
+ "#876d84",
250
+ "#623c23",
251
+ "#596776",
252
+ "#864e5d",
253
+ "#5f5848",
254
+ "#9f7e80",
255
+ "#5c4a56",
256
+ "#735647",
257
+ "#bcbcbc",
258
+ ]
259
+
260
+ return colours_w_old_colors