ga4gh / fasp-scripts

Apache License 2.0
11 stars 7 forks source link

Add a notebook to list GA4GH Registry in easily consumable form #10

Open ianfore opened 3 years ago

ianfore commented 3 years ago

Registry currently only exists as json returned from https://registry.ga4gh.org/v1/services. That is not very consumable by humans.

GA4GHRegistryClient already provides a python interface to at least some Registry capabilities. It should be fairly straightforward to create an iPython notebook that generates consumable output.

@jb-adams feel free to suggest/contribute as you see fit.

jb-adams commented 3 years ago

thanks @ianfore , I'm wondering what the destination of the output will be? if we have a notebook that can generate a table, is there somewhere we can host the table? or will this script mainly allow for others to run locally and produce the table?

ianfore commented 3 years ago

To start with I thought it would just be a notebook. Besides listing the Registry it would also serve as example code for how to interact with the GA4GH Registry.

But for those who just want to know what's in the registry and might not want (or know how) to run it locally that falls short of the mark.

I got a basic example up and running here as RegistryDemo.ipynb. Looking at different ways to flatten out the nested json. Also whether, for the basic purpose of listing services, that we could do so more concisely i.e. without including all columns.

To the need you have identified. It would be straightforward to do an html table dump from the data frame in that example. Do you have somewhere in mind that we could write it to for public consumption? I'd rather leave styling (css) it to someone else though.

ianfore commented 3 years ago

Updated to write the table to html. The output is written to this GitHub repository. A static listing is available at this URL https://htmlpreview.github.io/?https://github.com/ga4gh/fasp-scripts/blob/master/notebooks/registry/currentServices.html Still no styling applied. A style guru could help here.

To keep the listing current would require someone to run the notebook and check the newly generated file into the repository. Probably not the best approach for sustainability but it gets an interim solution up and running which...

ianfore commented 3 years ago

And to the third bullet above; having the registry content in an easily consumable form highlighted that to get a comprehensive listing of services we need to look at other registries! Added the capability to run the notebook against different registries and generated https://htmlpreview.github.io/?https://github.com/ga4gh/fasp-scripts/blob/master/fasp/scripts/registry/elixirBeacons.html https://htmlpreview.github.io/?https://github.com/ga4gh/fasp-scripts/blob/master/fasp/scripts/registry/mssngServices.html

The Beacon Network registry seems to have some differences which meant the notebook failed when running it against that registry.