Question: How to plot LD decay?
0
gravatar for akang
2.4 years ago by
akang90
akang90 wrote:

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
r2 ld • 2.1k views
ADD COMMENTlink modified 11 months ago by gezgrm0 • written 2.4 years ago by akang90
0
gravatar for gezgrm
11 months ago by
gezgrm0
gezgrm0 wrote:

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 COMMENTlink modified 11 months ago • written 11 months ago by gezgrm0
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: 1261 users visited in the last hour