How could I calculate r2 values between a list of SNPs with PLINK?
1
1
Entering edit mode
3 months ago
nlt_220593 ▴ 20

I have a file.txt with a list of SNP

rs1 rs2 rs.. rsN

And I want to obtain a matrix with r2 values like that:

        rs1   rs2   rs..   rsN
rs1     1      #    #      #
rs2     #      1    #      #
rs..    #      #    1      #
rsN     #      #    #      1


Where # is r2 value between each SNP comparison.

How could I obtain that with Plink software?

genomics plink snp r2 • 139 views
1
Entering edit mode
3 months ago

"plink --extract file.txt --r2 square" should pretty much do what you want. Just be aware that there are no row/column labels, and the SNP order will match your input fileset, rather than file.txt.

(Yes, this command should have also generated a file spelling out the SNP order; it will do so when it gets added to plink 2.0.)