vitessce 3.7.4__py3-none-any.whl → 3.7.6__py3-none-any.whl

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.
@@ -147,6 +147,18 @@ def gen_sdata_obs_segmentations_schema(options, path: str, table_path: str = "ta
147
147
  return options
148
148
 
149
149
 
150
+ def gen_sdata_obs_points_schema(options, path: str, table_path: str = "tables/table", coordinate_system: Optional[str] = None) -> dict:
151
+ if path is not None:
152
+ options["obsPoints"] = {
153
+ "path": path
154
+ }
155
+ if table_path is not None:
156
+ options["obsPoints"]['tablePath'] = table_path
157
+ if coordinate_system is not None:
158
+ options["obsPoints"]['coordinateSystem'] = coordinate_system
159
+ return options
160
+
161
+
150
162
  def gen_sdata_obs_spots_schema(options: dict, shapes_path: str, table_path: str = "tables/table", region: Optional[str] = None, coordinate_system: Optional[str] = None) -> dict:
151
163
  if shapes_path is not None:
152
164
  options['obsSpots'] = {
vitessce/widget.py CHANGED
@@ -651,7 +651,7 @@ class VitessceWidget(anywidget.AnyWidget):
651
651
 
652
652
  next_port = DEFAULT_PORT
653
653
 
654
- js_package_version = Unicode('3.6.18').tag(sync=True)
654
+ js_package_version = Unicode('3.8.3').tag(sync=True)
655
655
  js_dev_mode = Bool(False).tag(sync=True)
656
656
  custom_js_url = Unicode('').tag(sync=True)
657
657
  plugin_esm = List(trait=Unicode(''), default_value=[]).tag(sync=True)
@@ -664,7 +664,7 @@ class VitessceWidget(anywidget.AnyWidget):
664
664
 
665
665
  store_urls = List(trait=Unicode(''), default_value=[]).tag(sync=True)
666
666
 
667
- def __init__(self, config, height=600, theme='auto', uid=None, port=None, proxy=False, js_package_version='3.6.18', js_dev_mode=False, custom_js_url='', plugins=None, remount_on_uid_change=True, prefer_local=True, invoke_timeout=300000, invoke_batched=True, page_mode=False, page_esm=None, prevent_scroll=True, server_host=None):
667
+ def __init__(self, config, height=600, theme='auto', uid=None, port=None, proxy=False, js_package_version='3.8.3', js_dev_mode=False, custom_js_url='', plugins=None, remount_on_uid_change=True, prefer_local=True, invoke_timeout=300000, invoke_batched=True, page_mode=False, page_esm=None, prevent_scroll=True, server_host=None):
668
668
  """
669
669
  Construct a new Vitessce widget. Not intended to be instantiated directly; instead, use ``VitessceConfig.widget``.
670
670
 
@@ -798,7 +798,7 @@ class VitessceWidget(anywidget.AnyWidget):
798
798
  # Launch Vitessce using plain HTML representation (no ipywidgets)
799
799
 
800
800
 
801
- def ipython_display(config, height=600, theme='auto', base_url=None, host_name=None, uid=None, port=None, proxy=False, js_package_version='3.6.18', js_dev_mode=False, custom_js_url='', plugins=None, remount_on_uid_change=True, page_mode=False, page_esm=None, server_host=None):
801
+ def ipython_display(config, height=600, theme='auto', base_url=None, host_name=None, uid=None, port=None, proxy=False, js_package_version='3.8.3', js_dev_mode=False, custom_js_url='', plugins=None, remount_on_uid_change=True, page_mode=False, page_esm=None, server_host=None):
802
802
  from IPython.display import display, HTML
803
803
  uid_str = "vitessce" + get_uid_str(uid)
804
804
 
vitessce/wrappers.py CHANGED
@@ -28,6 +28,7 @@ from vitessce.file_def_utils import (
28
28
  gen_obs_sets_schema,
29
29
  gen_sdata_image_schema,
30
30
  gen_sdata_obs_segmentations_schema,
31
+ gen_sdata_obs_points_schema,
31
32
  gen_sdata_obs_spots_schema,
32
33
  gen_sdata_obs_sets_schema,
33
34
  gen_sdata_obs_feature_matrix_schema,
@@ -73,6 +74,7 @@ class AbstractWrapper:
73
74
  self.routes = []
74
75
  self.is_remote = False # TODO: change to needs_localhost_serving for clarity
75
76
  self.is_store = False # TODO: change to needs_store_registration for clarity
77
+ self.is_zip = False
76
78
  self.file_def_creators = []
77
79
  self.base_dir = None
78
80
  self.stores = {}
@@ -1325,6 +1327,12 @@ class AnnDataWrapper(AbstractWrapper):
1325
1327
  *self.get_local_file_route(dataset_uid, obj_i, self._adata_path, self.local_file_uid),
1326
1328
  *self.get_local_file_route(dataset_uid, obj_i, self._ref_path, self.local_ref_uid)
1327
1329
  ]
1330
+ elif self.is_zip:
1331
+ return [
1332
+ # TODO: modify so that the .zip file extension is used
1333
+ # (not necessary, but could help with debugging or with base_dir mode)
1334
+ *self.get_local_file_route(dataset_uid, obj_i, self._adata_path, self.local_dir_uid)
1335
+ ]
1328
1336
  else:
1329
1337
  return self.get_local_dir_route(dataset_uid, obj_i, self._adata_path, self.local_dir_uid)
1330
1338
 
@@ -1399,7 +1407,7 @@ SpatialDataWrapperType = TypeVar('SpatialDataWrapperType', bound='SpatialDataWra
1399
1407
 
1400
1408
  class SpatialDataWrapper(AnnDataWrapper):
1401
1409
 
1402
- def __init__(self, sdata_path: Optional[str] = None, sdata_url: Optional[str] = None, sdata_store: Optional[Union[str, zarr.storage.StoreLike]] = None, sdata_artifact: Optional[ln.Artifact] = None, image_path: Optional[str] = None, region: Optional[str] = None, coordinate_system: Optional[str] = None, obs_spots_path: Optional[str] = None, obs_segmentations_path: Optional[str] = None, table_path: str = "tables/table", is_zip=None, coordination_values=None, **kwargs):
1410
+ def __init__(self, sdata_path: Optional[str] = None, sdata_url: Optional[str] = None, sdata_store: Optional[Union[str, zarr.storage.StoreLike]] = None, sdata_artifact: Optional[ln.Artifact] = None, image_path: Optional[str] = None, region: Optional[str] = None, coordinate_system: Optional[str] = None, obs_spots_path: Optional[str] = None, obs_segmentations_path: Optional[str] = None, obs_points_path: Optional[str] = None, table_path: str = "tables/table", is_zip=None, coordination_values=None, **kwargs):
1403
1411
  """
1404
1412
  Wrap a SpatialData object.
1405
1413
 
@@ -1422,6 +1430,8 @@ class SpatialDataWrapper(AnnDataWrapper):
1422
1430
  :type obs_spots_path: Optional[str]
1423
1431
  :param obs_segmentations_path: Path to a labels or shapes element (segmentation bitmask label image or segmentation polygon shapes), by default None
1424
1432
  :type obs_segmentations_path: Optional[str]
1433
+ :param obs_points_path: Path to a points element, by default None
1434
+ :type obs_points_path: Optional[str]
1425
1435
  """
1426
1436
  raise_error_if_zero_or_more_than_one([
1427
1437
  sdata_path,
@@ -1451,6 +1461,7 @@ class SpatialDataWrapper(AnnDataWrapper):
1451
1461
  self._kwargs = kwargs
1452
1462
  self._obs_spots_path = obs_spots_path
1453
1463
  self._obs_segmentations_path = obs_segmentations_path
1464
+ self._obs_points_path = obs_points_path
1454
1465
  if self._adata_path is not None:
1455
1466
  self.zarr_folder = 'spatialdata.zarr'
1456
1467
  self.obs_type_label = None
@@ -1538,6 +1549,7 @@ class SpatialDataWrapper(AnnDataWrapper):
1538
1549
  options = gen_sdata_obs_spots_schema(options, self._obs_spots_path, self._table_path, self._region, self._coordinate_system)
1539
1550
  options = gen_sdata_image_schema(options, self._image_path, self._coordinate_system)
1540
1551
  options = gen_sdata_obs_segmentations_schema(options, self._obs_segmentations_path, self._table_path, self._coordinate_system)
1552
+ options = gen_sdata_obs_points_schema(options, self._obs_points_path, self._table_path, self._coordinate_system)
1541
1553
  options = gen_feature_labels_schema(self._feature_labels, options)
1542
1554
  if len(options.keys()) > 0:
1543
1555
  obj_file_def = {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vitessce
3
- Version: 3.7.4
3
+ Version: 3.7.6
4
4
  Summary: Jupyter widget facilitating interactive visualization of spatial single-cell data with Vitessce
5
5
  Project-URL: repository, https://github.com/vitessce/vitessce-python
6
6
  Author-email: Mark Keller <mark_keller@hms.harvard.edu>
@@ -3,13 +3,13 @@ vitessce/config.py,sha256=vZyxrvzsrDpbp3QMcfOZghSO-kSb4myUbRNTGl6Ur6o,83101
3
3
  vitessce/config_converter.py,sha256=IRPnGPGaETvJbYZNUv2pe54SHHHsDY9VWo3JRjSI5FM,14681
4
4
  vitessce/constants.py,sha256=7w71Z5TLJIWy7ieNxTmNaC-KB3G5mok_U0tTrcUG6g4,15500
5
5
  vitessce/export.py,sha256=L7j5sVC0nBSqGocFWQyyHImSiAF4IjXhmqV1QtpuNc4,3874
6
- vitessce/file_def_utils.py,sha256=heFDrJMO4fYoondtVALjUiIxe4swOiR24KVGEu8ZTM0,6688
6
+ vitessce/file_def_utils.py,sha256=uAYRSePwhtow0l1izxzxRLqAuLYEKoWvx2cZ3F24CsI,7147
7
7
  vitessce/repr.py,sha256=qMmefmZ3E-3sRVxeI5q1DTZnfuwbXKiA85eyqk5MCT4,2287
8
8
  vitessce/responses.py,sha256=Z6Wo4AXN-RyzmxMPhSuhpIsHTItHM4GyIgMLGoVEYcU,339
9
9
  vitessce/routes.py,sha256=U8T-L-3QCD_tAbPF8LsUlSMhPWNbyzbLNUnxP9Z9s9o,2140
10
10
  vitessce/utils.py,sha256=obzjj65qsagu60_yuhGc-0jmHO-BW0Y-bDs0FgrBqLY,981
11
- vitessce/widget.py,sha256=waiBX2RS-5Y4nXIzg3Q5u4v-oA2RBAmHVJ-enxUE6PM,36231
12
- vitessce/wrappers.py,sha256=eGsR6fd24zT9OfasmOg1oyR9GpiVPyKh-PqZwPnXXz4,76257
11
+ vitessce/widget.py,sha256=QJKneYYvBl_WdLiWo1jDaSYlqsc8UXnXtlJRBqj3yjw,36228
12
+ vitessce/wrappers.py,sha256=WdOQ9w4ElGZH_nKrZAfyrtHxW3iVDzIQ1eqBPlrucj0,76993
13
13
  vitessce/data_utils/__init__.py,sha256=3mWi1lMjoj4_dNbhMOvyE-HEJu0qpMzcmkhfz_5T6n8,361
14
14
  vitessce/data_utils/anndata.py,sha256=iLa5-bRezHgBzL_XCHO7w0pc0RQ4urzZbDsqJbBYeCk,10668
15
15
  vitessce/data_utils/entities.py,sha256=X8enC_TQbgwBzjgD1x53IPS6aVr9wyP0s-NLuYBeMeU,11705
@@ -18,7 +18,7 @@ vitessce/data_utils/ome.py,sha256=te1X933QTRfCm8N5uVXZREShtxDdAEggZZKKEoJdlhU,55
18
18
  vitessce/widget_plugins/__init__.py,sha256=lto2GXnc7KwjIoT-jvzyRYLj0XTJG3uxoX45Hc9EcWA,82
19
19
  vitessce/widget_plugins/demo_plugin.py,sha256=14S7nOxdlKSxIHw9DUcNCN83NE_U1EMPy2D4k0FDues,1797
20
20
  vitessce/widget_plugins/spatial_query.py,sha256=CYxvmMT1Je_jguikPROQxlegkPgIIzemKGbZSJfZMyI,12314
21
- vitessce-3.7.4.dist-info/METADATA,sha256=J_Y3jJ7pajuAeQo_Wp4r9aF9ePIHU5Vbg8Zj7kk_-RY,9826
22
- vitessce-3.7.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
- vitessce-3.7.4.dist-info/licenses/LICENSE,sha256=sNNpI0PQ57AW8_XnTAjU5Yw8YBA_DRNkVHrHYpCIhRU,1067
24
- vitessce-3.7.4.dist-info/RECORD,,
21
+ vitessce-3.7.6.dist-info/METADATA,sha256=zZa9zK1kYG2XO3xLOMRnQcqLiP8CytyoSRwMGw6TyEk,9826
22
+ vitessce-3.7.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
+ vitessce-3.7.6.dist-info/licenses/LICENSE,sha256=sNNpI0PQ57AW8_XnTAjU5Yw8YBA_DRNkVHrHYpCIhRU,1067
24
+ vitessce-3.7.6.dist-info/RECORD,,