Skip to content

Commit 68077d5

Browse files
committed
Version bump
1 parent adb066c commit 68077d5

4 files changed

Lines changed: 20 additions & 7 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "vitessce"
7-
version = "3.8.0"
7+
version = "3.8.1"
88
authors = [
99
{ name="Mark Keller", email="mark_keller@hms.harvard.edu" },
1010
]

src/vitessce/file_def_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def gen_sdata_obs_segmentations_schema(options, path: str, table_path: str = "ta
147147
return options
148148

149149

150-
def gen_sdata_obs_points_schema(options, path: str, table_path: str = "tables/table", coordinate_system: Optional[str] = None) -> dict:
150+
def gen_sdata_obs_points_schema(options, path: str, table_path: str = "tables/table", coordinate_system: Optional[str] = None, feature_index_column: Optional[str] = None, morton_code_column: Optional[str] = None) -> dict:
151151
if path is not None:
152152
options["obsPoints"] = {
153153
"path": path
@@ -156,6 +156,10 @@ def gen_sdata_obs_points_schema(options, path: str, table_path: str = "tables/ta
156156
options["obsPoints"]['tablePath'] = table_path
157157
if coordinate_system is not None:
158158
options["obsPoints"]['coordinateSystem'] = coordinate_system
159+
if feature_index_column is not None:
160+
options["obsPoints"]['featureIndexColumn'] = feature_index_column
161+
if morton_code_column is not None:
162+
options["obsPoints"]['mortonCodeColumn'] = morton_code_column
159163
return options
160164

161165

src/vitessce/widget.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ class VitessceWidget(anywidget.AnyWidget):
729729

730730
next_port = DEFAULT_PORT
731731

732-
js_package_version = Unicode('3.9.0').tag(sync=True)
732+
js_package_version = Unicode('3.9.1').tag(sync=True)
733733
js_dev_mode = Bool(False).tag(sync=True)
734734
custom_js_url = Unicode('').tag(sync=True)
735735
plugin_esm = List(trait=Unicode(''), default_value=[]).tag(sync=True)
@@ -742,7 +742,7 @@ class VitessceWidget(anywidget.AnyWidget):
742742

743743
store_urls = List(trait=Unicode(''), default_value=[]).tag(sync=True)
744744

745-
def __init__(self, config, height=600, theme='auto', uid=None, port=None, proxy=False, js_package_version='3.9.0', 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):
745+
def __init__(self, config, height=600, theme='auto', uid=None, port=None, proxy=False, js_package_version='3.9.1', 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):
746746
"""
747747
Construct a new Vitessce widget. Not intended to be instantiated directly; instead, use ``VitessceConfig.widget``.
748748
@@ -876,7 +876,7 @@ def _plugin_command(self, params, buffers):
876876
# Launch Vitessce using plain HTML representation (no ipywidgets)
877877

878878

879-
def ipython_display(config, height=600, theme='auto', base_url=None, host_name=None, uid=None, port=None, proxy=False, js_package_version='3.9.0', js_dev_mode=False, custom_js_url='', plugins=None, remount_on_uid_change=True, page_mode=False, page_esm=None, server_host=None):
879+
def ipython_display(config, height=600, theme='auto', base_url=None, host_name=None, uid=None, port=None, proxy=False, js_package_version='3.9.1', js_dev_mode=False, custom_js_url='', plugins=None, remount_on_uid_change=True, page_mode=False, page_esm=None, server_host=None):
880880
from IPython.display import display, HTML
881881
uid_str = "vitessce" + get_uid_str(uid)
882882

src/vitessce/wrappers.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ def auto_view_config(self, vc):
14071407

14081408
class SpatialDataWrapper(AnnDataWrapper):
14091409

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):
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, obs_points_feature_index_column: Optional[str] = None, obs_points_morton_code_column: Optional[str] = None, table_path: str = "tables/table", is_zip=None, coordination_values=None, **kwargs):
14111411
"""
14121412
Wrap a SpatialData object.
14131413
@@ -1432,6 +1432,10 @@ def __init__(self, sdata_path: Optional[str] = None, sdata_url: Optional[str] =
14321432
:type obs_segmentations_path: Optional[str]
14331433
:param obs_points_path: Path to a points element, by default None
14341434
:type obs_points_path: Optional[str]
1435+
:param obs_points_feature_index_column: Column in the points dataframe that contains a feature index value (i.e., index into table.var.index to specify a gene) for each point, by default None
1436+
:type obs_points_feature_index_column: Optional[str]
1437+
:param obs_points_morton_code_column: Column in the points dataframe that contains a morton code for each point, by default None
1438+
:type obs_points_morton_code_column: Optional[str]
14351439
:param str feature_labels_path: Path to a table var column containing feature labels (e.g., alternate gene symbols), instead of the default index column of the `var` dataframe.
14361440
:param list[str] obs_embedding_paths: Column names like `['obsm/X_umap', 'obsm/X_pca']` for showing scatterplots
14371441
:param list[str] obs_embedding_names: Overriding names like `['UMAP', 'PCA']` for displaying above scatterplots
@@ -1466,6 +1470,8 @@ def __init__(self, sdata_path: Optional[str] = None, sdata_url: Optional[str] =
14661470
self._obs_spots_path = obs_spots_path
14671471
self._obs_segmentations_path = obs_segmentations_path
14681472
self._obs_points_path = obs_points_path
1473+
self._obs_points_feature_index_column = obs_points_feature_index_column
1474+
self._obs_points_morton_code_column = obs_points_morton_code_column
14691475
if self._adata_path is not None:
14701476
self.zarr_folder = 'spatialdata.zarr'
14711477
self.obs_type_label = None
@@ -1553,7 +1559,10 @@ def generator(base_url):
15531559
options = gen_sdata_obs_spots_schema(options, self._obs_spots_path, self._table_path, self._region, self._coordinate_system)
15541560
options = gen_sdata_image_schema(options, self._image_path, self._coordinate_system)
15551561
options = gen_sdata_obs_segmentations_schema(options, self._obs_segmentations_path, self._table_path, self._coordinate_system)
1556-
options = gen_sdata_obs_points_schema(options, self._obs_points_path, self._table_path, self._coordinate_system)
1562+
options = gen_sdata_obs_points_schema(
1563+
options, self._obs_points_path, self._table_path, self._coordinate_system,
1564+
self._obs_points_feature_index_column, self._obs_points_morton_code_column
1565+
)
15571566
options = gen_feature_labels_schema(self._feature_labels, options)
15581567
options = gen_obs_embedding_schema(options, self._mappings_obsm, self._mappings_obsm_names, self._mappings_obsm_dims)
15591568
if len(options.keys()) > 0:

0 commit comments

Comments
 (0)