how to use plink to get all the SNP LD score > 0.8 in matrix format?
1
0
Entering edit mode
4.2 years ago

I am a freshmen with plink. I downloaded the 1000 genome phase 3 data and try to get all the snp pairs with ld score > 0.8 in a matrix format. I use the following command: plink --vcf ALL.chr1.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz --keep-fam EUR.id --geno 0.05 --hwe 1e-6 --make-bed --out tmp but when I tied to filter the r2 value and get matrix output with this command: plink --bfile tmp --r2 square --ld-window-r2 0.8 --out EUR_chr1 it showed that "Error: --ld-window-r2 flag cannot be used with the --r2 matrix output modifiers." if I didn't use "square" argument, I only got all the snp pairs with ld score > 0.8 in a table format, like "EUR_chr1.ld". Is there any way to change "EUR_chr1.ld" into matrix with plink? If I could get the matrix directly, that would be better. thanks for any helps.

SNP • 1.1k views
ADD COMMENT
1
Entering edit mode
4.2 years ago

If you want a matrix with all values > 0.8 set to zero, just write a one-line postprocessing script that replaces values <= 0.8 with zero.

ADD COMMENT

Login before adding your answer.

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