studiesAndLeadVariantsForGene query not working

Dear OpenTargets team,

I want to retrieve the studies and lead variants associated with a gene. For that, I am using the graphql API to run the function studiesAndLeadVariantsForGene. It is not showing any results.
I ran the sample query given on the browser as well where studies and lead variants are being retrieved for Jak2; it is giving no results. Could you please help?

Thanks and Regards,
Kamalika

Hi Kamalika,

Welcome to the OpenTargets community portal! Were you using the Ensembl gene identifier to retrieve data (ENSG00000096968)? When you say the request returns no result, is it empty, or you get some kind of an error message? Seeing the code you were running would definitely help to troubleshoot.

In the meantime, please take a look at this graphql request, see how it works, might give you some idea to resolve your issue.

Best,
Daniel

Hi Daniel @dsuveges ,

Thank you for your reply. The query in the link you provided is for studiesAndLeadVariantsForGeneByL2G. Below is the code I am trying:

query Jak2variants {
  studiesAndLeadVariantsForGene(geneId: "ENSG00000096968") {
    indexVariant {
      id
    }
    study {
      source
      pmid
      traitReported
      pubDate
      pubTitle
      pubAuthor
      hasSumstats
      numAssocLoci
    }
  }
}

Thanks,
Kamalika

Hi Kamalika,

You are right, the two endpoints are different and the studiesAndLeadVariantsForGene doesn’t give proper response. Interestingly, the API on our developer instance works fine. We have opened and issue for the bug and our developer team is investigating. I’ll let you know as soon as we know more.

Best,
Daniel.

Hi Daniel,

Thank you for looking into the issue.

Regards,
Kamalika