Question: ld matrix in plink
0
gravatar for janhuang.cn
21 months 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 • 2.0k views
ADD COMMENTlink modified 20 months ago by DataFanatic130 • written 21 months ago by janhuang.cn150
1
gravatar for chrchang523
21 months ago by
chrchang5235.0k
United States
chrchang5235.0k wrote:

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

ADD COMMENTlink written 21 months ago by chrchang5235.0k

It returns

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

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

ADD REPLYlink written 21 months ago by chrchang5235.0k

Thank you very much.

ADD REPLYlink written 21 months ago by janhuang.cn150
0
gravatar for  DataFanatic
20 months ago by
DataFanatic130
DataFanatic130 wrote:

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

ADD COMMENTlink written 20 months ago by DataFanatic130
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: 1241 users visited in the last hour