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
3 changes: 3 additions & 0 deletions src/portal_visualization/builder_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def get_view_config_builder(entity, get_assay):
hints = [hint for assay in assay_objs for hint in assay.vitessce_hints]
dag_names = [dag['name']
for dag in entity['metadata']['dag_provenance_list'] if 'name' in dag]
if 'integrative' in hints:
# TODO: confirm the string to be used in the hint.
return IntegrativeViewConfBuilder
if "is_image" in hints:
if 'sprm' in hints and 'anndata' in hints:
return MultiImageSPRMAnndataViewConfBuilder
Expand Down
18 changes: 18 additions & 0 deletions src/portal_visualization/builders/integrative_builders.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from vitessce import VitessceConfig

from .base_builders import ViewConfBuilder
from ..utils import get_conf_cells


class IntegrativeViewConfBuilder(ViewConfBuilder):
# TODO: Add a test fixture.
# TODO: Determine the name of the property that will hold the viewconfs.
# TODO: If https://github.com/hubmapconsortium/portal-visualization/pull/66
# arrives first this can be replaced with:
# def get_configs(self):
# return [
# VitessceConfig.from_dict(conf)
# for conf in self._entity['viewconfs']
# ]
def get_conf_cells(self):
return get_conf_cells(self._entity['viewconfs'])