broadinstitute / seqr

web-based analysis tool for rare disease genomics
GNU Affero General Public License v3.0
176 stars 88 forks source link

Use all metadata fields #4204

Closed hanars closed 3 months ago

hanars commented 3 months ago

There are 3 "metadata" reports in seqr, at the Individual, Family, and Variant level. These reports work via a server side endpoint that returns lists of row dicts and then on the client side assigns desired fields to their corresponding columns in the table. If additional fields are returned from the server side endpoint that are not used in the report this does not throw an error, so these endpoints have been returning extra fields. However, this creates a maintenance headache, as it makes it really difficult to make changes to any of the shared utility functions without knowing what is and is not okay to remove or change.

This PR makes sure every field returned in the server side metadata endpoints are used in their corresponding UI tables. In some cases this involved changing the server side behavior to stop computing certain fields and in other cases this involved adding useful fields to the reports in the UI instead of ignoring them. As part of this effort, I removed the include_metadata flag from the parse_anvil_metadata and broke it out into more targeted configurations that add fields only where necessary. I also updated the column configuration in the Ui from the family and individual reports to explicitly share columns that are used by both reports.

Once this change is live, all subsequent changes to these reprots will be explicit, so anything removed or added on the server side will have a corresponding client side change.