cBioPortal / icebox

very low priority issues
0 stars 0 forks source link

Alteration annotation database design #129

Open jjgao opened 4 years ago

jjgao commented 4 years ago

This is copied from here. Given the multiple recent developments (FACETS, OncoKB, custom-JSON) around enhancement to variant annotation, it would be good to step back and see whether we can implement a generalized solution. The design below is meant for discussion towards a database schema which the community is agreed upon.

It contains two main changes:

image

To summarize, a few existing and future projects can be benefit from this design:

@pvannierop @Sjoerd-van-Hagen @n1zea144 @sheridancbio @inodb @zhx828 @kalletlak

pvannierop commented 4 years ago

I like the design, but I am by no means an expert. One issue of concern is that for passenger/driver filtering by count and enrichment endpoints the JSON field for custom driver annotations (_DRIVERFILTER) in the _alterationannotation table would have to be queried. This could be done with a generated column that maps out and indexes a JSON field as a column. However, this approach does not play well with the dynamic way you envision the ANNOTATION_JSON field to be used in. Perhaps we have to move queried fields out of the JSON and add as fixed fields in the _alterationannotation table?

jjgao commented 4 years ago

@pvannierop Good question. I think we should be able to query inside json but I am not familiar with that. One option is below, in which, we only deal with string/varchar.

image

pvannierop commented 4 years ago

@jjgao It is not clear to me what solution to the problem you are proposing. You mean that certain fields in the JSON can be extracted into a meta table? I do not see how that is different from the _generatedcolumn mechanism conceptually.

jjgao commented 4 years ago

@pvannierop I mean we don't store any json but limit the annotation to strings.

I think we may have got into too deep into details. It would be good to have a discussion with others before discussing it too deep.

pvannierop commented 4 years ago

@jjgao Ah I get it now. Yes, feedback from others here is essential to work towards a final plan.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.