portal-visualization 0.4.20__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.
- portal_visualization-0.4.20/LICENSE +21 -0
- portal_visualization-0.4.20/MANIFEST.in +20 -0
- portal_visualization-0.4.20/PKG-INFO +360 -0
- portal_visualization-0.4.20/README.md +308 -0
- portal_visualization-0.4.20/VERSION.txt +1 -0
- portal_visualization-0.4.20/pyproject.toml +162 -0
- portal_visualization-0.4.20/setup.cfg +4 -0
- portal_visualization-0.4.20/src/portal_visualization/__init__.py +36 -0
- portal_visualization-0.4.20/src/portal_visualization/assays.py +14 -0
- portal_visualization-0.4.20/src/portal_visualization/builder_factory.py +256 -0
- portal_visualization-0.4.20/src/portal_visualization/builders/__init__.py +1 -0
- portal_visualization-0.4.20/src/portal_visualization/builders/anndata_builders.py +870 -0
- portal_visualization-0.4.20/src/portal_visualization/builders/base_builders.py +133 -0
- portal_visualization-0.4.20/src/portal_visualization/builders/epic_builders.py +208 -0
- portal_visualization-0.4.20/src/portal_visualization/builders/imaging_builders.py +512 -0
- portal_visualization-0.4.20/src/portal_visualization/builders/object_by_analyte_builders.py +300 -0
- portal_visualization-0.4.20/src/portal_visualization/builders/scatterplot_builders.py +112 -0
- portal_visualization-0.4.20/src/portal_visualization/builders/sprm_builders.py +366 -0
- portal_visualization-0.4.20/src/portal_visualization/cli.py +152 -0
- portal_visualization-0.4.20/src/portal_visualization/client.py +540 -0
- portal_visualization-0.4.20/src/portal_visualization/constants.py +12 -0
- portal_visualization-0.4.20/src/portal_visualization/defaults.json +22 -0
- portal_visualization-0.4.20/src/portal_visualization/epic_factory.py +18 -0
- portal_visualization-0.4.20/src/portal_visualization/mock_client.py +50 -0
- portal_visualization-0.4.20/src/portal_visualization/paths.py +19 -0
- portal_visualization-0.4.20/src/portal_visualization/utils.py +299 -0
- portal_visualization-0.4.20/src/portal_visualization.egg-info/PKG-INFO +360 -0
- portal_visualization-0.4.20/src/portal_visualization.egg-info/SOURCES.txt +30 -0
- portal_visualization-0.4.20/src/portal_visualization.egg-info/dependency_links.txt +1 -0
- portal_visualization-0.4.20/src/portal_visualization.egg-info/entry_points.txt +2 -0
- portal_visualization-0.4.20/src/portal_visualization.egg-info/requires.txt +23 -0
- portal_visualization-0.4.20/src/portal_visualization.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 HuBMAP Consortium
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Include package metadata
|
|
2
|
+
include VERSION.txt
|
|
3
|
+
include LICENSE
|
|
4
|
+
include README.md
|
|
5
|
+
|
|
6
|
+
# Package data is handled by [tool.setuptools.package-data] in pyproject.toml
|
|
7
|
+
# This MANIFEST.in controls source distribution contents
|
|
8
|
+
|
|
9
|
+
# Exclude build artifacts
|
|
10
|
+
global-exclude __pycache__
|
|
11
|
+
global-exclude *.py[cod]
|
|
12
|
+
global-exclude .DS_Store
|
|
13
|
+
global-exclude *.so
|
|
14
|
+
global-exclude .git*
|
|
15
|
+
|
|
16
|
+
# Exclude test artifacts
|
|
17
|
+
prune test
|
|
18
|
+
prune build
|
|
19
|
+
prune dist
|
|
20
|
+
prune *.egg-info
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: portal-visualization
|
|
3
|
+
Version: 0.4.20
|
|
4
|
+
Summary: Given HuBMAP Dataset JSON, creates a Vitessce configuration.
|
|
5
|
+
Author-email: Chuck McCallum <mccallucc@gmail.com>
|
|
6
|
+
Maintainer-email: HIDIVE Lab at Harvard Medical School <hidive@hms.harvard.edu>, Nikolay Akhmetov <nikolay_akhmetov@hms.harvard.edu>, Tabassum Kakar <tabassum_kakar@hms.harvard.edu>, John Conroy <john_conroy@hms.harvard.edu>, Lisa Choy <lisa_choy@hms.harvard.edu>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/hubmapconsortium/portal-visualization
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/hubmapconsortium/portal-visualization/issues
|
|
10
|
+
Project-URL: Source Code, https://github.com/hubmapconsortium/portal-visualization
|
|
11
|
+
Project-URL: Documentation, https://github.com/hubmapconsortium/portal-visualization#readme
|
|
12
|
+
Project-URL: Changelog, https://github.com/hubmapconsortium/portal-visualization/releases
|
|
13
|
+
Keywords: hubmap,vitessce,visualization,bioinformatics,imaging,sequencing,single-cell,spatial-transcriptomics
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
25
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
26
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
27
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
|
+
Requires-Python: >=3.10
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Provides-Extra: full
|
|
32
|
+
Requires-Dist: vitessce==3.7.4; extra == "full"
|
|
33
|
+
Requires-Dist: hubmap-commons>=2.0.15; extra == "full"
|
|
34
|
+
Requires-Dist: flask>=2.0.0; extra == "full"
|
|
35
|
+
Requires-Dist: werkzeug>=2.0.0; extra == "full"
|
|
36
|
+
Requires-Dist: requests>=2.27.1; extra == "full"
|
|
37
|
+
Requires-Dist: nbformat>=5.1.3; extra == "full"
|
|
38
|
+
Requires-Dist: zarr>=2.17.2; extra == "full"
|
|
39
|
+
Requires-Dist: aiohttp>=3.8.1; extra == "full"
|
|
40
|
+
Requires-Dist: fsspec>=2022.1.0; extra == "full"
|
|
41
|
+
Requires-Dist: python-datauri>=2.2.0; extra == "full"
|
|
42
|
+
Provides-Extra: dev
|
|
43
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
44
|
+
Requires-Dist: pytest-mock>=3.7.0; extra == "dev"
|
|
45
|
+
Requires-Dist: coverage>=7.6.4; extra == "dev"
|
|
46
|
+
Requires-Dist: pyyaml>=6.0.2; extra == "dev"
|
|
47
|
+
Requires-Dist: ruff>=0.8.0; extra == "dev"
|
|
48
|
+
Requires-Dist: build>=0.10.0; extra == "dev"
|
|
49
|
+
Provides-Extra: all
|
|
50
|
+
Requires-Dist: portal-visualization[dev,full]; extra == "all"
|
|
51
|
+
Dynamic: license-file
|
|
52
|
+
|
|
53
|
+
# portal-visualization
|
|
54
|
+
|
|
55
|
+
Given HuBMAP Dataset JSON (e.g. https://portal.hubmapconsortium.org/browse/dataset/004d4f157df4ba07356cd805131dfc04.json), creates a Vitessce configuration.
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
This package provides two install modes to suit different use cases:
|
|
60
|
+
|
|
61
|
+
### Thin Install (Default)
|
|
62
|
+
|
|
63
|
+
For applications that only need to check if a dataset has visualization support without generating actual visualizations:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install portal-visualization
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Features:**
|
|
70
|
+
|
|
71
|
+
- Provides `has_visualization()` function to check visualization availability
|
|
72
|
+
- Minimal dependencies (pure Python, <1 MB install size)
|
|
73
|
+
- Fast installation and import times
|
|
74
|
+
- Ideal for services that need to filter/check datasets
|
|
75
|
+
|
|
76
|
+
**Example usage:**
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from portal_visualization import has_visualization
|
|
80
|
+
|
|
81
|
+
entity = {"uuid": "abc123", "vitessce-hints": ["is_image", "rna"]}
|
|
82
|
+
if has_visualization(entity, get_entity_fn):
|
|
83
|
+
print("This dataset can be visualized")
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Full Install
|
|
87
|
+
|
|
88
|
+
For applications that need complete visualization generation capabilities:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install portal-visualization[full]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Features:**
|
|
95
|
+
|
|
96
|
+
- Complete Vitessce configuration generation
|
|
97
|
+
- All visualization builders and dependencies (~150 MB install size)
|
|
98
|
+
- Required for portal-ui and search-api
|
|
99
|
+
- Includes vitessce, zarr, aiohttp, and other visualization libraries
|
|
100
|
+
|
|
101
|
+
**Example usage:**
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
from portal_visualization.builder_factory import get_view_config_builder
|
|
105
|
+
|
|
106
|
+
builder = get_view_config_builder(entity, get_entity_fn)
|
|
107
|
+
conf_cells = builder.get_conf_cells(marker="CD45")
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Development Install
|
|
111
|
+
|
|
112
|
+
For contributors developing the package:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
pip install portal-visualization[all]
|
|
116
|
+
# or
|
|
117
|
+
pip install -e ".[all]" # for editable install
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
This installs both `[full]` and `[dev]` extras (testing, linting tools).
|
|
121
|
+
|
|
122
|
+
## Release process
|
|
123
|
+
|
|
124
|
+
This is a dependency of [portal-ui](https://github.com/hubmapconsortium/portal-ui/search?q=builder_factory) and [search-api](https://github.com/hubmapconsortium/search-api/search?q=builder_factory).
|
|
125
|
+
|
|
126
|
+
Updates that are more than housekeeping should result in a new release:
|
|
127
|
+
|
|
128
|
+
- bump `VERSION.txt`.
|
|
129
|
+
- make a new git tag: `V=$(cat VERSION.txt); git tag $V; git push origin $V`.
|
|
130
|
+
- make a release on github.
|
|
131
|
+
- **Test both install modes**: `pip install dist/portal_visualization-*.whl` (thin) and `pip install dist/portal_visualization-*.whl[full]` (full)
|
|
132
|
+
- in portal-ui, update `pyproject.toml` to use `portal-visualization[full]`.
|
|
133
|
+
- in search-api, update `requirements.txt` to use `portal-visualization`.
|
|
134
|
+
|
|
135
|
+
**Note:** Downstream projects which require complete visualization capabilities (e.g. `portal-ui`) should install with `[full]` extras to maintain complete visualization capabilities. Projects which only require the `has_visualization` function (e.g. `search_api`)
|
|
136
|
+
|
|
137
|
+
## Development Setup
|
|
138
|
+
|
|
139
|
+
This project uses modern Python tooling:
|
|
140
|
+
|
|
141
|
+
- **uv** for fast dependency management and packaging
|
|
142
|
+
- **ruff** for linting and formatting
|
|
143
|
+
- **pytest** for testing with 100% coverage requirement
|
|
144
|
+
|
|
145
|
+
### Installation
|
|
146
|
+
|
|
147
|
+
Install dependencies using uv:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Install uv if not already installed
|
|
151
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
152
|
+
|
|
153
|
+
# For thin install testing (has_visualization only)
|
|
154
|
+
uv sync
|
|
155
|
+
|
|
156
|
+
# For full install testing (complete functionality)
|
|
157
|
+
uv sync --extra full
|
|
158
|
+
|
|
159
|
+
# For development (includes all extras)
|
|
160
|
+
uv sync --all-extras
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Alternatively, use pip if desired:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Thin install
|
|
167
|
+
pip install -e .
|
|
168
|
+
|
|
169
|
+
# Full install
|
|
170
|
+
pip install -e ".[full]"
|
|
171
|
+
|
|
172
|
+
# Development install
|
|
173
|
+
pip install -e ".[all]"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## CLI
|
|
177
|
+
|
|
178
|
+
Installing this package makes the `vis-preview` command available:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Using uv
|
|
182
|
+
uv sync
|
|
183
|
+
uv run vis-preview --help
|
|
184
|
+
|
|
185
|
+
# Or with pip
|
|
186
|
+
pip install .
|
|
187
|
+
vis-preview --help
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Usage:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
usage: vis-preview [-h] (--url URL | --json JSON) [--assets_url URL]
|
|
194
|
+
[--token TOKEN] [--marker MARKER] [--to_json]
|
|
195
|
+
[--epic_uuid UUID] [--parent_uuid UUID]
|
|
196
|
+
|
|
197
|
+
Given HuBMAP Dataset JSON, generate a Vitessce viewconf, and load vitessce.io.
|
|
198
|
+
|
|
199
|
+
options:
|
|
200
|
+
-h, --help show this help message and exit
|
|
201
|
+
--url URL URL which returns Dataset JSON
|
|
202
|
+
--json JSON File containing Dataset JSON
|
|
203
|
+
--assets_url URL Assets endpoint; default:
|
|
204
|
+
https://assets.dev.hubmapconsortium.org
|
|
205
|
+
--token TOKEN Globus groups token; Only needed if data is not public
|
|
206
|
+
--marker MARKER Marker to highlight in visualization; Only used in some
|
|
207
|
+
visualizations.
|
|
208
|
+
--to_json Output viewconf, rather than open in browser.
|
|
209
|
+
--epic_uuid UUID uuid of the EPIC dataset.
|
|
210
|
+
--parent_uuid UUID Parent uuid - Only needed for an image-pyramid support
|
|
211
|
+
dataset.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Notes:
|
|
215
|
+
|
|
216
|
+
1. The token can be retrieved by looking for Authorization Bearer {token represented by a long string} under `search-api` network calls under the network tab in developer's tool when browsing a dataset in portal while logged in. The token is necessary to access non-public datasets, such as those in QA.
|
|
217
|
+
2. The documentation for the `vis-preview` command must match its `--help` output. When a command argument is added or modified, the README must be updated to match the output of `vis-preview --help`.
|
|
218
|
+
|
|
219
|
+
## Package Structure
|
|
220
|
+
|
|
221
|
+
The package follows modern Python packaging standards:
|
|
222
|
+
|
|
223
|
+
- **Entry point**: The CLI is installed as a console script entry point (`vis-preview`) that calls `portal_visualization.cli:main()`
|
|
224
|
+
- **Package data**: `defaults.json` is included as package data via `[tool.setuptools.package-data]`
|
|
225
|
+
- **Source layout**: All code is in `src/portal_visualization/` following the src-layout pattern
|
|
226
|
+
- **Distribution**: `MANIFEST.in` controls what files are included in source distributions
|
|
227
|
+
|
|
228
|
+
## Build & Testing
|
|
229
|
+
|
|
230
|
+
### Building
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Using uv (recommended)
|
|
234
|
+
uv build
|
|
235
|
+
|
|
236
|
+
# Or using standard Python build tools
|
|
237
|
+
python -m build
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Running Tests
|
|
241
|
+
|
|
242
|
+
The test suite supports both thin and full install modes:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Run the full test suite (requires [full] extras)
|
|
246
|
+
./test.sh
|
|
247
|
+
|
|
248
|
+
# Run only thin install tests (no [full] extras needed)
|
|
249
|
+
uv run pytest -m "not requires_full"
|
|
250
|
+
|
|
251
|
+
# Run individual checks
|
|
252
|
+
uv run ruff check src/ test/ # Linting
|
|
253
|
+
uv run ruff format --check src/ test/ # Format checking
|
|
254
|
+
uv run ruff format src/ test/ # Auto-format code
|
|
255
|
+
uv run pytest -vv --doctest-modules # Tests only
|
|
256
|
+
uv run coverage run -m pytest # With coverage
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Test organization:**
|
|
260
|
+
|
|
261
|
+
- Tests marked with `@pytest.mark.requires_full` need the `[full]` install
|
|
262
|
+
- The `has_visualization` function and core logic can be tested without heavy dependencies
|
|
263
|
+
- CI should test both modes to ensure compatibility
|
|
264
|
+
|
|
265
|
+
All code must:
|
|
266
|
+
|
|
267
|
+
- Pass ruff linting and formatting checks
|
|
268
|
+
- Maintain 100% test coverage
|
|
269
|
+
- Pass all pytest tests including doctests
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## Background
|
|
276
|
+
|
|
277
|
+

|
|
278
|
+
|
|
279
|
+
Data for the Vitessce visualization almost always comes via raw data that is processed by [ingest-pipeline](https://github.com/hubmapconsortium/ingest-pipeline) airflow dags.
|
|
280
|
+
Harvard often contributes our own custom pipelines to these dags that can be found in [portal-containers](https://github.com/hubmapconsortium/portal-containers).
|
|
281
|
+
|
|
282
|
+
The outputs of these pipelines are then converted into view configurations for Vitessce by the [portal backend](https://github.com/hubmapconsortium/portal-visualization/blob/main/src/portal_visualization/client.py), The `vis-preview.py` mimics the invocation of `get_view_config_builder` for development and testing purposes independently, i.e., without using the [portal backend](https://github.com/hubmapconsortium/portal-ui/blob/main/context/app/routes_browse.py#L126).
|
|
283
|
+
|
|
284
|
+
using code in this repo, when a `Dataset` that should be visualized is requested in the client.
|
|
285
|
+
The view configurations are built using the [Vitessce-Python API](https://vitessce.github.io/vitessce-python/).
|
|
286
|
+
|
|
287
|
+
### Imaging Data
|
|
288
|
+
|
|
289
|
+
HuBMAP receives various imaging modalities (microscopy and otherwise).
|
|
290
|
+
The processing is fairly uniform, and always includes running [ome-tiff-pyramid](https://github.com/hubmapconsortium/ome-tiff-pyramid) + a [pipeline](https://github.com/hubmapconsortium/portal-containers/tree/main/containers/ome-tiff-offsets) for extracting byte offsets to [optimize visualization](https://github.com/hms-dbmi/viv/tree/master/tutorial#viewing-in-avivator) load speeds of large imaging datasets.
|
|
291
|
+
Vitessce is able to view OME-TIFF files directly via [Viv](https://github.com/hms-dbmi/viv). Two pipelines are commonly used for processing the image data with a more analytic orientation:
|
|
292
|
+
[Cytokit](https://github.com/hubmapconsortium/codex-pipeline) is used to produce segmentations (+ stitching if the input data is tiled) for downstream analysis and [SPRM](https://github.com/hubmapconsortium/sprm) is one such analytic pipeline that does clustering and quantification.
|
|
293
|
+
Below are common questions and answers for imaging modalities:
|
|
294
|
+
|
|
295
|
+
<details><summary>Has the data been validated via ingest-validation-tools and confirmed to be viewable using Avivator (which loads data almost identically to what is in the portal)?</summary>
|
|
296
|
+
|
|
297
|
+
If so, we should ask the TMC to follow the instructions below for viewing their data in Avivator to make sure it looks right (should only need to be done for a single representative file): https://github.com/hms-dbmi/viv/tree/master/tutorial
|
|
298
|
+
|
|
299
|
+
In the above instructions they should only need to a) run the `bioformats2raw-raw2ometiff` pipeline and then b) drag-and-drop or select the input file using the "CHOOSE A FILE" button on avivator.gehlenborglab.org. There is no need for a web server.
|
|
300
|
+
|
|
301
|
+
If there is a z or t stack to the data, ensure that each "stack" is uploaded as a single file.
|
|
302
|
+
|
|
303
|
+
If it is valid in these three senses (viewable in Avivator locally, passes `ingest-validation-tools`, and "stacks" are uploaded as single files), then ingestion may be done and pipeline processing may proceed.
|
|
304
|
+
|
|
305
|
+
</details>
|
|
306
|
+
|
|
307
|
+
<details><summary>Is there "spot" data, such as resolved probe locations from a FISH assay that needs to be visualized as a Vitessce molecules data type?</summary>
|
|
308
|
+
|
|
309
|
+
If the answer is "yes," we should run the image pyramid pipeline + offsets on the appropriate imaging data. We currently do not have a pipeline for visualizing spot data.
|
|
310
|
+
Create a new class that inherits from ViewConfBuilder to visualize the data (raw imaging + spot data) when such a pipeline is created.
|
|
311
|
+
If there is segmentation data coming from the TMC or elsewhere, then that will need to be both processed (via [sprm-to-anndata.cwl from portal-containers](https://github.com/hubmapconsortium/portal-containers/tree/master/containers/sprm-to-anndata) or a different pipeline that ideally outputs zarr-backed AnnData) and visualized as well.
|
|
312
|
+
|
|
313
|
+
</details>
|
|
314
|
+
|
|
315
|
+
<details><summary>Will Cytokit + SPRM be run?</summary>
|
|
316
|
+
|
|
317
|
+
If the answer is "yes," we should run [sprm-to-anndata.cwl from portal-containers](https://github.com/hubmapconsortium/portal-containers/tree/master/containers/sprm-to-anndata) on the output of SPRM and the image pyramid pipeline + offsets on the output of Cytokit.
|
|
318
|
+
Extend [`StitchedCytokitSPRMViewConfBuilder`](https://github.com/hubmapconsortium/portal-visualization/blob/d9e924547d970f8469cf74881ce05cc22500b7fc/src/builders/sprm_builders.py#L287) to handle this assay.
|
|
319
|
+
|
|
320
|
+
</details>
|
|
321
|
+
|
|
322
|
+
<details><summary>Will only SPRM be run (on non-Cytokit Segmentations)?</summary>
|
|
323
|
+
|
|
324
|
+
If the answer is "yes," we should run [sprm-to-anndata.cwl from portal-containers](https://github.com/hubmapconsortium/portal-containers/tree/master/containers/sprm-to-anndata) from portal-containers on the output of SPRM and the image pyramid pipeline + offsets on the raw input data.
|
|
325
|
+
Create a new class that extends `MultiImageSPRMAnndataViewConfBuilder`, similar to [`StitchedCytokitSPRMViewConfBuilder`](https://github.com/hubmapconsortium/portal-visualization/blob/d9e924547d970f8469cf74881ce05cc22500b7fc/src/builders/sprm_builders.py#L287) if needed for multiple images in the same dataset.
|
|
326
|
+
Otherwise you may use [`SPRMAnnDataViewConfBuilder`](https://github.com/hubmapconsortium/portal-visualization/blob/d9e924547d970f8469cf74881ce05cc22500b7fc/src/builders/sprm_builders.py#L138) with the proper arguments.
|
|
327
|
+
|
|
328
|
+
</details>
|
|
329
|
+
|
|
330
|
+
<details><summary>For everything else...</summary>
|
|
331
|
+
|
|
332
|
+
Run the image pyramid pipeline + offsets on the raw input data.
|
|
333
|
+
Attach the assay to a new class in the portal backend similar to [`SeqFISHViewConfBuilder`](https://github.com/hubmapconsortium/portal-visualization/blob/d9e924547d970f8469cf74881ce05cc22500b7fc/src/builders/imaging_builders.py#L113) or [`ImagePyramidViewConfBuilder`](https://github.com/hubmapconsortium/portal-visualization/blob/d9e924547d970f8469cf74881ce05cc22500b7fc/src/builders/imaging_builders.py#L58).
|
|
334
|
+
This will depend on how you want the layout to look to the end user.
|
|
335
|
+
|
|
336
|
+
</details>
|
|
337
|
+
|
|
338
|
+
### Sequencing Data
|
|
339
|
+
|
|
340
|
+
#### xxxx-RNA-seq
|
|
341
|
+
|
|
342
|
+
Currently, `RNA-seq` data comes as `AnnData` `h5ad` files from [Matt's pipeline](https://github.com/hubmapconsortium/salmon-rnaseq). Vitessce is able to view `AnnData` directly when saved as `zarr`. In order to visualize the data, the following steps must be taken to alter the the incoming `AnnData` `h5ad` file:
|
|
343
|
+
|
|
344
|
+
1. Chunked correctly for optimal viewing
|
|
345
|
+
2. Marker genes located in the `obs` part of the store (so they may be visualized as pop-overs when hovered)
|
|
346
|
+
3. A filter for a subset of genes (corresponding to the marker genes) is stored so that it may be rendered as a heatmap.
|
|
347
|
+
4. Save this altered dataset as a `.zarr` store.
|
|
348
|
+
|
|
349
|
+
These steps are exexuted by the [`anndata-to-ui`](https://github.com/hubmapconsortium/portal-containers/blob/dc568234c76017c7cd9644a4d15ef0f7b9d84e24/containers/anndata-to-ui/context/main.py#L17-L67) container that is run after Matt's pipeline; The view config is generated by [`RNASeqAnnDataZarrViewConfBuilder`](https://github.com/hubmapconsortium/portal-visualization/blob/d9e924547d970f8469cf74881ce05cc22500b7fc/src/builders/anndata_builders.py#L13).
|
|
350
|
+
Currently the portal backend cannot handle `slide-seq`, which is a spatially resolved `RNA-seq` assay, but its `ViewConfBuilder` class will look be the same as `RNASeqAnnDataZarrViewConfBuilder`, except for an additional `spatial_polygon_obsm="X_spatial"` argument to the `AnnDataWrapper` as well as a `SPATIAL` vitessce component in the view config.
|
|
351
|
+
|
|
352
|
+
#### xxxx-ATAC-seq
|
|
353
|
+
|
|
354
|
+
Currently only the (mis-named) [h5ad-to-arrow](https://github.com/hubmapconsortium/portal-containers/tree/master/containers/h5ad-to-arrow) pipeline is used to convert `h5ad` `AnnData` files to `json` that contains only the scatterplot results of the scanpy analysis.
|
|
355
|
+
In the future, [`vitessce-python`](https://github.com/vitessce/vitessce-python/blob/c7edf9c0057fb1e5fc53e957c0657e61b0e43b90/vitessce/wrappers.py#L543) (or something similar) should be used as a new container to process the `SnapATAC`-backed (or other method of storage) peaks for visualization in Vitessce as [genomic profiles](http://beta.vitessce.io/docs/data-file-types/index.html#genomic-profileszarr).
|
|
356
|
+
See [here](http://beta.vitessce.io/index.html?dataset=sn-atac-seq-hubmap-2020) for a demo what the final result will look like.
|
|
357
|
+
|
|
358
|
+
#### SNARE-seq
|
|
359
|
+
|
|
360
|
+
`SNARE-seq` is a mix of the above two modalities and its processing and visualization is still TBD.
|