IDR / idr.openmicroscopy.org

Source for the IDR static website.
https://idr.openmicroscopy.org/about
Creative Commons Attribution 4.0 International
4 stars 16 forks source link

Inconsistencies in JSON inidices #168

Open phicks22 opened 1 year ago

phicks22 commented 1 year ago

Hello,

Thanks for making this repo and data public. I’m working with the IDR API (https://idr.openmicroscopy.org/about/api.html) to pull image metadata, but I’m running into an issue.

Specifically, in the JSON API output, the grid object indices appear to be inconsistent in some studies. Where grid was obtained by using the following code:

WELLS_IMAGES_URL = f"https://idr.openmicroscopy.org/webgateway/plate/{plate}/"
plate_dict = requests.Session().get(WELLS_IMAGES_URL).json()
grid = plate_dict['grid']

Many of the metadata for plate JSON files begin at grid[0], however for plate 1753 (https://idr.openmicroscopy.org/webgateway/plate/1753) the metadata begin at grid[1]. See screenshot below:

Issue_1

Similarly, if the metadata are located in grid[0], sometimes the metadata won't appear until grid[0][1] instead of grid[0][0]. For example, see specifically https://idr.openmicroscopy.org/webgateway/plate/1760. See screenshot below:

Issue_2

Are plate metadata supposed to begin at grid[0][0]?

This is a potential issue that I can manage, but I’d like to report these observations in case these inconsistencies are errors and can be relatively easily standardized.

Thanks, Parker

sbesson commented 1 year ago

@phicks22 thanks for raising the question with specific examples. Looking at the associated imaging data:

HCS data can either be dense or sparse and the grid attribute of the webgateway/plate endpoint exposes imaging data acquired at a given (row,column) coordinate on a plate layout. Thus the null values are expected as they reflect the sparseness of the original acquisition.

phicks22 commented 1 year ago

Hi @sbesson,

I appreciate the quick response.

I see, it makes sense why it would be structured that way. I wouldn't have thought of that.

Thanks! Parker