JSON-API/IDR-API - searching multiple OMERO on annotation
Posted: Tue May 07, 2019 1:13 pm
Dear all (but more specifically probably Will),
Trying to find a way to combine searching multiple OMERO instances specifically on annotations.
The approach is to use currently available JSON-API to do the search.
As the API was written natively in Python/Django and not using any API frameworks, it seems that it doesn't provide services to search for specific strings.
The API that are being used are mainly based on the following 2 documents:
https://idr.openmicroscopy.org/about/api.html
https://docs.openmicroscopy.org/omero/5 ... n-api.html
Examples of using the API through SSBD database can be found below.
List all the projects in OMERO
http://ssbd.qbic.riken.jp/image/webgateway/proj/list/
List the meta data of a project
http://ssbd.qbic.riken.jp/image/webclie ... &project=2
List all the dataset in a project
http://ssbd.qbic.riken.jp/image/webgate ... /children/
List all the images in a dataset
http://ssbd.qbic.riken.jp/image/webgate ... /children/
List the attributes of an image
http://ssbd.qbic.riken.jp/image/webclie ... mage=25021
Image link:
http://ssbd.qbic.riken.jp/image/webclie ... mage-25021
Image viewer link:
http://ssbd.qbic.riken.jp/image/webclie ... ail/25021/
Thumbnail:
http://ssbd.qbic.riken.jp/image/webclie ... ail/25021/
Given the above, in order to do the search, a list of projects is retrieved. By iterating through the list of projects, annotation data are retrieved and a list of key value pairs is created. Search is then done by searching through the key, value pairs. It is possible to extend this method to search for annotations within the datasets.
The main disadvantage of this approach is that it is not scalable when the list of projects and their attributes become large.
Here is the pilot code that I put together to test out the idea of searching multiple OMEROs (IDR and SSBD). It is written in iPython notebook with explanation. Great to hear any feedback from Will and others whether there is a better way to achieve this.
https://github.com/openssbd/CombineSear ... MERO.ipynb
Thanks in advance
Ken
Trying to find a way to combine searching multiple OMERO instances specifically on annotations.
The approach is to use currently available JSON-API to do the search.
As the API was written natively in Python/Django and not using any API frameworks, it seems that it doesn't provide services to search for specific strings.
The API that are being used are mainly based on the following 2 documents:
https://idr.openmicroscopy.org/about/api.html
https://docs.openmicroscopy.org/omero/5 ... n-api.html
Examples of using the API through SSBD database can be found below.
List all the projects in OMERO
http://ssbd.qbic.riken.jp/image/webgateway/proj/list/
List the meta data of a project
http://ssbd.qbic.riken.jp/image/webclie ... &project=2
List all the dataset in a project
http://ssbd.qbic.riken.jp/image/webgate ... /children/
List all the images in a dataset
http://ssbd.qbic.riken.jp/image/webgate ... /children/
List the attributes of an image
http://ssbd.qbic.riken.jp/image/webclie ... mage=25021
Image link:
http://ssbd.qbic.riken.jp/image/webclie ... mage-25021
Image viewer link:
http://ssbd.qbic.riken.jp/image/webclie ... ail/25021/
Thumbnail:
http://ssbd.qbic.riken.jp/image/webclie ... ail/25021/
Given the above, in order to do the search, a list of projects is retrieved. By iterating through the list of projects, annotation data are retrieved and a list of key value pairs is created. Search is then done by searching through the key, value pairs. It is possible to extend this method to search for annotations within the datasets.
The main disadvantage of this approach is that it is not scalable when the list of projects and their attributes become large.
Here is the pilot code that I put together to test out the idea of searching multiple OMEROs (IDR and SSBD). It is written in iPython notebook with explanation. Great to hear any feedback from Will and others whether there is a better way to achieve this.
https://github.com/openssbd/CombineSear ... MERO.ipynb
Thanks in advance
Ken