<p>I would like to get the r-squared for two SNPs in my population. One of the SNPs is in a mySQL db, and the other is currently also in a mySQL db, but I have the plink files for that one.</p>

<p>Can anyone advise me on how I will go about getting these into a format that Haploview will understand?</p>

<p>EDIT:</p>

<p>Just to clarify, I&#39;ve two SNPs from different data sources on the patients. While they are indicated to be perfect proxies for each other (1000Genomes), they present different p-values when the Jonckheere-Tempstra test is performed, SNP-A (p=0.2192), SNP-B (p=0.0152). I&#39;ve been asked to get the r-square between them.</p>

<p>Haploview accepts a plink format, I don&#39;t have the plink files for SNP-A, that is contained entirely within a mySQLdb, converted over from the SAS format of a previous student. I do have the plink files for SNP-B, but it is split into two separate plink datasets. Both datasets can be merged using plink, but there is still the issue of SNP-A not being available in a plink format.</p>

If you have genotype for both SNPs for the same samples, simply create [PED MAP][1] files, (using ~~Excel~~, text editor, command line...) then use plink for [merging][2] and [calculating LD][3].

 [1]: http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#ped
 [2]: http://pngu.mgh.harvard.edu/~purcell/plink/dataman.shtml#merge
 [3]: http://pngu.mgh.harvard.edu/~purcell/plink/ld.shtml