Querying using rsId

Hi, I was wondering if we can access V2G and L2G results (such as offered by endpoints studyLocus2GeneTable and genesForVariant) using variant rsIds rather than ids of the type: 1_27372521_T_C? The reason is that it is difficult to know how to formulate the correct Ids in cases when a variant has more than 1 alternative allele (e.g. http://www.ensembl.org/Homo_sapiens/Variation/Explore?r=1:27372021-27373021;v=rs11247642;vdb=variation;vf=5096377). I guess one can try all possible allele combinations but is there a cleaner way to do it?

Hi @marynias! :wave:

Currently, the studyLocus2GeneTable and genesForVariant endpoint only accept IDs in the chromosome_position_ref_alt format.

However, if you want to convert RSIDs into this format, you can use our search endpoint and pass the RSID as the query string. Please see below for a sample query for rs6335

query useSearchToConvertRSIDIntoIDFormat {

Alternatively, you can also use our variant lookup tables available via FTP to build your own RSID to ID mapping file.

Good luck! :slight_smile:


Hi @ahercules, brilliant, thank you - the useSearchToConvertRSIDIntoIDFormat endpoint is just what I needed!

1 Like

It seems not to handle correctly with multiallelic variants. For example with rs2228671 (C>A / C>G / C>T according to https://www.ncbi.nlm.nih.gov/snp/rs2228671), the script only returns 19_11100236_C_T.

Hi @matteofloris! :wave:

Welcome to the Open Targets Community!

I have asked our statistical genetics team about the variant rs2228671 and here is their response:

For the particular variant queried by the user, we’ve shown the common allele (which would have been tested in GWAS), whereas the other alleles are extremely rare.

For more information on how we handle multi-allelic variants, please see our FAQ documentation.

Thank you! :slight_smile:

thank you so much @ahercules