plot.getLD {trio} | R Documentation

## Plotting a getLD or getLDlarge Object

### Description

Plots either the pairwise r^2 or D' values computed by either `getLD` or `getLDlarge`. Can also be used to plot the categorizations used in the procedure of Gabriel et al. (2002).

### Usage

    ## S3 method for class 'getLD'
    plot(x, y = "rSquare", start = 1, end = NA, squared = TRUE,
       col = NULL, xlab = "", ylab = "", cexAxis = 0.8, alpha = 0.1,
       ciLD = c(0.7, 0.98), cuRecomb = 0.9, ...)

    ## S3 method for class 'getLDlarge'
    plot(x, y = "rSquare", start = NA, end = NA, squared = TRUE,
       col = NULL, xlab = "", ylab = "", cexAxis = 0.8, alpha = 0.1,
       ciLD = c(0.7,0.98), cuRecomb = 0.9, ...)

### Arguments

`x` | the output of `getLD` or `getLDlarge`.
`y` | either `"rSquare"` (default), `"Dprime"`, or `"gabriel"` specifying the LD values that should be plotted.
`start` | integer or character string specifying the index or the name of the first SNP, respectively, that should be plotted, where the index corresponds to the column (or row if `snp.in.col = FALSE`) in the matrix used as input in `getLD` or `getLDlarge`.
`end` | integer or character string specifying the index or the name of the last SNP, respectively, that should be plotted.
`squared` | should the r^2 values be plotted? If `FALSE`, the r values are plotted. Only considered if `y = "rSquare"`.
`col` | a vector specifying the colors used in plotting of the LD values. If `y = "rSquare"` or `y = "Dprime"`, different levels of gray will be used by default (the darker, the higher is the LD value). If `y = "gabriel"`, strong LD is by default marked by blue fields, evidence of recombination by white color, and others by yellow.
`xlab` | character string naming the label of the x-axis.
`ylab` | character string naming the label of the y-axis.
`cexAxis` | a numeric value specifying the relative size of the SNP names displayed at the axes of the plot.
`alpha` | numeric value between 0 and 1. Only considered if `y = "gabriel"`. For each pair of SNPs, a two-sided 100 * (1 - `alpha`)% confidence interval of D' is computed, and used to specify pairs of SNPs that are either in strong LD, or show historical evidence of recombination (see `ciLD` and `cuRecomb`). All SNP pairs not falling into these two categories are specified as 'Others'.
`ciLD` | numeric vector consisting of two values between 0 and 1. Only considered if `y = "gabriel"`. If the lower bound of the confidence interval of D' for a SNP pair is larger than or equal to the first value in `ciLD` and the upper bound is larger than or equal to the second value, then this pair of SNP is considered to be in strong LD.
`cuRecomb` | numeric value between 0 and 1. Only considered if `y = "gabriel"`. If the upper bound of the confidence interval of D' for a SNP pair is smaller than `cuRecomb`, then this pair of SNP is considered to show evidence of recombination.
`...` | further arguments of `image`

### Author(s)

Holger Schwender, holger.schwender@udo.edu

### References

Gabriel, S.B. et al. (2002). The Structure of Haplotype Blocks in the Human Genome. Science, 296, 2225-2229.

### See Also

`getLD`, `plot.LDblocks`

### Examples

    # Load the simulated data.
    data(trio.data)

    # The values of Dprime and Rsquare for each pair of SNPs
    # in LDdata can be computed by
    ld.out <- getLD(LDdata)

    # By default, the LD measures are returned as a vector.
    # If they should be returned as a matrix, then use
    ld.out2 <- getLD(LDdata, asMatrix = TRUE)

    # The matrix of the Rsquare values can be plotted by
    plot(ld.out)

    # The matrix of the Dprime values can be plotted by
    plot(ld.out, "Dprime")

[Package trio version 3.30.0 Index]