1
0
Entering edit mode
5 weeks ago
nlt_220593 ▴ 10

I am using the below command in order to obtain LD matrix of a list of SNP:

plink --bfile 1000G_reference_panel_filename --r --ld-snp-list snp_list.txt


And It works, but I need to export a matrix format, instead of the default format.

I tried to perform the next:

plink --bfile 1000G_reference_panel_filename --r bin --ld-snp-list snp_list.txt


But an error appears:

Error: --ld-snp/--ld-snps/--ld-snp-list cannot be used with the --r/--r2 matrix
output modifiers.


How could I obtain the matrix format?

matrix plink ld • 145 views
1
Entering edit mode

If you want a square matrix with the SNPs in snp_list.txt, you can replace --ld-snp-list with --extract.

However, if you want a rectangular matrix with just the snp_list.txt variants on one dimension, and all SNPs on the other dimension, you can't generate that directly with plink. You'd probably want to postprocess the tabular --r output instead.