ld matrix in plink
2
0
Entering edit mode
7.4 years ago
janhuang.cn ▴ 230

I am using the below command to generate an LD matrix in plink

plink --r2 --bfile bfilename --ld-snp-list samplesnp.txt --ld-window-r2 0.8 --out samplesnp_ld

but I want to export a matrix format, instead of the default table format. Instruction from plink webpage has the below explanation. It says that "You can request values for all pairs in matrix format (if you specify 'bin' and/or one of the matrix shape modifiers), all pairs in table format (with 'inter-chr'), or a limited window in table format (this is the default). " But I am not sure where to put the bin, or how to specify "bin". I try using "--out samplesnp_ld.bin", but it still returned the ".ld" file.

--r2 <square | square0 | triangle | inter-chr> <gz | bin | bin4> <spaces> <in-phase> <d | dprime | dprime-signed> <with-freqs> <yes-really>
matrix ld • 10k views
ADD COMMENT
1
Entering edit mode
7.4 years ago

Just change "--r2" to "--r2 bin".

ADD COMMENT
0
Entering edit mode

It returns

Error: --ld-snp/--ld-snps/--ld-snp-list cannot be used with the --r/--r2 matrix output modifiers.
ADD REPLY
2
Entering edit mode

If you want the matrix to just contain the SNPs in samplesnp.txt, use --extract instead of --ld-snp-list.

ADD REPLY
0
Entering edit mode

Thank you very much.

ADD REPLY
0
Entering edit mode
7.3 years ago
ATCG ▴ 400

add the --noweb if you want this to be done quickly

ADD COMMENT

Login before adding your answer.

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