-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support ROI table on Dataset, for table with ROI ID column #62
Conversation
Still brainstorming on this, have you considered including an |
Yes, good point. But I would be reluctant to add the logic for |
For prototyping, I definitely see the value of being able to do CSV -> OMERO.tables and maybe there is a flag that just does so. Is the Image/ROI lookup significantly more expesnse than e.g. a Project/Dataset/Image lookup or a Screen/Plate/Well lookup? Or is the issue that the code path is not in the plugin yet? |
@sbesson This now supports look-up of ROIs and Shapes for a DatasetWrapper. |
src/omero_metadata/populate.py
Outdated
else: | ||
data.extend(rv) | ||
if not data: | ||
print("No ROIs on images in target Dataset") |
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.
add to log too?
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 can revert to the raise MetadataError()
that is used elsewhere. I didn't use that initially as _load_rois()
was called even if there were no shape
or roi
column in the table, but now it is only called when needed so it makes sense to throw.
Test: omero metadata populate Dataset:3710 --file dataset.csv According to the README
|
Test
|
@jburel Apologies for the confusion, but the scenarios you're testing there aren't ones that have been added in this PR.
|
Test
|
@will-moore I went with the README changes since it also describes how to use this package. If this is outside the scope of this PR then it should be out of it. My general feeling is that there is a major inconsistency between methods on how to handle the "invalid" rows. |
|
Test
Before adding with more confusing I feel that we need to review how invalid rows get handled. Some commands will insert nothing, some will insert a row with -1. |
@jburel This now handles invalid ROI and Shape IDs by setting them to -1 instead of skipping the row. |
Used this in it's current form to re-create OMERO.tables on Datasets in |
Thank you @will-moore . I still have following questions regarding the ROIs paragraph.
|
@will-moore we are not relying on skipping the row if the ROI ID is invalid, so replacing with |
Great, thanks |
@pwalczysko Tried to address some of your feedback, but some is a bit out of scope for this PR and comes under: |
Thank you.
|
@will-moore thank you, now it indeed leaves little room for doubt, I think I understand what to do. |
I think usage guide will be good. We have section about CLI import for example already in the guide so the same strategy could be followed for that plugin.
That does not sound like a good start. |
Updated the description with testing instructions. |
@jburel we already have https://omero-guides.readthedocs.io/en/latest/upload/docs/metadata-ui.html#create-a-metadata-csv as well as https://omero-guides.readthedocs.io/en/latest/upload/docs/metadata.html |
Thanks @pwalczysko I forgot about it.
|
Test 1: On dataset https://merge-ci.openmicroscopy.org/web/webclient/?show=dataset-25469 created succesfully a table https://merge-ci.openmicroscopy.org/web/webclient/omero_table/880600/ Is that expected ? |
Test 2:
|
Test 3
I would have thought that this Test3 is testing the "identical image names" case mentioned in the last commit ? Does not seem to work. |
Ah - Test 1 ROI link is actually an iviewer bug. It's not handling the fact that the ROI is in your non-default group. |
As @will-moore aswered the Test1 problem with ROI link above, in summary the remaining problem is #62 (comment) Test3 (same-named images) Other than that worked fine. |
Test 3 - actually that is showing the fix is working. The bug reported in #68 was that the "duplicate image" error message was failing to render properly. Now it is showing up properly! This doesn't change the fact that duplicate image names aren't supported. |
iviewer issue: ome/omero-iviewer#400 |
@jburel anything from your side? Otherwise, should we get this into a |
invalid ROI/shapes are now recorded as -1. This follows what has been implemented elsewhere |
I think we can release as |
This supports work on idr0123 where we are looking to create a Table with ROIs linked to a Dataset.
The table has an
roi
column so we know the ROI IDs already. These are now validated bypopulate metadata
but we don't add anRoi Name
column for a Dataset.I've added a couple more scenarios to the README (see https://github.com/will-moore/omero-metadata/tree/roi_table_on_dataset), to describe this new feature.
But the handling of invalid IDs isn't included there yet, since we may want to change this.
EDIT: Invalid ROI or Shape IDs will get replaced with
-1
.If you don't include an
Image
column in the csv,populate
won't add one. This would be new functionality unlike any existing workflows, so it might be tricky to handle and isn't required by existing use-case. However, ifimage
IDs are included, theImage Name
column will be added and populated.To test:
E.g. with a csv like:
And when an Image column is included, an
Image Name
column should be added: