Linkage Disequilibrium Shrinkage Estimation for Polyploids



ldsep: Linkage Disequilibrium Shrinkage Estimation for Polyploids

Lifecycle: stable R build status codecov CRAN status License: GPL v3

Estimate gametic or composite pairwise linkage disequilibrium (LD) in polyploids, using either genotypes or genotype likelihoods. Support is provided to estimate the popular measures of LD: the LD coefficient (D), the standardized LD coefficient (D'), and the Pearson correlation coefficient (r). All estimates are returned with corresponding standard errors. These estimates and standard errors can then be used for shrinkage estimation. The methods are described in Gerard (2020).

The main functions are:

  • ldest(): Estimates pairwise LD.
  • mldest(): Iteratively apply ldest() across many pairs of SNPs.
  • sldest(): Iteratively apply ldest() along a sliding window of fixed length.
  • plot.lddf(): Plot method for the output of mldest() and sldest().
  • format_lddf(): Format the output of mldest() and sldest() into a matrix.
  • ldshrink(): Shrink correlation estimates using adaptive shrinkage (Stephens, 2017; Dey and Stephens, 2018).


You can install the released version of ldsep from CRAN with:


And the development version from GitHub with:

# install.packages("devtools")

Code of Conduct

Please note that the ldsep project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.


  • Dey, Kushal K., and Matthew Stephens. “CorShrink: Empirical Bayes shrinkage estimation of correlations, with applications.” bioRxiv (2018): 368316.
  • Gerard, David. “Pairwise Linkage Disequilibrium Estimation for Polyploids.” Unpublished manuscript (2020).
  • Stephens, Matthew. “False discovery rates: a new deal.” Biostatistics 18, no. 2 (2017): 275-294.