-
Notifications
You must be signed in to change notification settings - Fork 3
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
Csv to tables scripts #5
Conversation
Don't need to use coordinates to look up each ROI
Briefly tested on
From my side, the major question is whether these extra columns should be appended to the single bulk annotation of the project i.e. update the Agreed that the question of the column renaming could be made unncessary as per the API extension proposed in ome/omero-py#287? We still need to define how these queries could be passed as a URL and converted into the relevant |
Ah, apologies @sbesson I meant to remove The bulk of this PR is the |
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.
With the inline modification to the csv_to_roi_table.py
, the script worked as expected iterating through images and creating tables:
A few comments:
- generally 💯 for augmenting the value of datasets and exposing cell-level features via OMERO.tables more systematically
- I would remove
csv_to_table_on_project.py
scrpt if it is unused - the CSV file attached to the image feels redundant with the table. Could the intermediate CSV be stored in a temporary folder and passed to the metadata population parser?
- there are definitely several measurement tables per image. From a quick look, all of these tables are consistent in terms of rows i.e. one row per ROI. It should be possible to concatenate multiple (or all) of them and prefix the columns names. I have no intuition on the most valuable. Would that be something the submitter would be able to help us with?
@sbesson Those commits should address your points. Also e-mailed Jonas for feedback on what tables to include. |
Feedback from Jonas:
Number of columns for tables (other than
@seb, I think we could add each of those 5 tables to each image. I'll update the script to take a table name filter, then run it on a pilot somewhere? |
👍 sounds like the best plan of action |
One limitation of I think I'll open a |
From a quick look at the code, the Looking into adding support for custom bulk annotation OMERO.table names makes sense to me at least in the context of this work. |
Running locally (using populate-metadata branch above) connected to pilot-idr0101:
|
With the tables added, you can filter by query, e.g. to find cells with a least negative X coordinate, open the /webclient/omero_table/ID/?query=Centroids_TFOR_X>-10 Clicking on the ROI links will show the ROIs in iviewer - and can confirm that they are do have expected X coordinate (to the right of the image). |
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.
Tested on a few sample raw images from idr0079-hartmann-lateralline/experimentA
:
- the images contain several attachement: a zip with the original sources (already present in the DB) and several tables with the
openmicroscopy.org/omero/bulk_annotations
namespace - the tables have all different names reflecting the original source
- opening the tables gives a
Roi
column which links to the OMERO.iviewer ROI URLs
From my side this feels like a useful addition for querying masks. Leaving @francesw @pwalczysko and others a chance to comment but my vote would be for deploying this in prod100
.
While testing the table filtering in the client, I noticed some issue with complex queries. The one suggested by the text i.e. ?query=(Cell_ID>11)&(Cell_ID<14)
works but ?query=(Centroids_RAW_Z>10)&(Centroids_RAW_Z<11)
only applies the first part of the query. I do not know whether it is an existing limitation, otherwise I can turn this into an omero-web issue
@sbesson - This is an issue with the URL encoding. If you use |
Understood, I had missed that the ampersand was encoded when clicking on the sample query. Then I agree it's only a usability issue. I suspect one extreme solution would be a more advanced UI allowing you to construct these queries via boxes. In the menatime, could we detect query fragment with a decoded |
Adds a script used in OMERO.figure workshop prep. See ome/omero-figure#431
Script
csv_to_roi_table.py
creates OMERO.tables on Images, corresponding to ROIs on the image and would be useful to have these tables in IDR.It uses the
*_other_measurements.tsv
file for each Image. But there are 30 other .tsv files for each Image (see https://github.com/IDR/idr0079-hartmann-lateralline/tree/master/experimentA/idr0079_experimentA_extracted_measurements/00E41C184C) so we'd need to decide which ones to pick.NB: This script loads the ROIs on each image using
roi_service.findByImage()
and assumes that these are in the same order as the ROIs in the.tsv
table. This has been verified experimentally for 1 or 2 images during workshop prep above.NB: This script re-names columns, replacing white-space with underscore, to avoid issues with queries. But this may not be needed with ome/omero-py#287?