How to put a line of LD-decay in a LD vs distance plot?
1
1
Entering edit mode
9.9 years ago
vyoouh ▴ 20

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 • 9.7k views
ADD COMMENT
1
Entering edit mode
9.9 years ago
Fabio Marroni ★ 3.0k

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!

ADD COMMENT

Login before adding your answer.

Traffic: 2234 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6