Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trivial cleanup in builder_factory #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
19 changes: 9 additions & 10 deletions src/portal_visualization/builder_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,31 @@


def get_view_config_builder(entity, get_assay):
data_types = entity["data_types"]
data_types = entity['data_types']
assay_objs = [get_assay(dt) for dt in data_types]
assay_names = [assay.name for assay in assay_objs]
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 "is_image" in hints:
dag_names = [dag.get('name') for dag in entity['metadata']['dag_provenance_list']]
if 'is_image' in hints:
if 'sprm' in hints and 'anndata' in hints:
return MultiImageSPRMAnndataViewConfBuilder
if "codex" in hints:
if ('sprm-to-anndata.cwl' in dag_names):
if 'codex' in hints:
if 'sprm-to-anndata.cwl' in dag_names:
return StitchedCytokitSPRMViewConfBuilder
return TiledSPRMViewConfBuilder
if SEQFISH in assay_names:
return SeqFISHViewConfBuilder
if MALDI_IMS in assay_names:
return IMSViewConfBuilder
return ImagePyramidViewConfBuilder
if "rna" in hints:
if 'rna' in hints:
# This is the zarr-backed anndata pipeline.
if "anndata-to-ui.cwl" in dag_names:
if "salmon_rnaseq_slideseq" in data_types:
if 'anndata-to-ui.cwl' in dag_names:
if 'salmon_rnaseq_slideseq' in data_types:
return SpatialRNASeqAnnDataZarrViewConfBuilder
return RNASeqAnnDataZarrViewConfBuilder
return RNASeqViewConfBuilder
if "atac" in hints:
if 'atac' in hints:
return ATACSeqViewConfBuilder
return NullViewConfBuilder

Expand Down