ome / omero-parade

OMERO.web plugin for displaying Dataset thumbnails or Plates in webclient center panel
GNU Affero General Public License v3.0
1 stars 12 forks source link

Map Annotations filter with duplicate Keys #62

Open will-moore opened 5 years ago

will-moore commented 5 years ago

See https://forum.image.sc/t/anomalies-in-searching-kvpairs-in-parade-and-main-omero-search-tool/29124

If an Image has Map annotations Key: val_A and Key: val_B then one of these will be ignored since we return a "Dict of {'key': {iid: 'value', iid: 'value'}}". E.g. for 2 images:

{"Key": {123: val_B, 456: 'foo'}

and val_A is ignored.

https://github.com/ome/omero-parade/blob/e93c014ccc0a069d763a355ac42fca1809440be6/omero_parade/annotation_filters/omero_filters.py#L171

Simplest "fix" is to concatenate values e.g.

    if map_values[kv.name][iid]:
        map_values[kv.name][iid] += kv.value
    else:
        map_values[kv.name][iid] = kv.value