PediatricOpenTargets / OpenPedCan-api

2 stars 7 forks source link

Automate API endpoint development for new plots and tables #75

Open logstar opened 2 years ago

logstar commented 2 years ago

Currently, API endpoint development for new plots and tables is a complex procedure. As an example, the development procedure for new DNA methylation plots and tables is briefly described in https://github.com/PediatricOpenTargets/OpenPedCan-api/issues/69 and https://github.com/PediatricOpenTargets/OpenPedCan-api/issues/70.

Optimally, developers can add a new plot and table to the API by simply adding a plotting function. Based on the plotting function, the API framework can automatically generate required code and data. As each plot is generated from a table, the table generation function is included in the plotting function.

This ticket intends to discuss options to automate API endpoint development. This overall direction is conceptualized based on the discussions with @jharenza and @chinwallaa.

Following is a brief description on the current development procedure:

For any new table and plot to be added to API, example plots and tables need to be generated using https://github.com/PediatricOpenTargets/OpenPedCan-analysis data. The code for generating example plots and tables are further integrated into the API. For example, CNV example plot creation is tracked by https://github.com/PediatricOpenTargets/ticket-tracker/issues/349.

However, integrating the code for generating example plots and tables is time consuming, because the developers generally need to work on the following steps:

cc @taylordm @kelseykeith @afarrel @ewafula