Skip to content

Implement R-prime measure of linkage disequilibrium

Notifications You must be signed in to change notification settings

vforget/r-sq-prime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R-sq-prime

Computed R-squared-prime as defined by:

VanLiere JM, Rosenberg NA. Mathematical properties of the r2 measure of linkage disequilibrium. Theor Popul Biol. 2008 Aug;74(1):130-7. doi:10.1016/j.tpb.2008.05.006. Epub 2008 Jun 1. PubMed PMID: 18572214; PubMed Central PMCID: PMC2580747.

Usage

awk -v cor=<R-signed> Pa=<AF_SNPA> Pb=<AF_SNPB> -f r-sq-prime.awk

Example

$ awk -v cor=0.7207 -v Pa=0.0023 -v Pb=0.0037 -f r-sq-prime.awk
Pa         Pb      R  R-max   R-sq   R-sq-max    R-prime
0.0023 0.0037 0.7207 0.7879 0.5194     0.6207     0.9147

PLINK Wrapper Script

Usage:

$ ./r-sq-prime.sh ${path_to_binary_ped}/${chrom} ${snpA} ${snpB}

Plot of r-sq-max as function of MAF of SNP(a) and SNP(b)

Rscript r-sq-max.R

Resulting plot:

r-sq-max

Releases

No releases published

Packages

No packages published