Differences between interface vs API results in terms of list of studies associated with a gene

Hi all, the gene is “ENSG00000156804”.
The list of studies associated with this is gene Is available on the webpage https://genetics.opentargets.org/gene/ENSG00000156804.
The following query returns some associations which cannot be found on the webpage.
An example:
8_125470379_C_A (rs2954022) associated with Triglycerides (p=2.23e-113).
This is very strange, also because rs2954022 seems not to be linked to that gene (see Open Targets Genetics).
Why this difference?

query_string = "
query q_studiesAndLeadVariantsForGene($myGene_id: String!) {
  studiesAndLeadVariantsForGene(geneId:$myGene_id){
    study {
      pmid
      pubDate
      nInitial
      nReplication
      nCases
      numAssocLoci
      traitCategory
      traitReported
    }
    pval
    direction
    beta
    oddsRatio
    indexVariant {
      id
      rsId
    }
  }  
}"
variables <- list("myGene_id" = "ENSG00000156804")
post_body <- list(query = query_string, variables = variables)
r <- POST(url = base_url, body = post_body, encode = 'json')

Hello @matteofloris! :wave:

I have reviewed your query and the reason why you see different results is due to the use of different API endpoints.

The query script you provided uses the studiesAndLeadVariantsForGene endpoint, which relies on our V2G pipeline. However, the web interface uses the studiesAndLeadVariantsForGeneByL2G endpoint and it uses our L2G pipeline.

You can find the exact query used for the gene page on our GitHub:

Let me know if this helps and answers your question! :slight_smile:

Hi @ahercules , thank you very much!!!