Question: Finding a SNP in LD with a known SNP (rs number) on a list of SNPs
0
gravatar for spela.salamon
3 months ago by
spela.salamon0 wrote:

It may seem simple, but I can not seem to find a good way to do this:

Provided that I have a known SNP by rs number, and an extensive list of SNPs on the other hand (almost a million), how would I find the SNP (or SNPs) that are in LD with the known SNP within this list?

It would be ideal if i could do this in a batch: provide a list of known SNPs, and receive lists of LD SNPs for each known SNP as output.

May there also be a way to do this with other types of variations, such as methylation sites?

I have checked PLINK's options but i can not seem to find a way to get this done using only known rs numbers (no known phenotypes, sometimes no known p-values).

ld snp • 202 views
ADD COMMENTlink modified 3 months ago by Corentin430 • written 3 months ago by spela.salamon0

Computation of LD requires knowledge of the genotype, so I don't think you can achieve you aim in this way. This said, there are data and database relative to given study populations. You can give a look to this link: https://ldlink.nci.nih.gov/

ADD REPLYlink written 3 months ago by Fabio Marroni2.3k

Hey, thanks for your reply. But I understand that given a similar population makeup, each known SNP should have a range where some of my SNPs would likely be, and i should thus be able to match these known SNPs to my SNPs more effectively than just hoping the two rs numbers happen to be an exact match?

ADD REPLYlink modified 3 months ago • written 3 months ago by spela.salamon0
0
gravatar for Corentin
3 months ago by
Corentin430
Corentin430 wrote:

One way to do it is ot use ensembl REST API: https://rest.ensembl.org/

You can fetch the variants in LD with your variant of interest: https://rest.ensembl.org/documentation/info/ld_id_get and then intersect it with your list of knwon SNPs. It is then easy to set up a loop to process variants in batches.

The REST API gives examples of request in Python, R, perl etc.... And do not forget that you have a limit of ~15 request / seconds https://github.com/Ensembl/ensembl-rest/wiki/Rate-Limits

ADD COMMENTlink written 3 months ago by Corentin430

Hey, great idea! If making such a loop is easy, would you have an example of how to do that?

ADD REPLYlink written 3 months ago by spela.salamon0

It depends on the language you want to use, but the principle is the same for every language:

You need to write a "for" loop that will read all the snp ids you want to process, and inside the loop you use the id to query the REST API.

There are plenty of tutorials about for loops available, you also have examples of requests in the last link I gave you

ADD REPLYlink written 3 months ago by Corentin430

Thanks! It is going to be a long day :)

ADD REPLYlink written 3 months ago by spela.salamon0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1899 users visited in the last hour