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>
It returns
If you want the matrix to just contain the SNPs in samplesnp.txt, use --extract instead of --ld-snp-list.
Thank you very much.