napari-spatialdata 0.7.0__tar.gz → 0.7.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.
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.github/workflows/benchmarks.yml +3 -3
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.github/workflows/benchmarks_report.yml +3 -3
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.github/workflows/release.yml +1 -1
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.github/workflows/test.yml +2 -2
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.readthedocs.yaml +1 -1
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/PKG-INFO +17 -17
- napari_spatialdata-0.7.1/docs/notebooks/mibitof_analysis.ipynb +250 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/notebooks/nanostring_analysis.ipynb +3 -43
- napari_spatialdata-0.7.1/docs/notebooks/spatialdata.ipynb +299 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/setup.cfg +3 -3
- napari_spatialdata-0.7.1/src/napari_spatialdata/_version.py +24 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/_widgets.py +0 -7
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata.egg-info/PKG-INFO +17 -17
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata.egg-info/requires.txt +3 -3
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/conftest.py +85 -0
- napari_spatialdata-0.7.0/docs/notebooks/mibitof_analysis.ipynb +0 -435
- napari_spatialdata-0.7.0/docs/notebooks/spatialdata.ipynb +0 -567
- napari_spatialdata-0.7.0/src/napari_spatialdata/_version.py +0 -34
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.github/BENCHMARK_FAIL_TEMPLATE.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.github/dependabot.yml +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.github/release.yml +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.gitignore +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.mypy.ini +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.napari/DESCRIPTION.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.pre-commit-config.yaml +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/LICENSE +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/MANIFEST.in +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/README.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/asv.conf.json +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/benchmarks/Readme.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/benchmarks/__init__.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/benchmarks/benchmark.in +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/benchmarks/benchmark.txt +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/benchmarks/benchmark_model.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/benchmarks/benchmark_qt_widget.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/Makefile +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/_static/.gitkeep +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/_templates/.gitkeep +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/_templates/autosummary/class.rst +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/api.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/changelog.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/cli.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/conf.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/contributing.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/extensions/typed_returns.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/index.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/limitations.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/make.bat +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/notebooks/scatterwidget.ipynb +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/notebooks/scatterwidget_annotation.ipynb +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/references.bib +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/references.md +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/examples/spatialdata_empty.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/examples/spatialdata_visium.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/pyproject.toml +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/__init__.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/__main__.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/_annotationwidgets.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/_interactive.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/_model.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/_reader.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/_scatterwidgets.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/_sdata_widgets.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/_view.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/_viewer.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/constants/__init__.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/constants/_constants.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/constants/_pkg_constants.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/constants/_utils.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/constants/config.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/napari.yaml +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/resources/exclamation.png +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/resources/icons8-home-48.png +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/resources/icons8-pencil-drawing-50.png +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/resources/icons8-polygon-80.png +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/resources/icons8-rectangle-48.png +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/utils/__init__.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/utils/_categoricals_utils.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/utils/_test_utils.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/utils/_utils.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata/utils/_viewer_utils.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata.egg-info/SOURCES.txt +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata.egg-info/dependency_links.txt +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata.egg-info/entry_points.txt +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/src/napari_spatialdata.egg-info/top_level.txt +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/__init__.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/plots/groundtruth/Images_can_add_element_image.png +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/plots/groundtruth/Images_can_add_element_label.png +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/plots/groundtruth/Images_can_add_element_multiple.png +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/test_3d_visualization.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/test_cli.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/test_interactive.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/test_scatterwidgets.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/test_spatialdata.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/test_utils.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/test_view.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/test_viewer.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tests/test_widgets.py +0 -0
- {napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/tox.ini +0 -0
|
@@ -170,7 +170,7 @@ jobs:
|
|
|
170
170
|
|
|
171
171
|
fi
|
|
172
172
|
|
|
173
|
-
- uses: actions/upload-artifact@
|
|
173
|
+
- uses: actions/upload-artifact@v7
|
|
174
174
|
if: always()
|
|
175
175
|
with:
|
|
176
176
|
name: asv-benchmark-results-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ matrix.benchmark-name }}
|
|
@@ -182,13 +182,13 @@ jobs:
|
|
|
182
182
|
if: always()
|
|
183
183
|
steps:
|
|
184
184
|
- name: Download artifact
|
|
185
|
-
uses: actions/download-artifact@
|
|
185
|
+
uses: actions/download-artifact@v8
|
|
186
186
|
with:
|
|
187
187
|
pattern: asv-benchmark-results*
|
|
188
188
|
path: asv_result
|
|
189
189
|
merge-multiple: true
|
|
190
190
|
- name: Upload artifact
|
|
191
|
-
uses: actions/upload-artifact@
|
|
191
|
+
uses: actions/upload-artifact@v7
|
|
192
192
|
with:
|
|
193
193
|
name: asv-benchmark-results-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
|
|
194
194
|
path: asv_result
|
{napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/.github/workflows/benchmarks_report.yml
RENAMED
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
runs-on: ubuntu-latest
|
|
25
25
|
steps:
|
|
26
26
|
- name: "Download artifact"
|
|
27
|
-
uses: actions/github-script@
|
|
27
|
+
uses: actions/github-script@v9
|
|
28
28
|
with:
|
|
29
29
|
script: |
|
|
30
30
|
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
|
@@ -68,7 +68,7 @@ jobs:
|
|
|
68
68
|
|
|
69
69
|
- name: "Comment on PR"
|
|
70
70
|
if: env.PR_NUMBER != ''
|
|
71
|
-
uses: actions/github-script@
|
|
71
|
+
uses: actions/github-script@v9
|
|
72
72
|
with:
|
|
73
73
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
74
74
|
script: |
|
|
@@ -84,7 +84,7 @@ jobs:
|
|
|
84
84
|
|
|
85
85
|
- name: "Remove run-benchmarks label"
|
|
86
86
|
if: env.PR_NUMBER != ''
|
|
87
|
-
uses: actions/github-script@
|
|
87
|
+
uses: actions/github-script@v9
|
|
88
88
|
with:
|
|
89
89
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
90
90
|
script: |
|
|
@@ -62,11 +62,11 @@ jobs:
|
|
|
62
62
|
PLATFORM: ${{ matrix.platform }}
|
|
63
63
|
|
|
64
64
|
- name: Coverage
|
|
65
|
-
uses: codecov/codecov-action@
|
|
65
|
+
uses: codecov/codecov-action@v6
|
|
66
66
|
|
|
67
67
|
- name: Archive figures generated during testing
|
|
68
68
|
if: always()
|
|
69
|
-
uses: actions/upload-artifact@
|
|
69
|
+
uses: actions/upload-artifact@v7
|
|
70
70
|
with:
|
|
71
71
|
name: plotting-results-${{ matrix.python-version }}-${{ matrix.platform }}
|
|
72
72
|
path: /Users/runner/work/napari-spatialdata/napari-spatialdata/tests/plots/generated/*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: napari-spatialdata
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.1
|
|
4
4
|
Summary: Interactive visualization of spatial omics data with napari
|
|
5
5
|
Home-page: https://github.com/scverse/napari-spatialdata.git
|
|
6
6
|
Author: giovanni palla
|
|
@@ -44,7 +44,7 @@ Requires-Dist: scanpy
|
|
|
44
44
|
Requires-Dist: scipy
|
|
45
45
|
Requires-Dist: shapely
|
|
46
46
|
Requires-Dist: scikit-learn
|
|
47
|
-
Requires-Dist: spatialdata>=0.7.
|
|
47
|
+
Requires-Dist: spatialdata>=0.7.2
|
|
48
48
|
Requires-Dist: superqt
|
|
49
49
|
Requires-Dist: typing_extensions>=4.8.0
|
|
50
50
|
Requires-Dist: vispy
|
|
@@ -59,24 +59,24 @@ Requires-Dist: pytest-cov; extra == "test"
|
|
|
59
59
|
Requires-Dist: pytest-mock; extra == "test"
|
|
60
60
|
Requires-Dist: pytest-qt; extra == "test"
|
|
61
61
|
Requires-Dist: pre-commit>=2.9.0; extra == "test"
|
|
62
|
-
Provides-Extra:
|
|
63
|
-
Requires-Dist: sphinx>=4.5; extra == "
|
|
64
|
-
Requires-Dist: sphinx-book-theme>=1.0.0; extra == "
|
|
65
|
-
Requires-Dist: myst-parser>=2.0.0; extra == "
|
|
66
|
-
Requires-Dist: sphinxcontrib-bibtex>=2.5.0; extra == "
|
|
67
|
-
Requires-Dist: sphinx-autodoc-typehints>=1.11.0; extra == "
|
|
68
|
-
Requires-Dist: sphinx-autobuild; extra == "
|
|
69
|
-
Requires-Dist: scanpydoc; extra == "
|
|
70
|
-
Requires-Dist: ipykernel; extra == "
|
|
71
|
-
Requires-Dist: ipython; extra == "
|
|
72
|
-
Requires-Dist: sphinx-copybutton; extra == "
|
|
73
|
-
Requires-Dist: sphinx-qt-documentation; extra == "
|
|
74
|
-
Requires-Dist: myst-nb>=1.0.0; extra == "
|
|
75
|
-
Requires-Dist: squidpy; extra == "
|
|
62
|
+
Provides-Extra: docs
|
|
63
|
+
Requires-Dist: sphinx>=4.5; extra == "docs"
|
|
64
|
+
Requires-Dist: sphinx-book-theme>=1.0.0; extra == "docs"
|
|
65
|
+
Requires-Dist: myst-parser>=2.0.0; extra == "docs"
|
|
66
|
+
Requires-Dist: sphinxcontrib-bibtex>=2.5.0; extra == "docs"
|
|
67
|
+
Requires-Dist: sphinx-autodoc-typehints>=1.11.0; extra == "docs"
|
|
68
|
+
Requires-Dist: sphinx-autobuild; extra == "docs"
|
|
69
|
+
Requires-Dist: scanpydoc; extra == "docs"
|
|
70
|
+
Requires-Dist: ipykernel; extra == "docs"
|
|
71
|
+
Requires-Dist: ipython; extra == "docs"
|
|
72
|
+
Requires-Dist: sphinx-copybutton; extra == "docs"
|
|
73
|
+
Requires-Dist: sphinx-qt-documentation; extra == "docs"
|
|
74
|
+
Requires-Dist: myst-nb>=1.0.0; extra == "docs"
|
|
75
|
+
Requires-Dist: squidpy; extra == "docs"
|
|
76
76
|
Provides-Extra: readthedocs
|
|
77
77
|
Requires-Dist: pydantic>2; extra == "readthedocs"
|
|
78
78
|
Provides-Extra: pre
|
|
79
|
-
Requires-Dist: spatialdata>=0.7.
|
|
79
|
+
Requires-Dist: spatialdata>=0.7.3a1; extra == "pre"
|
|
80
80
|
Provides-Extra: all
|
|
81
81
|
Requires-Dist: napari[pyqt5]; extra == "all"
|
|
82
82
|
Dynamic: license-file
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"attachments": {},
|
|
5
|
+
"cell_type": "markdown",
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"source": "# Analyse MIBI-TOF in Napari-SpatialData\n"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"attachments": {},
|
|
11
|
+
"cell_type": "markdown",
|
|
12
|
+
"metadata": {},
|
|
13
|
+
"source": "This tutorial shows how to load and analyse the MIBI-TOF dataset with the Napari-SpatialData plugin.\n"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"attachments": {},
|
|
17
|
+
"cell_type": "markdown",
|
|
18
|
+
"metadata": {},
|
|
19
|
+
"source": [
|
|
20
|
+
"## Import packages and data"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"attachments": {},
|
|
25
|
+
"cell_type": "markdown",
|
|
26
|
+
"metadata": {},
|
|
27
|
+
"source": [
|
|
28
|
+
"There are two options to install napari-spatialdata:\n",
|
|
29
|
+
"\n",
|
|
30
|
+
"(1) Install [napari](https://napari.org/stable/tutorials/fundamentals/installation.html) \n",
|
|
31
|
+
"\n",
|
|
32
|
+
"(2a) Run `pip install napari-spatialdata`\n",
|
|
33
|
+
"\n",
|
|
34
|
+
"or, \n",
|
|
35
|
+
"\n",
|
|
36
|
+
"(2b) Clone this [repo](https://github.com/scverse/napari-spatialdata) and run `pip install -e .`"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"cell_type": "code",
|
|
41
|
+
"execution_count": 1,
|
|
42
|
+
"metadata": {},
|
|
43
|
+
"outputs": [],
|
|
44
|
+
"source": [
|
|
45
|
+
"%matplotlib inline\n",
|
|
46
|
+
"import matplotlib.pyplot as plt\n",
|
|
47
|
+
"from napari_spatialdata import Interactive\n",
|
|
48
|
+
"from spatialdata import SpatialData\n",
|
|
49
|
+
"import squidpy as sq\n",
|
|
50
|
+
"import scanpy as sc\n",
|
|
51
|
+
"\n",
|
|
52
|
+
"plt.rcParams['figure.figsize'] = (20, 20)"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"attachments": {},
|
|
57
|
+
"cell_type": "markdown",
|
|
58
|
+
"metadata": {},
|
|
59
|
+
"source": [
|
|
60
|
+
"Please download the MIBI-TOF data from https://spatialdata.scverse.org/en/stable/tutorials/notebooks/datasets/README.html and adjust the variable containing the location of the .zarr file.\n",
|
|
61
|
+
"\n",
|
|
62
|
+
"Information regarding data licensing and attribution for the dataset listed above is available at: https://github.com/scverse/spatialdata-notebooks/tree/main/datasets."
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"attachments": {},
|
|
67
|
+
"cell_type": "markdown",
|
|
68
|
+
"metadata": {},
|
|
69
|
+
"source": [
|
|
70
|
+
"We will load the dataset from the filepath and create a {class}`spatialdata.SpatialData` object. We'll use this object with the class `Interactive` to visualise this dataset in Napari."
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"cell_type": "markdown",
|
|
75
|
+
"metadata": {},
|
|
76
|
+
"source": [
|
|
77
|
+
"FILE_PATH = \"tutorial_data/mibitof_data/data.zarr\" # Path to the data file. Change if your data is stored in a different location.\n",
|
|
78
|
+
"sdata = SpatialData.read(FILE_PATH)"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"attachments": {},
|
|
83
|
+
"cell_type": "markdown",
|
|
84
|
+
"metadata": {},
|
|
85
|
+
"source": "To make it easier to analyse our data, we will filter the SpatialData object by the coordinate system \"point8\"."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"attachments": {},
|
|
89
|
+
"cell_type": "code",
|
|
90
|
+
"metadata": {},
|
|
91
|
+
"source": [
|
|
92
|
+
"sdata = sdata.filter_by_coordinate_system(\"point8\")\n",
|
|
93
|
+
"adata = sdata.table"
|
|
94
|
+
],
|
|
95
|
+
"outputs": [],
|
|
96
|
+
"execution_count": null
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"cell_type": "markdown",
|
|
100
|
+
"metadata": {},
|
|
101
|
+
"source": "The `scikit-misc package` could be required for highly variable genes identification."
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"attachments": {},
|
|
105
|
+
"cell_type": "markdown",
|
|
106
|
+
"metadata": {},
|
|
107
|
+
"source": [
|
|
108
|
+
"Next, we will use the Scatter Widget offered by Napari SpatialData to visualize the UMAP coordinates.\n",
|
|
109
|
+
"\n",
|
|
110
|
+
"First, we instantiate the `Interactive` class with our {class}`spatialdata.SpatialData` object, and view it in Napari."
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"attachments": {},
|
|
115
|
+
"cell_type": "code",
|
|
116
|
+
"metadata": {},
|
|
117
|
+
"source": [
|
|
118
|
+
"interactive = Interactive(sdata)\n",
|
|
119
|
+
"interactive.run()"
|
|
120
|
+
],
|
|
121
|
+
"outputs": [],
|
|
122
|
+
"execution_count": null
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"cell_type": "code",
|
|
126
|
+
"execution_count": null,
|
|
127
|
+
"metadata": {},
|
|
128
|
+
"outputs": [],
|
|
129
|
+
"source": [
|
|
130
|
+
"plt.imshow(interactive.screenshot())\n",
|
|
131
|
+
"plt.axis('off')"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"cell_type": "markdown",
|
|
136
|
+
"metadata": {},
|
|
137
|
+
"source": "We select the coordinate system \"point8\" and load the elements \"point8_image\" and \"point8_labels\" into the viewer."
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"attachments": {},
|
|
141
|
+
"cell_type": "code",
|
|
142
|
+
"metadata": {},
|
|
143
|
+
"source": [
|
|
144
|
+
"plt.imshow(interactive.screenshot())\n",
|
|
145
|
+
"plt.axis('off')"
|
|
146
|
+
],
|
|
147
|
+
"outputs": [],
|
|
148
|
+
"execution_count": null
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"cell_type": "markdown",
|
|
152
|
+
"metadata": {},
|
|
153
|
+
"source": "Select \"point8_labels\" in the list of layers. Then, we open the \"Scatter\" Widget by using the menu bar and going to Plugins > napari-spatialdata > Scatter. This loads the AnnData object associated with that layer into the \"Scatter\" Widget."
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"attachments": {},
|
|
157
|
+
"cell_type": "code",
|
|
158
|
+
"metadata": {},
|
|
159
|
+
"source": [
|
|
160
|
+
"plt.imshow(interactive.screenshot())\n",
|
|
161
|
+
"plt.axis('off')"
|
|
162
|
+
],
|
|
163
|
+
"outputs": [],
|
|
164
|
+
"execution_count": null
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"cell_type": "markdown",
|
|
168
|
+
"metadata": {},
|
|
169
|
+
"source": [
|
|
170
|
+
"Then, we can now pick specific x-axis, y-axis and color values to visualize in the scatterplot.\n",
|
|
171
|
+
"\n",
|
|
172
|
+
"In the example below, we're visualizing the UMAP (Uniform Manifold Approximation and Projection) coordinates of two different axes and coloring it by cell size."
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"attachments": {},
|
|
177
|
+
"cell_type": "code",
|
|
178
|
+
"metadata": {},
|
|
179
|
+
"source": [
|
|
180
|
+
"plt.imshow(interactive.screenshot())\n",
|
|
181
|
+
"plt.axis('off')"
|
|
182
|
+
],
|
|
183
|
+
"outputs": [],
|
|
184
|
+
"execution_count": null
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"cell_type": "markdown",
|
|
188
|
+
"metadata": {},
|
|
189
|
+
"source": [
|
|
190
|
+
"After plotting, it is possible to interactively select clusters and export it to AnnData.\n",
|
|
191
|
+
"\n",
|
|
192
|
+
"In the example below, we used the cursor to select a cluster on the left half of the scatterplot. We can export it into AnnData by clicking on the \"Annotate\" button."
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"attachments": {},
|
|
197
|
+
"cell_type": "code",
|
|
198
|
+
"metadata": {},
|
|
199
|
+
"source": [
|
|
200
|
+
"plt.imshow(interactive.screenshot())\n",
|
|
201
|
+
"plt.axis('off')"
|
|
202
|
+
],
|
|
203
|
+
"outputs": [],
|
|
204
|
+
"execution_count": null
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"cell_type": "markdown",
|
|
208
|
+
"metadata": {},
|
|
209
|
+
"source": "After exporting, we can now view the selected points with the View widget. Close the Scatter Widget and from the menu bar, go to Plugins > napari-spatialdata > View. You should be able to observe \"my_annotation\" under \"Observations:\". This is selected points we exported in the previous step."
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"attachments": {},
|
|
213
|
+
"cell_type": "markdown",
|
|
214
|
+
"metadata": {},
|
|
215
|
+
"source": "Double clicking on \"my_annotation\" loads it as a layer in the Napari viewer."
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"attachments": {},
|
|
219
|
+
"cell_type": "code",
|
|
220
|
+
"metadata": {},
|
|
221
|
+
"source": [
|
|
222
|
+
"plt.imshow(interactive.screenshot())\n",
|
|
223
|
+
"plt.axis('off')"
|
|
224
|
+
],
|
|
225
|
+
"outputs": [],
|
|
226
|
+
"execution_count": null
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"metadata": {
|
|
230
|
+
"kernelspec": {
|
|
231
|
+
"display_name": "Python 3 (ipykernel)",
|
|
232
|
+
"language": "python",
|
|
233
|
+
"name": "python3"
|
|
234
|
+
},
|
|
235
|
+
"language_info": {
|
|
236
|
+
"codemirror_mode": {
|
|
237
|
+
"name": "ipython",
|
|
238
|
+
"version": 3
|
|
239
|
+
},
|
|
240
|
+
"file_extension": ".py",
|
|
241
|
+
"mimetype": "text/x-python",
|
|
242
|
+
"name": "python",
|
|
243
|
+
"nbconvert_exporter": "python",
|
|
244
|
+
"pygments_lexer": "ipython3",
|
|
245
|
+
"version": "3.10.14"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"nbformat": 4,
|
|
249
|
+
"nbformat_minor": 4
|
|
250
|
+
}
|
{napari_spatialdata-0.7.0 → napari_spatialdata-0.7.1}/docs/notebooks/nanostring_analysis.ipynb
RENAMED
|
@@ -4,17 +4,13 @@
|
|
|
4
4
|
"attachments": {},
|
|
5
5
|
"cell_type": "markdown",
|
|
6
6
|
"metadata": {},
|
|
7
|
-
"source":
|
|
8
|
-
"# Analyse Nanostring data in Napari-SpatialData \n"
|
|
9
|
-
]
|
|
7
|
+
"source": "# Analyse Cosmx data in Napari-SpatialData\n"
|
|
10
8
|
},
|
|
11
9
|
{
|
|
12
10
|
"attachments": {},
|
|
13
11
|
"cell_type": "markdown",
|
|
14
12
|
"metadata": {},
|
|
15
|
-
"source":
|
|
16
|
-
"This tutorial shows how to load and analyse Nanostring data with the Napari-SpatialData plugin.\n"
|
|
17
|
-
]
|
|
13
|
+
"source": "This tutorial shows how to load and analyze Cosmx data with the Napari-SpatialData plugin.\n"
|
|
18
14
|
},
|
|
19
15
|
{
|
|
20
16
|
"attachments": {},
|
|
@@ -60,43 +56,7 @@
|
|
|
60
56
|
"attachments": {},
|
|
61
57
|
"cell_type": "markdown",
|
|
62
58
|
"metadata": {},
|
|
63
|
-
"source": [
|
|
64
|
-
"Next, we will download the Nanostring dataset (cosmx_io) for analysis. \n",
|
|
65
|
-
"\n",
|
|
66
|
-
"If on Windows, download the dataset from https://s3.embl.de/spatialdata/spatialdata-sandbox/cosmx_io.zip.\n",
|
|
67
|
-
"\n",
|
|
68
|
-
"In on Linux, uncomment the lines below to download the dataset. "
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"cell_type": "code",
|
|
73
|
-
"execution_count": 2,
|
|
74
|
-
"metadata": {},
|
|
75
|
-
"outputs": [
|
|
76
|
-
{
|
|
77
|
-
"name": "stdout",
|
|
78
|
-
"output_type": "stream",
|
|
79
|
-
"text": [
|
|
80
|
-
"--2023-05-03 21:11:58-- https://s3.embl.de/spatialdata/spatialdata-sandbox/cosmx_io.zip\n",
|
|
81
|
-
"Resolving s3.embl.de (s3.embl.de)... 194.94.45.80\n",
|
|
82
|
-
"Connecting to s3.embl.de (s3.embl.de)|194.94.45.80|:443... connected.\n",
|
|
83
|
-
"HTTP request sent, awaiting response... 200 OK\n",
|
|
84
|
-
"Length: 2210531049 (2,1G) [application/zip]\n",
|
|
85
|
-
"Saving to: ‘tutorial_data/nanostring_data/cosmx_io.zip’\n",
|
|
86
|
-
"\n",
|
|
87
|
-
"cosmx_io.zip 100%[===================>] 2,06G 10,9MB/s in 3m 21s \n",
|
|
88
|
-
"\n",
|
|
89
|
-
"2023-05-03 21:15:19 (10,5 MB/s) - ‘tutorial_data/nanostring_data/cosmx_io.zip’ saved [2210531049/2210531049]\n",
|
|
90
|
-
"\n"
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
],
|
|
94
|
-
"source": [
|
|
95
|
-
"# !mkdir tutorial_data\n",
|
|
96
|
-
"# !mkdir tutorial_data/nanostring_data\n",
|
|
97
|
-
"# !wget -P tutorial_data/nanostring_data https://s3.embl.de/spatialdata/spatialdata-sandbox/cosmx_io.zip\n",
|
|
98
|
-
"# !unzip tutorial_data/nanostring_data/cosmx_io.zip -d tutorial_data/nanostring_data"
|
|
99
|
-
]
|
|
59
|
+
"source": "Please download the CosMx raw data from https://brukerspatialbiology.com/products/cosmx-spatial-molecular-imager/ffpe-dataset/nsclc-ffpe-dataset/, parse it using `spatialdata_io` and save it to the SpatialData Zarr format (you can for instance [use this script](https://github.com/giovp/spatialdata-sandbox/blob/main/cosmx_io/to_zarr.py)).\n"
|
|
100
60
|
},
|
|
101
61
|
{
|
|
102
62
|
"attachments": {},
|