Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "vitessce"
version = "3.8.0"
version = "3.8.1"
authors = [
{ name="Mark Keller", email="mark_keller@hms.harvard.edu" },
]
Expand Down
6 changes: 5 additions & 1 deletion src/vitessce/file_def_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def gen_sdata_obs_segmentations_schema(options, path: str, table_path: str = "ta
return options


def gen_sdata_obs_points_schema(options, path: str, table_path: str = "tables/table", coordinate_system: Optional[str] = None) -> dict:
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:
if path is not None:
options["obsPoints"] = {
"path": path
Expand All @@ -156,6 +156,10 @@ def gen_sdata_obs_points_schema(options, path: str, table_path: str = "tables/ta
options["obsPoints"]['tablePath'] = table_path
if coordinate_system is not None:
options["obsPoints"]['coordinateSystem'] = coordinate_system
if feature_index_column is not None:
options["obsPoints"]['featureIndexColumn'] = feature_index_column
if morton_code_column is not None:
options["obsPoints"]['mortonCodeColumn'] = morton_code_column
return options


Expand Down
6 changes: 3 additions & 3 deletions src/vitessce/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ class VitessceWidget(anywidget.AnyWidget):

next_port = DEFAULT_PORT

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

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

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):
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):
"""
Construct a new Vitessce widget. Not intended to be instantiated directly; instead, use ``VitessceConfig.widget``.

Expand Down Expand Up @@ -876,7 +876,7 @@ def _plugin_command(self, params, buffers):
# Launch Vitessce using plain HTML representation (no ipywidgets)


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):
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):
from IPython.display import display, HTML
uid_str = "vitessce" + get_uid_str(uid)

Expand Down
13 changes: 11 additions & 2 deletions src/vitessce/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ def auto_view_config(self, vc):

class SpatialDataWrapper(AnnDataWrapper):

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):
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):
"""
Wrap a SpatialData object.

Expand All @@ -1432,6 +1432,10 @@ def __init__(self, sdata_path: Optional[str] = None, sdata_url: Optional[str] =
:type obs_segmentations_path: Optional[str]
:param obs_points_path: Path to a points element, by default None
:type obs_points_path: Optional[str]
: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
:type obs_points_feature_index_column: Optional[str]
:param obs_points_morton_code_column: Column in the points dataframe that contains a morton code for each point, by default None
:type obs_points_morton_code_column: Optional[str]
: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.
:param list[str] obs_embedding_paths: Column names like `['obsm/X_umap', 'obsm/X_pca']` for showing scatterplots
:param list[str] obs_embedding_names: Overriding names like `['UMAP', 'PCA']` for displaying above scatterplots
Expand Down Expand Up @@ -1466,6 +1470,8 @@ def __init__(self, sdata_path: Optional[str] = None, sdata_url: Optional[str] =
self._obs_spots_path = obs_spots_path
self._obs_segmentations_path = obs_segmentations_path
self._obs_points_path = obs_points_path
self._obs_points_feature_index_column = obs_points_feature_index_column
self._obs_points_morton_code_column = obs_points_morton_code_column
if self._adata_path is not None:
self.zarr_folder = 'spatialdata.zarr'
self.obs_type_label = None
Expand Down Expand Up @@ -1553,7 +1559,10 @@ def generator(base_url):
options = gen_sdata_obs_spots_schema(options, self._obs_spots_path, self._table_path, self._region, self._coordinate_system)
options = gen_sdata_image_schema(options, self._image_path, self._coordinate_system)
options = gen_sdata_obs_segmentations_schema(options, self._obs_segmentations_path, self._table_path, self._coordinate_system)
options = gen_sdata_obs_points_schema(options, self._obs_points_path, self._table_path, self._coordinate_system)
options = gen_sdata_obs_points_schema(
options, self._obs_points_path, self._table_path, self._coordinate_system,
self._obs_points_feature_index_column, self._obs_points_morton_code_column
)
options = gen_feature_labels_schema(self._feature_labels, options)
options = gen_obs_embedding_schema(options, self._mappings_obsm, self._mappings_obsm_names, self._mappings_obsm_dims)
if len(options.keys()) > 0:
Expand Down