This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to put a line of LD-decay in a LD vs distance plot?

Hi guys,

I am now working to create a LD vs distance plot in R using an output from PLINK which contain seven columns:

CHR_A BP_A SNP_A CHR_B BP_B SNP_B R2

Then I subtract the value of BP_B and BP_A, plot it with R2 value. The graph looks nice, however, I want my graph to have an average line like an example of FIGURE5 here. How can I add in the line, what should be a code in R for that?

Thanks,
J.

ld

1 answer

Hi,

I wrote a blog post on this, you might want to give a look.

There are two versions, one using R2 and one using D'.

Hope this helps!

Log in to answer this question.