plot.LD {GeneticsBase} | R Documentation

## Textual and graphical display of linkage disequilibrium (LD) objects

### Description

Textual and graphical display of linkage disequilibrium (LD) objects

### Usage

    plot(x, y, ...)
    plot.LD (x, y=NULL, cex, ...)
    LDView(LdMat,
           SNPloc=NULL,
           is.triangle=TRUE,
           SNPnames=NULL,
           cexSNPnames=0.2+1/log10(nrow(LdMat)),
           margins=c(6,2,3,6),
           main=NULL,
           barCol=rainbow(256,start=0,end=1/6 ),
           widths=c(10,10),
           heights=c(1,10),
           ...)

### Arguments

`x` | LD or LDband object
`y` | currently ignored
`cex` | Scaling factor for table text. If absent, text will be scaled to fit within the table cells.
`LdMat` | matrix of pair-wise LD measures
`SNPloc` | SNP locations
`is.triangle` | indicate if 'LdMat' is a lower triangle matrix or not. if 'LdMat' is an upper triangle, then the user has to transpose it before calling the function 'LDView'.
`SNPnames` | labels for SNPs
`cexSNPnames` | font size for SNPs labels
`margins` | margins for heatmap
`main` | title for the plot
`barCol` | specify the color scheme
`widths` | The plot is split into two parts – upper part and lower part 'widths' specifies the widths of the two parts
`heights` | The plot is split into two parts – upper part and lower part 'heights' specifies the heights of the two parts
`...` | Optional arguments (`plot.LD.data.frame` passes these to `LDtable` and `LDplot`) and other parameters for the function 'image'

### Details

LDtable generates a graphical matrix of LD coefficients. It attempts to properly set the font size so that the estimated values fit into the boxes. It also colorized the boxes to whether the estimates are significantly different from no linkage.

LDplot generates a plot of the LD coeffients across markers. By default it will overlay plots for LD against all markers. LD against a specific subset of markers can be obtained using the `marker` argument.

### Value

`SNPnames` | labels of the SNPs in `LDView`
`LdMat` | LD matrix
`SNPloc` | SNP positions

### Author(s)

Gregory R. Warnes warnes@bst.rochester.edu

### See Also

`LD`, `geneSet`, `diseq`

### Examples

    # load the data
    data(CAMP)

    # compute pairwise LD
    ld <- LD(CAMP)

    print(ld)    # text display of LD coefficents and graphical display of LD estimates

    LDView(t(ld@"R^2"), SNPloc=1:8, SNPnames=CAMP@markerInfo$Name)

    ## LDtable(ld) # graphical display of LD estimates
    ## LDtable(ld, which="D'", digits=2) # graphical display of D' only

    ## plot(CAMP) # two panel display

[Package GeneticsBase version 1.2.0 Index]