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

Variants inconsistently resolved in studies API with many credible sets #3590

Open jdhayhurst opened 1 month ago

jdhayhurst commented 1 month ago

Describe the bug For studies with a large number of credible sets, the variants objects in the credible sets are sometimes resolved and sometimes not. It is inconsistent, but with more request attempts more variants are resolved, i.e. not null

Expected behaviour Each credible set, within the study credible sets should have a variant resolved.

To Reproduce Steps to reproduce the behaviour:

  1. run the following and notice that some variants are not resolved.
  2. repeat and notice that more variants are resolved.
    query GWASCredibleSetsQuery{
    gwasStudy(studyId: "GCST90002320") {
    studyId
    credibleSets(page: {size: 2000, index: 0}) {
      studyLocusId
      variant {
        id
        chromosome
        position
        referenceAllele
        alternateAllele
        __typename
      }
      pValueMantissa
      pValueExponent
      beta
      locus {
        is95CredibleSet
        __typename
      }
      finemappingMethod
      strongestLocus2gene {
        target {
          id
          approvedSymbol
          __typename
        }
        score
        __typename
      }
      __typename
    }
    __typename
    }
    }

Additional context Suspect a race condition, where the study and credible sets are returned before the variants themselves are finished.