Question: Plink: compute LD between all SNP pairs
0
gravatar for rmf
3.0 years ago by
rmf1.0k
rmf1.0k wrote:

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?

ADD COMMENTlink modified 3.0 years ago by chrchang5237.5k • written 3.0 years ago by rmf1.0k

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 REPLYlink modified 3.0 years ago • written 3.0 years ago by Kevin Blighe69k
0
gravatar for chrchang523
3.0 years ago by
chrchang5237.5k
United States
chrchang5237.5k wrote:

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

ADD COMMENTlink written 3.0 years ago by chrchang5237.5k

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 REPLYlink written 3.0 years ago by rmf1.0k

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

ADD REPLYlink written 3.0 years ago by chrchang5237.5k
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: 1013 users visited in the last hour