How could I calculate r2 values between a list of SNPs with PLINK?
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?
• 1,470 views
•
link
1 answer
"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.)
• 0 views
•
link
Log in to answer this question.