Description Usage Arguments Details Value Author(s) References See Also Examples
Estimate pairwise Linkage Disequilibrium (LD) between markers measured as r2 using an object of class gpData
. For the general case, a gateway to the software PLINK (Purcell et al. 2007) is established to estimate the LD. A within-R solution is only available for marker data with only 2 genotypes, i.e. homozgous inbred lines. Return value is an object of class LDdf
which is a data.frame
with one row per marker pair or an object of class LDMat
which is a matrix
with all marker pairs. Additionally, the euclidian distance between position of markers is computed and returned.
1 2 |
gpData |
object of class |
chr |
|
type |
|
use.plink |
|
ld.threshold |
|
ld.window |
|
rm.unmapped |
|
cores |
|
The function write.plink
is called to prepare the input files and the script for PLINK. The executive PLINK file plink.exe
must be available (e.g. in the working directory or through path variables). The function pairwiseLD
calls PLINK and reads the results. The evaluation is performed separately for every chromosome. The measure for LD is r2. This is defined as
D = p(AB) - p(A)*p(B)
and
r2=D2/p(A)p(B)p(a)p(b)
where p(AB) is defined as the observed frequency of haplotype AB, p_A=1-p_a and p_B=1-p_b the observed frequencies of alleles A and B.
If the number of markers is high, a threshold for the LD can be used to thin the output. In this case, only pairwise LD above the threshold is reported (argument --ld-window-r2 in PLINK
).
Default PLINK options used –no-parents –no-sex –no-pheno –allow-no-sex –ld-window p –ld-window-kb 99999
For type="data.frame"
an object of class LDdf
with one element for each chromosome is returned. Each element is a data.frame
with columns marker1
, marker2
, r2
and distance
for all p(p-1)/2 marker pairs (or thinned, see 'Details').
For type="matrix"
an object of class LDmat
with one element for each chromosome is returned. Each element is a list of 2: a p x p matrix
with pairwise LD and the corresponding p x p matrix
with pairwise distances.
Valentin Wimmer
Hill WG, Robertson A (1968). Linkage Disequilibrium in Finite Populations. Theoretical and Applied Genetics, 6(38), 226 - 231.
Purcell S, Neale B, Todd-Brown K, Thomas L, Ferreira MAR, Bender D, Maller J, Sklar P, de Bakker PIW, Daly MJ & Sham PC (2007) PLINK: a toolset for whole-genome association and population-based linkage analysis. American Journal of Human Genetics, 81.
1 2 3 4 5 6 7 | ## Not run:
library(synbreedData)
data(maize)
maizeC <- codeGeno(maize)
maizeLD <- pairwiseLD(maizeC,chr=1,type="data.frame")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.