Closed d0choa closed 1 week ago
@d0choa there is a single function called significantFigures
that uses the d3-format
library to render all numbers found in Open Targets Genetics.
Unfortunately, the current implementation does not provide granularity to specify a certain precision for odds ratio numbers and a different precision for L2G scores or p-values.
If I change the function to show 4 decimal points (deploy preview), this is what it would look like on a study-locus page.
And using the example you provided above -- Diabetes or endocrine disease and locus around 7_100691506_A_ATTTTTTT -- if I set the function to show 5 decimal points so that the odds ratio value of 1.0073
is visible, this is what it looks like.
Which option do you prefer?
I see. The abstraction that assumes all figures will require the same resolution is probably not a good idea. Different numbers have different interpretations and might require different levels of resolution for reasons that are hard to generalise.
If @carcruz thinks it's the right strategy, we can create a second helper function significantOdds
and apply it on odds ratios and their respective confidence intervals
I agree, I don't think it is ideal that all numbers are treated the same as some numbers require different levels of precision. I have closed the corresponding PR - https://github.com/opentargets/genetics-app/pull/206 - as this issue requires a more comprehensive fix.
New widgets will only show Beta
and not odds ratio
.
I checked this specific case in the new UI: https://genetics--ot-platform.netlify.app/variant/7_100691506_A_ATTTTTTT
I think it's a really nice example of how things are improving cc @buniello @addramir @DSuveges
Context
As reported by @mohdkarim and @Jeremy37, for the next study-locus link, we are displaying an odds ratio of 1 and CIs of (1.0, 1.0)
)
However, as it can be seen on the API response, we have more resolution for the odds ratio. The fact that the p-value is 3.0e-15 is telling us that the deviation between 1 and 1.0073 is relevant, so it would be good to be able to see the difference.
Action
Can we please increase the resolution of the odds ratio and the confidence intervals to 4 decimal points?
This implies updating: