How to plot LD decay?
1
0
Entering edit mode
7.9 years ago
akang ▴ 110

I have a text file with 3 columns (Chromosome number, Distance (BP) and r2). I want to plot LD decay for this data. Can anyone suggest how to do it? Here is the sample data

CHR dist(bp)    r2
1   179160  0.03667880237
1   203115  0.007792207792
1   352949  0.0002724548179
1   389133  0.1577922078
1   464090  0.02009569378
1   829774  0.06714562034
1   1246697 0.01298701299
1   1698946 0.6255411255
1   1888668 0.003541912633
LD r2 • 7.1k views
ADD COMMENT
0
Entering edit mode

install.packages("ggplot2") library(ggplot2)

ggplot(file, aes(dist(bp), r2)) + geom_point() + geom_smooth(formula = newfile$file.dist(bp) ~ newfile$newr2, se=F)

ADD REPLY
0
Entering edit mode
5.0 years ago

See previous answer: A: LD-decay in a r2 vs distance(cm) plot

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 1976 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