GnomAD HEMI counts missing from older data
Background
GnomAD HEMI counts for sex chromosome variants are missing from analyses/variants imported before upgrade to v1.14.0. Note: a difference from before and now is that for newer data, a separate "HEMI" column is displayed for all variants. Before, this column was displayed only for variants on X/Y.
Example
Before:
Now:
Investigation details
What
So, the data is being stored correctly, the API is returning it to the client correctly, and it's available in the client state. The columns displayed are based on the settings in the annotationconfig
table. The hemi
column is listed in our latest annotation config, which is why the newer samples are displaying correctly. However, existing data was set to use the legacy config during the data migration, and that does not have hemi
in config.columns
.
Why
The annotation config being used is determined by the annotation_config_id
set on the allele object (ref: frequencyDetails.ngtmpl.html, frequencyDetails.directive.js), which is in turn pulled from the annotation
table (ref: alleleDataLoader). This id is set on import with the most recent annotation config id, or 1 for data before configurable annotation.
The simple problem
The missing hemi column is specifically an issue with the transition to configurable annotation. Hemi was selectively shown earlier, which is (presumably) why it was not included in the legacy config used by data imported prior to 1.14. We can add the field to the legacy config in the database and it will fix the hemi display issue for pre-existing samples.
The bigger problem
This specific case revealed a broader bug in how ELLA determines which annotation config to use. Specifically, it uses the most recent config id based on when the sample was imported into ELLA, not the most recent when an interpretation is started.
Implementation
Hemi display:
- update the legacy annotation config in the database/repo to also include the
hemi
column
Annotation config selection:
- New issue created: #1909