LDheatmap (version 0.99-7)

LDheatmap.highlight: Highlight a genetic region in the linkage disequilibrium heat map

Description

The function LDheatmap.highlight() is used to highlight a specified genetic region in the linkage disequilibrium (LD) heat map drawn with the LDheatmap() function.

Usage

LDheatmap.highlight(LDheatmap, i, j, fill = "NA", col = "black", lwd = 1, 
lty = 1,flipOutline=FALSE, crissCross = FALSE)

Arguments

LDheatmap

An object of class "LDheatmap" returned by the function LDheatmap().

i

A numeric value specifying the index of the first SNP to be in the highlighted region.

j

A numeric value specifying the index of the last SNP, which must be different from i, to be in the highlighted region.

fill

Color to fill the highlighted area with.

col

A character string specifying the color of the line segments defining the boundary of highlighted region; see par() for possible values.

lwd

A positive number specifying the width of the boundary segments.

lty

Either an integer or a character string specifying the line type of the boundary segments; see par() for possible values.

flipOutline

A Boolean variable that flips the outlined section over the diagonal of the heatmap.

crissCross

A Boolean variable that controls whether a contiguous selection of SNPs are outlined only on their polygonal boundary or at individual SNP levels.

Value

A data frame of the x and y coordinates of points defining the border of the highlighted area.

Warning

By default, LDheatmap.highlight() finds the viewport to draw on from the LDheatmap object passed to it as an argument. However, if LDheatmap() was called with the option pop=TRUE, the resulting LDheatmap object is not assigned a viewport. In this case, LDheatmap.highlight() assumes the user wishes to highlight in the current viewport. Therefore, if LDheatmap() has been called with the option pop=TRUE, the user must navigate to the correct viewport before calling LDheatmap.highlight().

Examples

Run this code
# NOT RUN {
data(CEUData)
tt <- LDheatmap(CEUSNP, genetic.distances=CEUDist)
LDheatmap.highlight(tt, 3, 8, col="blue", fill="green", lwd=3, flipOutline=FALSE, crissCross=FALSE)
# }

Run the code above in your browser using DataCamp Workspace