There have not been any changes to the endpoints you are describing. I am not familiar with the process of inserting a subquery inside a query, and I wonder if the problem is coming from the R library that is handling this type of query.
You can obtain the same result if you make 2 consecutive queries. This is a snippet of how I would do the process in Python:
Thank you so much Irene, this works. I didn’t understand the use of variantInfo
I used the following for another query and it doesn’t work again. How do I find the top level schema for such queries.
I tried to run a the indexVariantsAndStudiesForTagVariant and it doesn’t work for my input (1_17500056_C_T) also for me. It works only for sample query in graphiQL API
How did you manage to make it work in R ?
I need to create a query with variantID and get the studyID in order to use them as input in another query for genePrioritisationUsingL2G.
The query works. Your variant might return empty array though. If you visit the relevant page on OT genetics, you’ll find the variant of interest is not a tag or lead variant of any peak.
You can wrap this query in an R similarly to other requests you have been working on.
Thank you for your reply. Yes i am trying queries with different variants related to rsIDs and all return empty arrays. For example if i have a variant like this 1_17500056_C_T , 1_2909753_G_A and i want to check for ensemble GeneID or rsID related to this variant what kind of query i have to use?
In general i want to use as input rsIDs and get the maximum annotation for this from the query, so i was thinking to use search like i did for rsIDs and then use the information from search for each rsID (variantID or nearest gene with ensemblID ) for other kind of queries. Is there any query or combination of queries in which i can go from rsID to annotation information like enhancers or promoters ?
Thank you in advance for your help
Use the variantInfo endpoint to get the variant related information you need. For example, for closest gene to a variant:
query Variant {
variantInfo(variantId:$variantId) {
id
rsId
nearestGene
}
}
Alternatively, if your list of rsIDs is large, I’d suggest you operate with our bulk datasets; the approach would be to use only the variant index dataset.