ome / design

OME Design proposals
http://ome.github.io/design/
1 stars 15 forks source link

Delete map annotations using populate metadata plugin #67

Open atarkowska opened 7 years ago

atarkowska commented 7 years ago

Map annotations can be created in a 2 ways: using default and custom namespaces.

https://github.com/openmicroscopy/openmicroscopy/blob/metadata52/components/tools/OmeroPy/test/integration/metadata/bulk_to_map_annotation_context_ns2.yml

By running:

bin/omero metadata populate --context bulkmap --cfg /path/to/bulkmap-config.yml Screen:ID

all the columns listed directly under columns are added to MapAnnoptaiton object with a NS: openmicroscopy.org/omero/bulk_annotations.

Columns listed in a groups will be given NS provided in namespace filed.

Although there are 2 commands handling delete:

bin/omero metadata populate --context deletemap Screen:ID

deletes just openmicroscopy.org/omero/bulk_annotations

bin/omero metadata populate --context deletemap --cfg /path/to/bulkmap-config.yml Screen:ID

deletes any map annotations for the namespaces given in bulkmap-config.yml including the default one. Do we need both?


Deletion. By default script assumes any MapAnnotation is linked just to one Image or Well. With advance section (added in https://github.com/openmicroscopy/openmicroscopy/pull/4786) plugin allows to avoid duplicated MapAnnotations but delete doesn't respect it as currently there is no check across entire database if MapAnnotaitons are linked to images/wells across multiple containers.

cc: @manics @joshmoore @eleanorwilliams

atarkowska commented 7 years ago

Possible use cases for deletion: