Plink: compute LD between all SNP pairs
1
0
Entering edit mode
6.2 years ago
firestar ★ 1.6k

I would like to compute LD (r2) between ALL my SNP pairs.

I think running the default plink --file mydata --r2 applies some pre-defined filtering as below:

 --ld-window 10
 --ld-window-kb 1000
 --ld-window-r2 0.2

The explanation for these arguments makes no sense whatsoever. So I ended up using Mapthin to thin my SNPs.

Now that I have my short SNP set, all I want to do is compute r2 values between ALL my SNPs pairs without any filtering. How do I accomplish that?

plink SNP linkage disequilibrium LD • 6.8k views
ADD COMMENT
0
Entering edit mode

The explanation for these arguments makes no sense whatsoever

I think that the PLINK documentation is actually the best there is for any program. Difficult to completely explain each parameter, though.

ADD REPLY
0
Entering edit mode
6.2 years ago

"--r2 inter-chr --ld-window-r2 0" reports all results in table format, while "--r2 square" generates a text matrix.

ADD COMMENT
0
Entering edit mode

I don't need interchromosomal pairs. So I removed inter-chr. And i don't want matrix, I want a table. Then if I run the rest:

plink --file mydata --r2 --ld-snp-list "snp-thin.txt" --out "snp-thin"

I don't get all pairwise comparisons. If I check the number of snps on one chromosome in input (mydata), lets say there are 20 snps. All pairwise comparisons should produce 380 rows in output. In the output for that one chromosome, I get around 100 or so. So, it's not doing all pairwise comparisons. I suspect the hidden filtering I mentioned is playing a role.

ADD REPLY
0
Entering edit mode

If you remove inter-chr, you need to manually specify large values for ld-window and ld-window-kb.

ADD REPLY

Login before adding your answer.

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