This is a test version of Biostars. For the public version, visit https://www.biostars.org.
LD matrix in PLINK

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

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.

0 answers

No answers yet.

Log in to answer this question.