Skip to content

Commit

Permalink
Add histogram and heatmap checkboxes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MicheleBortol committed Aug 19, 2024
1 parent 7e69044 commit 23608c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
5 changes: 5 additions & 0 deletions omero_vitessce/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ def __init__(self, file_names, file_urls,
empty_value=ConfigForm.default_embedding_y_col, strip=True,
min_length=1, max_length=20, required=False)

self.fields["histograms"] = forms.BooleanField(initial=True,
required=False)
self.fields["heatmap"] = forms.BooleanField(initial=True,
required=False)

# Set default values for CharField fields
self.fields["config file name"].initial = filename
self.fields["cell id column"].initial = ConfigForm.default_cell_id_col
Expand Down
20 changes: 11 additions & 9 deletions omero_vitessce/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,17 @@ def create_config(dataset_id, config_args):
displays.append(sc)

if config_args.get("expression") and config_args.get("cell identities"):
hm = vc.add_view(Vt.HEATMAP, dataset=vc_dataset)
fh = vc.add_view(Vt.FEATURE_VALUE_HISTOGRAM, dataset=vc_dataset)
oh = vc.add_view(Vt.OBS_SET_SIZES, dataset=vc_dataset)
fd = vc.add_view(Vt.OBS_SET_FEATURE_VALUE_DISTRIBUTION,
dataset=vc_dataset)
hists.append(fh)
hists.append(oh)
hists.append(fd)
displays.append(hm)
if config_args.get("histograms"):
fh = vc.add_view(Vt.FEATURE_VALUE_HISTOGRAM, dataset=vc_dataset)
oh = vc.add_view(Vt.OBS_SET_SIZES, dataset=vc_dataset)
fd = vc.add_view(Vt.OBS_SET_FEATURE_VALUE_DISTRIBUTION,
dataset=vc_dataset)
hists.append(fh)
hists.append(oh)
hists.append(fd)
if config_args.get("heatmap"):
hm = vc.add_view(Vt.HEATMAP, dataset=vc_dataset)
displays.append(hm)

if config_args.get("segmentation"):
segmentation = OmeZarrWrapper(
Expand Down

0 comments on commit 23608c4

Please sign in to comment.