-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
107 lines (79 loc) · 4.75 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ldsep: Linkage Disequilibrium Shrinkage Estimation for Polyploids <a href='https://dcgerard.github.io/ldsep/'><img src='man/figures/logo.png' align="right" height="138" /></a>
<!-- badges: start -->
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![R-CMD-check](https://github.com/dcgerard/ldsep/workflows/R-CMD-check/badge.svg)](https://github.com/dcgerard/ldsep/actions)
[![codecov](https://codecov.io/gh/dcgerard/ldsep/branch/master/graph/badge.svg?token=J3ZRB8PAHY)](https://app.codecov.io/gh/dcgerard/ldsep)
[![CRAN status](https://www.r-pkg.org/badges/version/ldsep)](https://CRAN.R-project.org/package=ldsep)
[![](http://cranlogs.r-pkg.org/badges/grand-total/ldsep)](https://cran.r-project.org/package=ldsep)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
<!-- badges: end -->
Estimate haplotypic 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 (2021a) and Gerard (2021b).
The main functions are:
- `ldfast()`: Fast, moment-based approach to estimate pairwise LD
in the presence of genotype uncertainty.
- `ldest()`: Estimates pairwise LD via maximum likelihood.
- `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).
## Installation
You can install the released version of ldsep from [CRAN](https://cran.r-project.org/package=ldsep) with:
``` r
install.packages("ldsep")
```
And the development version from [GitHub](https://github.com/dcgerard/ldsep) with:
``` r
# install.packages("devtools")
devtools::install_github("dcgerard/ldsep")
```
## Citation
To cite `ldsep` in publications use:
> Gerard, David (2021). "Pairwise Linkage Disequilibrium Estimation for Polyploids." _Molecular Ecology Resources_, *21*(4), 1230--1242. [doi:10.1111/1755-0998.13349](https://doi.org/10.1111/1755-0998.13349).
A BibTeX entry for LaTeX users is
``` tex
@Article{,
title = {Pairwise Linkage Disequilibrium Estimation for Polyploids},
author = {David Gerard},
journal = {Molecular Ecology Resources},
year = {2021},
doi = {10.1111/1755-0998.13349},
volume = {21},
number = {4},
pages = {1230--1242},
}
```
If you use `ldfast()`, please cite:
> Gerard, David (2021). "Scalable Bias-corrected Linkage Disequilibrium Estimation Under Genotype Uncertainty." _Heredity_, *127*(4), 357--362. [doi:10.1038/s41437-021-00462-5](https://doi.org/10.1038/s41437-021-00462-5).
A BibTeX entry for LaTeX users is
``` tex
@Article{,
title = {Scalable Bias-corrected Linkage Disequilibrium Estimation Under Genotype Uncertainty},
author = {David Gerard},
journal = {Heredity},
year = {2021},
volume = {127},
number = {4},
pages = {357--362},
doi = {10.1038/s41437-021-00462-5},
}
```
## Code of Conduct
Please note that the ldsep project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
## References
- Dey, Kushal K., and Matthew Stephens (2018). "CorShrink: Empirical Bayes shrinkage estimation of correlations, with applications." _bioRxiv_. [doi:10.1101/368316](https://doi.org/10.1101/368316)
- Gerard, David (2021a). "Pairwise Linkage Disequilibrium Estimation for Polyploids." _Molecular Ecology Resources_, *21*(4), 1230--1242. [doi:10.1111/1755-0998.13349](https://doi.org/10.1111/1755-0998.13349).
- Gerard, David (2021b). "Scalable Bias-corrected Linkage Disequilibrium Estimation Under Genotype Uncertainty." _Heredity_, *127*(4), 357--362. [doi:10.1038/s41437-021-00462-5](https://doi.org/10.1038/s41437-021-00462-5).
- Stephens, Matthew (2017). "False discovery rates: a new deal." _Biostatistics_ 18(2), 275--294. [doi:10.1093/biostatistics/kxw041](https://doi.org/10.1093/biostatistics/kxw041)