-
Notifications
You must be signed in to change notification settings - Fork 32
WIP: Add scripts for bulk annotation #191
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
Conversation
will-moore
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some initial comments...
| if( existing_kv != updated_kv ): | ||
| nimg_updated = nimg_updated + 1 | ||
| print("The key-values pairs are different") | ||
| remove_MapAnnotations( conn, 'Image', img.getId() ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is named incorrectly - should be remove_map_annotations.
|
|
||
|
|
||
| # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
| def get_existing_map_annotions( obj ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: should be get_existing_map_annotations
|
|
||
| authors=["Christian Evenhuis"], | ||
| institutions=["MIF UTS"], | ||
| contact="[email protected]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the authors and maybe institutions in all scripts to add yourself and OME team?
But certainly update the contact in all scripts, probably to https://forum.image.sc/tag/omero. cc @joshmoore ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That tag is certainly fine thought we could also create an omero-scripts or similar if there's interest.
|
Since it's happened to me on other repos, I took the time to at least explore saving the history in #192 |
|
@CFGrote Just looking to test the various scripts added here, using your blog at https://mpievolbio-scicomp.pages.gwdg.de/blog/post/2020-09-03_omerobulkannotation/ as a guide. |
|
yes, sorry, those scripts are not mentioned.
https://github.com/mpievolbio-scicomp/ometa/blob/master/readme.orig.md has more information and links to
more detailed documentation at https://code.research.uts.edu.au/MIF/OMERO-instructions.
KeyVal_from_Description: Parses the Description field of a Dataset and converts "key: val" strings to key-value annotations of the same Dataset (if I remember correctly). We used this for a little while before getting KeyVal_from_csv to work for us. I'd say it can be removed.
KeyVal_from_Filename: Never used it. It should tokenize image filenames into key-value pairs based on a pattern defined again in the Dataset description. Can be removed because that functionality is provided in Insight (correct?).
RemoveKeyVal: Strips off all key-val pairs in the special namespace from selected items. Issue is that it does not really remove the annotations (as in "delete from the database") but somehow hides from the view. They resurface under certain conditions like applying KeyVal_from_csv again. This one should stay and be debugged IMHO.
Hope that helps.
Thanks and best regards, Carsten
|
|
Closing in favor of #193 |
|
@CFGrote I think KeyVal_from_Filename functionality is provided by the auto-tagging omero.web plugin to create Tags rather than KV pairs. Certainly if you've never used it then let's keep thing simpler by not including it. I've created an issue for RemoveKeyVal #194 Moving this discussion to #193... |
|
yes, you're right. sorry for the confusion.
|
This PR adds scripts originally maintained by @evenhuis to support bulk annotation via csv files and dataset descriptions. The original code was ported to python3, bugs fixed and rudimentary tests added.
Marked as Draft here and seeking feedback and contributions from @will-moore , @ahamacher and others as discussed in this images.sc thread.
Update: Please see #193