Question: ld matrix in plink
0
gravatar for janhuang.cn
2.8 years ago by
janhuang.cn150
janhuang.cn150 wrote:

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>
ld matrix • 3.5k views
ADD COMMENTlink modified 2.7 years ago by DataFanatic200 • written 2.8 years ago by janhuang.cn150
1
gravatar for chrchang523
2.8 years ago by
chrchang5236.9k
United States
chrchang5236.9k wrote:

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

ADD COMMENTlink written 2.8 years ago by chrchang5236.9k

It returns

Error: --ld-snp/--ld-snps/--ld-snp-list cannot be used with the --r/--r2 matrix output modifiers.
ADD REPLYlink written 2.8 years ago by janhuang.cn150
2

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

ADD REPLYlink written 2.8 years ago by chrchang5236.9k

Thank you very much.

ADD REPLYlink written 2.8 years ago by janhuang.cn150
0
gravatar for  DataFanatic
2.7 years ago by
DataFanatic200
DataFanatic200 wrote:

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

ADD COMMENTlink written 2.7 years ago by DataFanatic200
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: 2300 users visited in the last hour