vitessce 3.5.10__py3-none-any.whl → 3.6.0__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.
vitessce/constants.py CHANGED
@@ -164,6 +164,7 @@ class FileType(DocEnum):
164
164
  ANNDATA_ZARR = "anndata.zarr", "Joint file type for AnnData objects"
165
165
  SPATIALDATA_ZARR = "spatialdata.zarr", "Joint file type for SpatialData objects"
166
166
  ANNDATA_H5AD = "anndata.h5ad", "Joint file type for AnnData objects"
167
+ ANNDATA_ZARR_ZIP = "anndata.zarr.zip", "Joint file type for AnnData object in a Zarr directory store that has been zipped"
167
168
  OBS_EMBEDDING_CSV = 'obsEmbedding.csv', "File type for obsEmbedding values stored in a CSV file"
168
169
  OBS_LOCATIONS_CSV = 'obsLocations.csv', "File type for obsLocations values stored in a CSV file"
169
170
  OBS_LABELS_CSV = 'obsLabels.csv', "File type for obsLabels values stored in a CSV file"
vitessce/wrappers.py CHANGED
@@ -1192,7 +1192,7 @@ def raise_error_if_more_than_one(inputs):
1192
1192
 
1193
1193
 
1194
1194
  class AnnDataWrapper(AbstractWrapper):
1195
- def __init__(self, adata_path=None, adata_url=None, adata_store=None, adata_artifact=None, ref_path=None, ref_url=None, ref_artifact=None, obs_feature_matrix_path=None, feature_filter_path=None, initial_feature_filter_path=None, obs_set_paths=None, obs_set_names=None, obs_locations_path=None, obs_segmentations_path=None, obs_embedding_paths=None, obs_embedding_names=None, obs_embedding_dims=None, obs_spots_path=None, obs_points_path=None, feature_labels_path=None, obs_labels_path=None, convert_to_dense=True, coordination_values=None, obs_labels_paths=None, obs_labels_names=None, **kwargs):
1195
+ def __init__(self, adata_path=None, adata_url=None, adata_store=None, adata_artifact=None, ref_path=None, ref_url=None, ref_artifact=None, obs_feature_matrix_path=None, feature_filter_path=None, initial_feature_filter_path=None, obs_set_paths=None, obs_set_names=None, obs_locations_path=None, obs_segmentations_path=None, obs_embedding_paths=None, obs_embedding_names=None, obs_embedding_dims=None, obs_spots_path=None, obs_points_path=None, feature_labels_path=None, obs_labels_path=None, convert_to_dense=True, coordination_values=None, obs_labels_paths=None, obs_labels_names=None, is_zip=None, **kwargs):
1196
1196
  """
1197
1197
  Wrap an AnnData object by creating an instance of the ``AnnDataWrapper`` class.
1198
1198
 
@@ -1220,6 +1220,7 @@ class AnnDataWrapper(AbstractWrapper):
1220
1220
  :param list[str] obs_labels_names: The optional display names of columns containing observation labels (e.g., alternate cell IDs), instead of the default index in `obs` of the AnnData store.
1221
1221
  :param bool convert_to_dense: Whether or not to convert `X` to dense the zarr store (dense is faster but takes more disk space).
1222
1222
  :param coordination_values: Coordination values for the file definition.
1223
+ :param is_zip: Boolean indicating whether the Zarr store is in a zipped format.
1223
1224
  :type coordination_values: dict or None
1224
1225
  :param \\*\\*kwargs: Keyword arguments inherited from :class:`~vitessce.wrappers.AbstractWrapper`
1225
1226
  """
@@ -1229,6 +1230,7 @@ class AnnDataWrapper(AbstractWrapper):
1229
1230
  self._adata_url = adata_url
1230
1231
  self._adata_store = adata_store
1231
1232
  self._adata_artifact = adata_artifact
1233
+ self.is_zip = is_zip
1232
1234
 
1233
1235
  # For reference spec JSON with .h5ad files
1234
1236
  self._ref_path = ref_path
@@ -1250,11 +1252,14 @@ class AnnDataWrapper(AbstractWrapper):
1250
1252
  self.is_remote = False
1251
1253
  self.is_store = False
1252
1254
  self.zarr_folder = 'anndata.zarr'
1255
+ if is_zip is None and '.zip' in str(adata_path):
1256
+ self.is_zip = True
1253
1257
  elif adata_url is not None or adata_artifact is not None:
1254
1258
  self.is_remote = True
1255
1259
  self.is_store = False
1256
1260
  self.zarr_folder = None
1257
-
1261
+ if is_zip is None and '.zip' in str(adata_url):
1262
+ self.is_zip = True
1258
1263
  # Store artifacts on AbstractWrapper.artifacts for downstream access,
1259
1264
  # e.g. in lamindb.save_vitessce_config
1260
1265
  if adata_artifact is not None:
@@ -1356,9 +1361,8 @@ class AnnDataWrapper(AbstractWrapper):
1356
1361
  if len(options.keys()) > 0:
1357
1362
  if self.is_h5ad:
1358
1363
  options["refSpecUrl"] = self.get_ref_url(base_url, dataset_uid, obj_i)
1359
-
1360
1364
  obj_file_def = {
1361
- "fileType": ft.ANNDATA_ZARR.value if not self.is_h5ad else ft.ANNDATA_H5AD.value,
1365
+ "fileType": ft.ANNDATA_ZARR_ZIP.value if self.is_zip else ft.ANNDATA_H5AD.value if self.is_h5ad else ft.ANNDATA_ZARR.value,
1362
1366
  "url": self.get_zarr_url(base_url, dataset_uid, obj_i) if not self.is_h5ad else self.get_h5ad_url(base_url, dataset_uid, obj_i),
1363
1367
  "options": options
1364
1368
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vitessce
3
- Version: 3.5.10
3
+ Version: 3.6.0
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>
@@ -1,7 +1,7 @@
1
1
  vitessce/__init__.py,sha256=03pAJROyDfo6EErBx8Oqb9Emqol1QKQ_9zKhkwuQ36Q,1781
2
2
  vitessce/config.py,sha256=vZX4k-kS3zspYVT08PRuLSBeB-tU4GJgbN93z1Ed1iY,81228
3
3
  vitessce/config_converter.py,sha256=IRPnGPGaETvJbYZNUv2pe54SHHHsDY9VWo3JRjSI5FM,14681
4
- vitessce/constants.py,sha256=NTir8PzJAGX6a5Q3Ike0qy2n75WyFAezMP05PZ4mgWA,15233
4
+ vitessce/constants.py,sha256=nBMH55TcnSavcpvYE-epyx3cJ0iDS31eHsL_1e9qb9M,15360
5
5
  vitessce/export.py,sha256=L7j5sVC0nBSqGocFWQyyHImSiAF4IjXhmqV1QtpuNc4,3874
6
6
  vitessce/file_def_utils.py,sha256=RM9Hj1uwPY-Y37JLOHiKA_acGY40p8C9WsDk8iVjDz8,6692
7
7
  vitessce/repr.py,sha256=qMmefmZ3E-3sRVxeI5q1DTZnfuwbXKiA85eyqk5MCT4,2287
@@ -9,7 +9,7 @@ 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
11
  vitessce/widget.py,sha256=TJjpOBCSS9EBd-klEStvd_NCWejHG0QUROmI3b_7lrQ,33146
12
- vitessce/wrappers.py,sha256=gmHDRc_8u0A0XtDZr64sMsRi2ZStLFadKu0aMwmk9Jo,74649
12
+ vitessce/wrappers.py,sha256=3ZNldH2uDhOzUl8ahil7GxnPcr0nKwqfrjjbgS2IL0Y,75010
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=aK-iGNgjUmUMsWgdZhW78VrtMBKMW_jIQDYnsupq6BE,54
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.5.10.dist-info/METADATA,sha256=HdUfZXntYA19rVpU547wUkw8cjKwDcME5Hx5feP0E7k,9757
22
- vitessce-3.5.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
- vitessce-3.5.10.dist-info/licenses/LICENSE,sha256=sNNpI0PQ57AW8_XnTAjU5Yw8YBA_DRNkVHrHYpCIhRU,1067
24
- vitessce-3.5.10.dist-info/RECORD,,
21
+ vitessce-3.6.0.dist-info/METADATA,sha256=LHEQzRra80wKjvCJnln_yQMvmULNcZsbsohcmaUlKL0,9756
22
+ vitessce-3.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
+ vitessce-3.6.0.dist-info/licenses/LICENSE,sha256=sNNpI0PQ57AW8_XnTAjU5Yw8YBA_DRNkVHrHYpCIhRU,1067
24
+ vitessce-3.6.0.dist-info/RECORD,,