Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves a long standing type error in the GraphQL API.
The original type for the
odds_ratio
field of thecontingency_table_test
of the joint frequency data's frequency comparison stats (used for the discrepant frequencies flag) was aFloat
. However, some small percentage of theodds_ratio
values wereinfinity
, there could be several infinities in this array for a given variant due toodds_ratio
being calculated for differing genetic ancestry groups.These GraphQL errors likely had extremely little impact on users, as the gnomAD browser's frontend was requesting, but not actually using, the
odds_ratio
data, instead preferring a different field to display a relevantp_value
. The only users who would have been impacted by this would have been those using our API, and who had requested and used theodds_ratio
field of in the frequency comparison stats. I believe those users would have had anull
returned to them, rather than aninfinity
.This PR addresses this with 2 minor edits:
float
to astring
. This is a bit odd since some large percentage of these values are truly floats, but due to the existence of a more useful field for seeing at a glance the values relevant to discrepant frequencies (stat_union
) I believe this quick fix is appropriate.stat_union
field was added, and while requested, the frontend does not use the data at all.