From 9bc140d79358ef74d3712f0bd5e8d68896db94c0 Mon Sep 17 00:00:00 2001 From: Mark Keller <7525285+keller-mark@users.noreply.github.com> Date: Fri, 11 Jul 2025 17:08:43 -0400 Subject: [PATCH 1/2] WIP: nb for example from tmt --- docs/notebooks/spatial_data_merfish.ipynb | 456 ++++++++++++++++++++++ 1 file changed, 456 insertions(+) create mode 100644 docs/notebooks/spatial_data_merfish.ipynb diff --git a/docs/notebooks/spatial_data_merfish.ipynb b/docs/notebooks/spatial_data_merfish.ipynb new file mode 100644 index 00000000..b672d1d4 --- /dev/null +++ b/docs/notebooks/spatial_data_merfish.ipynb @@ -0,0 +1,456 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "nbsphinx": "hidden" + }, + "source": [ + "# Vitessce Widget Tutorial" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Visualization of a SpatialData object, blobs example" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Import dependencies\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/mkeller/research/dbmi/vitessce/vitessce-python/.venv/lib/python3.10/site-packages/dask/dataframe/__init__.py:31: FutureWarning: The legacy Dask DataFrame implementation is deprecated and will be removed in a future version. Set the configuration option `dataframe.query-planning` to `True` or None to enable the new Dask Dataframe implementation and silence this warning.\n", + " warnings.warn(\n" + ] + } + ], + "source": [ + "from spatialdata import read_zarr\n", + "from os.path import join" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "spatialdata_filepath = join(\"..\", \"..\", \"..\", \"tissue-map-tools\", \"examples\", \"moffitt_multiscale.sdata.zarr\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "version mismatch: detected: RasterFormatV02, requested: FormatV04\n", + "/Users/mkeller/research/dbmi/vitessce/vitessce-python/.venv/lib/python3.10/site-packages/zarr/creation.py:614: UserWarning: ignoring keyword argument 'read_only'\n", + " compressor, fill_value = _kwargs_compat(compressor, fill_value, kwargs)\n", + "/Users/mkeller/research/dbmi/vitessce/vitessce-python/.venv/lib/python3.10/site-packages/anndata/_core/aligned_df.py:68: ImplicitModificationWarning: Transforming to str index.\n", + " warnings.warn(\"Transforming to str index.\", ImplicitModificationWarning)\n" + ] + } + ], + "source": [ + "sdata = read_zarr(spatialdata_filepath)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "SpatialData object, with associated Zarr store: /Users/mkeller/research/dbmi/vitessce/tissue-map-tools/examples/moffitt_multiscale.sdata.zarr\n", + "├── Images\n", + "│ └── 'stains': DataTree[czyx] (2, 9, 9392, 5721), (2, 4, 4696, 2860), (2, 2, 2348, 1430)\n", + "├── Labels\n", + "│ ├── 'dapi_labels': DataTree[zyx] (9, 9392, 5721), (4, 4696, 2860), (2, 2348, 1430)\n", + "│ └── 'membrane_labels': DataTree[zyx] (9, 9392, 5721), (4, 4696, 2860), (2, 2348, 1430)\n", + "├── Points\n", + "│ ├── 'cells_centroids_cellpose': DataFrame with shape: (, 3) (3D points)\n", + "│ ├── 'molecule_baysor': DataFrame with shape: (, 21) (3D points)\n", + "│ └── 'molecules': DataFrame with shape: (, 12) (3D points)\n", + "├── Shapes\n", + "│ ├── 'cells_baysor': GeoDataFrame shape: (33222, 6) (2D shapes)\n", + "│ ├── 'cells_circles_baysor': GeoDataFrame shape: (5749, 2) (2D shapes)\n", + "│ ├── 'cells_layer_1_baysor': GeoDataFrame shape: (3797, 3) (2D shapes)\n", + "│ ├── 'cells_layer_2_baysor': GeoDataFrame shape: (4037, 3) (2D shapes)\n", + "│ ├── 'cells_layer_3_baysor': GeoDataFrame shape: (4298, 3) (2D shapes)\n", + "│ ├── 'cells_layer_4_baysor': GeoDataFrame shape: (4446, 3) (2D shapes)\n", + "│ ├── 'cells_layer_5_baysor': GeoDataFrame shape: (4362, 3) (2D shapes)\n", + "│ ├── 'cells_layer_6_baysor': GeoDataFrame shape: (4008, 3) (2D shapes)\n", + "│ ├── 'cells_layer_7_baysor': GeoDataFrame shape: (3394, 3) (2D shapes)\n", + "│ ├── 'cells_layer_8_baysor': GeoDataFrame shape: (2717, 3) (2D shapes)\n", + "│ └── 'cells_layer_9_baysor': GeoDataFrame shape: (2163, 3) (2D shapes)\n", + "└── Tables\n", + " ├── 'gene_expression_baysor': AnnData (5800, 240)\n", + " └── 'gene_expression_cellpose': AnnData (8439, 241)\n", + "with coordinate systems:\n", + " ▸ 'global', with elements:\n", + " stains (Images), dapi_labels (Labels), membrane_labels (Labels), cells_centroids_cellpose (Points), molecule_baysor (Points), molecules (Points), cells_baysor (Shapes), cells_circles_baysor (Shapes), cells_layer_1_baysor (Shapes), cells_layer_2_baysor (Shapes), cells_layer_3_baysor (Shapes), cells_layer_4_baysor (Shapes), cells_layer_5_baysor (Shapes), cells_layer_6_baysor (Shapes), cells_layer_7_baysor (Shapes), cells_layer_8_baysor (Shapes), cells_layer_9_baysor (Shapes)" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sdata" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
xyzmolecule_idz_umareagenebrightnessx_umqc_scorey_umtotal_magnitude
01705.01271.00.012.54Maoa2.021306-2935.3860.954363-1218.580420.1126
11725.01922.00.022.54Maoa1.828640-2933.2290.908246-1147.614269.5874
21753.01863.00.032.55Maoa2.001268-2930.1040.977219-1154.062501.4615
31760.01865.00.042.57Maoa1.960428-2929.3390.991316-1153.784639.0364
41904.0794.00.052.56Maoa1.937280-2913.7180.983210-1270.474519.3154
\n", + "
" + ], + "text/plain": [ + " x y z molecule_id z_um area gene brightness x_um \\\n", + "0 1705.0 1271.0 0.0 1 2.5 4 Maoa 2.021306 -2935.386 \n", + "1 1725.0 1922.0 0.0 2 2.5 4 Maoa 1.828640 -2933.229 \n", + "2 1753.0 1863.0 0.0 3 2.5 5 Maoa 2.001268 -2930.104 \n", + "3 1760.0 1865.0 0.0 4 2.5 7 Maoa 1.960428 -2929.339 \n", + "4 1904.0 794.0 0.0 5 2.5 6 Maoa 1.937280 -2913.718 \n", + "\n", + " qc_score y_um total_magnitude \n", + "0 0.954363 -1218.580 420.1126 \n", + "1 0.908246 -1147.614 269.5874 \n", + "2 0.977219 -1154.062 501.4615 \n", + "3 0.991316 -1153.784 639.0364 \n", + "4 0.983210 -1270.474 519.3154 " + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sdata.points['molecules'].head()" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "from vitessce import (\n", + " VitessceConfig,\n", + " ViewType as vt,\n", + " CoordinationType as ct,\n", + " CoordinationLevel as CL,\n", + " SpatialDataWrapper,\n", + " get_initial_coordination_scope_prefix\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Configure Vitessce\n", + "\n", + "Vitessce needs to know which pieces of data we are interested in visualizing, the visualization types we would like to use, and how we want to coordinate (or link) the views." + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [], + "source": [ + "vc = VitessceConfig(\n", + " schema_version=\"1.0.17\",\n", + " name='SpatialData with MERFISH data',\n", + ")\n", + "# Add data to the configuration:\n", + "\n", + "dataset = vc.add_dataset(name='MERFISH').add_object(SpatialDataWrapper(\n", + " sdata_store=spatialdata_filepath,\n", + " # The following paths are relative to the root of the SpatialData zarr store on-disk.\n", + " image_path=\"images/stains\",\n", + " coordinate_system=\"global\",\n", + " coordination_values={\n", + " \"fileUid\": \"stains\"\n", + " }\n", + ")).add_object(SpatialDataWrapper(\n", + " sdata_store=spatialdata_filepath,\n", + " # The following paths are relative to the root of the SpatialData zarr store on-disk.\n", + " labels_path=\"labels/dapi_labels\",\n", + " coordinate_system=\"global\",\n", + " coordination_values={\n", + " \"obsType\": \"nucleus\",\n", + " \"fileUid\": \"dapi\"\n", + " }\n", + ")).add_object(SpatialDataWrapper(\n", + " sdata_store=spatialdata_filepath,\n", + " # The following paths are relative to the root of the SpatialData zarr store on-disk.\n", + " labels_path=\"labels/membrane_labels\",\n", + " coordinate_system=\"global\",\n", + " coordination_values={\n", + " \"obsType\": \"cell\",\n", + " \"fileUid\": \"membrane\"\n", + " }\n", + "))\n", + "\n", + "# Add views (visualizations) to the configuration:\n", + "spatial = vc.add_view(\"spatialBeta\", dataset=dataset)\n", + "layer_controller = vc.add_view(\"layerControllerBeta\", dataset=dataset)\n", + "\n", + "vc.link_views_by_dict([spatial, layer_controller], {\n", + " 'imageLayer': CL([{\n", + " \"fileUid\": \"stains\",\n", + " 'photometricInterpretation': 'BlackIsZero',\n", + " 'spatialLayerOpacity': 1.0,\n", + " 'spatialLayerVisible': True,\n", + " 'imageChannel': CL([\n", + " {\n", + " 'spatialChannelVisible': True,\n", + " \"spatialTargetC\": 0, # DAPI, Nucleus\n", + " \"spatialChannelColor\": [0, 0, 255],\n", + " \"spatialChannelOpacity\": 1.0\n", + " },\n", + " {\n", + " 'spatialChannelVisible': True,\n", + " \"spatialTargetC\": 1, # Membrane, Cell\n", + " \"spatialChannelColor\": [255, 255, 255],\n", + " \"spatialChannelOpacity\": 1.0\n", + " }\n", + " ])\n", + " }]),\n", + "}, scope_prefix=get_initial_coordination_scope_prefix(\"A\", \"image\"))\n", + "\n", + "vc.link_views_by_dict([spatial, layer_controller], {\n", + " 'segmentationLayer': CL([{\n", + " \"fileUid\": \"membrane\",\n", + " 'spatialLayerOpacity': 1.0,\n", + " 'spatialLayerVisible': True,\n", + " 'segmentationChannel': CL([{\n", + " 'spatialChannelVisible': True,\n", + " 'obsType': 'cell',\n", + " \"spatialChannelColor\": [200, 200, 200],\n", + " \"obsColorEncoding\": \"spatialChannelColor\",\n", + " }]),\n", + " }, {\n", + " \"fileUid\": \"dapi\",\n", + " 'spatialLayerOpacity': 1.0,\n", + " 'spatialLayerVisible': True,\n", + " 'segmentationChannel': CL([{\n", + " 'spatialChannelVisible': True,\n", + " 'obsType': 'nucleus',\n", + " \"spatialChannelColor\": [255, 255, 255],\n", + " \"obsColorEncoding\": \"spatialChannelColor\",\n", + " }]),\n", + " }]),\n", + "}, scope_prefix=get_initial_coordination_scope_prefix(\"A\", \"obsSegmentations\"))\n", + "\n", + "# Layout the views\n", + "vc.layout(spatial | layer_controller);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Render the widget" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "65667908b55d48d583d8b0d44aaba152", + "version_major": 2, + "version_minor": 1 + }, + "text/plain": [ + "VitessceWidget(config={'version': '1.0.17', 'name': 'SpatialData with MERFISH data', 'description': '', 'datas…" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "vw = vc.widget()\n", + "vw" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.14" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} From 5a4f702232cfa8e75b832fb62d497d13f84a3bc1 Mon Sep 17 00:00:00 2001 From: Mark Keller <7525285+keller-mark@users.noreply.github.com> Date: Mon, 14 Jul 2025 10:04:21 -0400 Subject: [PATCH 2/2] Use remote data --- docs/notebooks/spatial_data_merfish.ipynb | 266 +--------------------- 1 file changed, 9 insertions(+), 257 deletions(-) diff --git a/docs/notebooks/spatial_data_merfish.ipynb b/docs/notebooks/spatial_data_merfish.ipynb index b672d1d4..5d72ae90 100644 --- a/docs/notebooks/spatial_data_merfish.ipynb +++ b/docs/notebooks/spatial_data_merfish.ipynb @@ -25,248 +25,16 @@ }, { "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/mkeller/research/dbmi/vitessce/vitessce-python/.venv/lib/python3.10/site-packages/dask/dataframe/__init__.py:31: FutureWarning: The legacy Dask DataFrame implementation is deprecated and will be removed in a future version. Set the configuration option `dataframe.query-planning` to `True` or None to enable the new Dask Dataframe implementation and silence this warning.\n", - " warnings.warn(\n" - ] - } - ], - "source": [ - "from spatialdata import read_zarr\n", - "from os.path import join" - ] - }, - { - "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "spatialdata_filepath = join(\"..\", \"..\", \"..\", \"tissue-map-tools\", \"examples\", \"moffitt_multiscale.sdata.zarr\")" + "sdata_url = \"https://data-2.vitessce.io/data/moffitt/merfish_mouse_ileum.sdata.zarr\"" ] }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "version mismatch: detected: RasterFormatV02, requested: FormatV04\n", - "/Users/mkeller/research/dbmi/vitessce/vitessce-python/.venv/lib/python3.10/site-packages/zarr/creation.py:614: UserWarning: ignoring keyword argument 'read_only'\n", - " compressor, fill_value = _kwargs_compat(compressor, fill_value, kwargs)\n", - "/Users/mkeller/research/dbmi/vitessce/vitessce-python/.venv/lib/python3.10/site-packages/anndata/_core/aligned_df.py:68: ImplicitModificationWarning: Transforming to str index.\n", - " warnings.warn(\"Transforming to str index.\", ImplicitModificationWarning)\n" - ] - } - ], - "source": [ - "sdata = read_zarr(spatialdata_filepath)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "SpatialData object, with associated Zarr store: /Users/mkeller/research/dbmi/vitessce/tissue-map-tools/examples/moffitt_multiscale.sdata.zarr\n", - "├── Images\n", - "│ └── 'stains': DataTree[czyx] (2, 9, 9392, 5721), (2, 4, 4696, 2860), (2, 2, 2348, 1430)\n", - "├── Labels\n", - "│ ├── 'dapi_labels': DataTree[zyx] (9, 9392, 5721), (4, 4696, 2860), (2, 2348, 1430)\n", - "│ └── 'membrane_labels': DataTree[zyx] (9, 9392, 5721), (4, 4696, 2860), (2, 2348, 1430)\n", - "├── Points\n", - "│ ├── 'cells_centroids_cellpose': DataFrame with shape: (, 3) (3D points)\n", - "│ ├── 'molecule_baysor': DataFrame with shape: (, 21) (3D points)\n", - "│ └── 'molecules': DataFrame with shape: (, 12) (3D points)\n", - "├── Shapes\n", - "│ ├── 'cells_baysor': GeoDataFrame shape: (33222, 6) (2D shapes)\n", - "│ ├── 'cells_circles_baysor': GeoDataFrame shape: (5749, 2) (2D shapes)\n", - "│ ├── 'cells_layer_1_baysor': GeoDataFrame shape: (3797, 3) (2D shapes)\n", - "│ ├── 'cells_layer_2_baysor': GeoDataFrame shape: (4037, 3) (2D shapes)\n", - "│ ├── 'cells_layer_3_baysor': GeoDataFrame shape: (4298, 3) (2D shapes)\n", - "│ ├── 'cells_layer_4_baysor': GeoDataFrame shape: (4446, 3) (2D shapes)\n", - "│ ├── 'cells_layer_5_baysor': GeoDataFrame shape: (4362, 3) (2D shapes)\n", - "│ ├── 'cells_layer_6_baysor': GeoDataFrame shape: (4008, 3) (2D shapes)\n", - "│ ├── 'cells_layer_7_baysor': GeoDataFrame shape: (3394, 3) (2D shapes)\n", - "│ ├── 'cells_layer_8_baysor': GeoDataFrame shape: (2717, 3) (2D shapes)\n", - "│ └── 'cells_layer_9_baysor': GeoDataFrame shape: (2163, 3) (2D shapes)\n", - "└── Tables\n", - " ├── 'gene_expression_baysor': AnnData (5800, 240)\n", - " └── 'gene_expression_cellpose': AnnData (8439, 241)\n", - "with coordinate systems:\n", - " ▸ 'global', with elements:\n", - " stains (Images), dapi_labels (Labels), membrane_labels (Labels), cells_centroids_cellpose (Points), molecule_baysor (Points), molecules (Points), cells_baysor (Shapes), cells_circles_baysor (Shapes), cells_layer_1_baysor (Shapes), cells_layer_2_baysor (Shapes), cells_layer_3_baysor (Shapes), cells_layer_4_baysor (Shapes), cells_layer_5_baysor (Shapes), cells_layer_6_baysor (Shapes), cells_layer_7_baysor (Shapes), cells_layer_8_baysor (Shapes), cells_layer_9_baysor (Shapes)" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "sdata" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
xyzmolecule_idz_umareagenebrightnessx_umqc_scorey_umtotal_magnitude
01705.01271.00.012.54Maoa2.021306-2935.3860.954363-1218.580420.1126
11725.01922.00.022.54Maoa1.828640-2933.2290.908246-1147.614269.5874
21753.01863.00.032.55Maoa2.001268-2930.1040.977219-1154.062501.4615
31760.01865.00.042.57Maoa1.960428-2929.3390.991316-1153.784639.0364
41904.0794.00.052.56Maoa1.937280-2913.7180.983210-1270.474519.3154
\n", - "
" - ], - "text/plain": [ - " x y z molecule_id z_um area gene brightness x_um \\\n", - "0 1705.0 1271.0 0.0 1 2.5 4 Maoa 2.021306 -2935.386 \n", - "1 1725.0 1922.0 0.0 2 2.5 4 Maoa 1.828640 -2933.229 \n", - "2 1753.0 1863.0 0.0 3 2.5 5 Maoa 2.001268 -2930.104 \n", - "3 1760.0 1865.0 0.0 4 2.5 7 Maoa 1.960428 -2929.339 \n", - "4 1904.0 794.0 0.0 5 2.5 6 Maoa 1.937280 -2913.718 \n", - "\n", - " qc_score y_um total_magnitude \n", - "0 0.954363 -1218.580 420.1126 \n", - "1 0.908246 -1147.614 269.5874 \n", - "2 0.977219 -1154.062 501.4615 \n", - "3 0.991316 -1153.784 639.0364 \n", - "4 0.983210 -1270.474 519.3154 " - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "sdata.points['molecules'].head()" - ] - }, - { - "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -291,7 +59,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -302,7 +70,7 @@ "# Add data to the configuration:\n", "\n", "dataset = vc.add_dataset(name='MERFISH').add_object(SpatialDataWrapper(\n", - " sdata_store=spatialdata_filepath,\n", + " sdata_url=sdata_url,\n", " # The following paths are relative to the root of the SpatialData zarr store on-disk.\n", " image_path=\"images/stains\",\n", " coordinate_system=\"global\",\n", @@ -310,7 +78,7 @@ " \"fileUid\": \"stains\"\n", " }\n", ")).add_object(SpatialDataWrapper(\n", - " sdata_store=spatialdata_filepath,\n", + " sdata_url=sdata_url,\n", " # The following paths are relative to the root of the SpatialData zarr store on-disk.\n", " labels_path=\"labels/dapi_labels\",\n", " coordinate_system=\"global\",\n", @@ -319,7 +87,7 @@ " \"fileUid\": \"dapi\"\n", " }\n", ")).add_object(SpatialDataWrapper(\n", - " sdata_store=spatialdata_filepath,\n", + " sdata_url=sdata_url,\n", " # The following paths are relative to the root of the SpatialData zarr store on-disk.\n", " labels_path=\"labels/membrane_labels\",\n", " coordinate_system=\"global\",\n", @@ -393,25 +161,9 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "65667908b55d48d583d8b0d44aaba152", - "version_major": 2, - "version_minor": 1 - }, - "text/plain": [ - "VitessceWidget(config={'version': '1.0.17', 'name': 'SpatialData with MERFISH data', 'description': '', 'datas…" - ] - }, - "execution_count": 28, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "vw = vc.widget()\n", "vw"