Estimating and plotting the decay of linkage disequilibrium

A quick post that shows how you can estimate the decay of linkage disequilibrium (LD) and plot it along the genome/chromosome. We’ll be looking at two methods to do this, which unsurprisingly, produce different estimates of LD decay. I personally prefer the 2nd method as it is more scientific.

For both methods, I am using this input file. It basically has two tab delimited columns – one with distance in megabase pairs (Mbp) and the other with LD (r2) values.

First, import the file:

file <- read.table("D_genome_ld.txt", sep="\t", header=T)

1. Method 1: The “Neanderthal” Way (sorry, dear mortal Neanderthals!)

Continue reading

Advertisements

Chromosome or group specific LD heatmaps

If you work on genomics, chances are you have to create an LD heatmap figure sooner or later. I am sure you have used the R package LDheatmap or have thought of using it at some point. The only problem is that despite being a sweet (not necessarily fast) program, it does have its limitations. The biggest one being production of publication-worthy graphics.

To give you an example, look at the following LD heatmap it produced with my mock data. My mock data has 7 chromosomes with 10 markers on each chromosome.

Here is the input data in Excel format.

Continue reading