opentargets / issues

Issue tracker for Open Targets Platform and Open Targets Genetics Portal
https://platform.opentargets.org https://genetics.opentargets.org
Apache License 2.0
12 stars 2 forks source link

Add `betaRatioSignAverage` column to colocalisation widgets #3617

Open d0choa opened 2 weeks ago

d0choa commented 2 weeks ago

A new column, betaRatioSignAverage, is available in the colocalisation endpoint

We will like to add this column containing a nullable float to the 2 colocalisation widgets in the credible set page.

Based on discussions with @addramir and @Tobi1kenobi we want to propose:

Column header: Directionality Header Tooltip: Effect directionality based on the ratio of betas between the two credible sets Values: When betaRatioSignAverage in [-1, -0.99) show Opposite When betaRatioSignAverage in (-0.99,0.99) or betaRatioSignAverage == null show Inconclusive When betaRatioSignAverage in [0.99, 1] -> Same Note: The reason to do [0.99,1] is because there might be rounding issues. It would be equivalent to round it to second decimal point and do betaRatioSignAverage == 1

Tooltip for value: Beta ratio sign average:

The position of the column could be after the colocalising method for now. During revision we can move it around

query GWASColocQuery($studyLocusIds: [String!]!) {
  credibleSets(studyLocusIds: $studyLocusIds) {
    colocalisation(studyTypes: [gwas], page: { size: 250, index: 0 }) {
      betaRatioSignAverage
      numberColocalisingVariants
    }
  }
}
{
  "data": {
    "credibleSets": [
      {
        "colocalisation": [
          {
            "betaRatioSignAverage": 1,
            "numberColocalisingVariants": 1
          },
          {
            "betaRatioSignAverage": 1,
            "numberColocalisingVariants": 1
          },
          {
            "betaRatioSignAverage": 1,
            "numberColocalisingVariants": 1
          },

@carcruz please reassign if appropiate

Tobi1kenobi commented 2 weeks ago

I would change the tooltip slightly Header tooltip: Effect directionality based on the ratio of betas between the two credible sets

I don't think we need to explicitly mention "beta ratio sign average" in a tooltip as it's a bit jargony and in my mind a tooltip should be the bare minimum to communicate the column to users.

d0choa commented 2 weeks ago

Spec updated based on @Tobi1kenobi feedback