R: Function to calculate the pairwise D', $r^2$, LOD of a pair...
pair.result.ld.snp
R Documentation
Function to calculate the pairwise D', $r^2$, LOD of
a pair of specified SNPs
Description
pair.result.ld.snp.Rd calculates the pairwise D', $r^2$, LOD of
a pair of specified SNPs in a snp.matrix object. This is used
mainly for debugging.
Usage
pair.result.ld.snp(snpdata, loc.snpA, loc.snpB)
Arguments
snpdata
An object of snp.matrix class with M samples of
N snps
loc.snpA
index of the first snp; should be between 1 and N
loc.snpB
index of the second snp; should be between 1 and N
Value
Returns nothing. Results are displayed in stdout/console.
Note
Not really recommended for daily usage; the result isn't saved
anywhere and this routine is primarily for debugging the details
and correctness of the calculation.
Clayton, D.G. and Leung, Hin-Tak (2007) An R package for analysis of
whole-genome association studies.
Human Heredity64:45-51.
GSL (GNU Scientific Library) http://www.gnu.org/software/gsl/
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(chopsticks)
Loading required package: survival
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/chopsticks/pair.result.ld.snp.Rd_%03d_medium.png", width=480, height=480)
> ### Name: pair.result.ld.snp
> ### Title: Function to calculate the pairwise D', $r^2$, LOD of a pair of
> ### specified SNPs
> ### Aliases: pair.result.ld.snp
> ### Keywords: htest models dplot
>
> ### ** Examples
>
> data(testdata)
> pair.result.ld.snp(Autosomes, 1, 2)
Information: samples = 400, snps = 9445
ii = 1, jj = 2
146 187 63 145.088161 189.219144 61.693325
1 0 0 0.604534 0.394207 0.000000
0 0 0 0.000630 0.000000 0.000000
d' = 1.000000 , r^2 = 0.000821, lod= 0.217854
>
>
>
>
>
> dev.off()
null device
1
>