LDDist: LD versus distance Plot

Description Usage Arguments Author(s) References See Also Examples

Description

Visualization of pairwise Linkage Disequilibrium (LD) estimates generated by function pairwiseLD versus marker distance. A single plot is generated for every chromosome.

Usage

1
2
LDDist(LDdf,chr=NULL,type="p",breaks=NULL,n=NULL,file=NULL,fileFormat="pdf",
       onefile=TRUE,colL=2,colD=1,...)

Arguments

LDdf

object of class LDdf which is the output of function pairwiseLD and argument type="data.frame"

chr

numeric scalar or vector. Return value is a plot for each chromosome in chr. To plot the complete LD within Chromosomes in a single plot use "all". Note: This includes no values for between chromosom LD! The default is NULL. This givs a single plot for each chromosome. Note: Remember to add one empty line for each chromosome in batch-scripts , if you use more than one chromosome!

type

Character string to specify the type of plot. Use "p" for a scatterplot, "bars" for stacked bars or "nls" for scatterplot together with nonlinear regression curve according to Hill and Weir (1988).

breaks

list containing breaks for stacked bars (optional, only for type="bars"). Components are dist with breaks for distance on x-axis and r2 for breaks on for r2 on y-axis. By default, 5 equal spaced categories for dist and r2 are used.

n

numeric. Number of observations used to estimate LD. Only required for type="nls".

file

character. path to a file where plot is saved to (optional).

fileFormat

character. At the moment two file formats are supported: pdf and png. Default is "pdf".

onefile

logical. If fileFormat = "pdf" you can decide, if you like to have all graphics in one file or in multiple files.

colL

The color for the line if type="nls" is used. In other cases without a meaning.

colD

The color for the dots in the plot of type="nls" and type="p"

...

Further arguments for plot

Author(s)

Valentin Wimmer, Hans-Juergen Auinger and Theresa Albrecht

References

For nonlinear regression curve: Hill WG, Weir BS (1988) Variances and covariances of squared linkage disequilibria in finite populations. Theor Popul Biol 33:54-78.

See Also

pairwiseLD, LDMap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
library(synbreedData)
# maize data example
data(maize)
maizeC <- codeGeno(maize)

# LD for chr 1
maizeLD <- pairwiseLD(maizeC,chr=1,type="data.frame")
# scatterplot
LDDist(maizeLD,type="p",pch=19,colD=hsv(alpha=0.1,v=0))

# stacked bars  with default categories
LDDist(maizeLD,type="bars")

# stacked bars  with user-defined categories
LDDist(maizeLD,type="bars",breaks=list(dist=c(0,10,20,40,60,180),
r2=c(1,0.6,0.4,0.3,0.1,0)))

## End(Not run)

synbreed documentation built on May 2, 2019, 3:23 a.m.