R: Highlight a genetic region in the linkage disequilibrium heat...
LDheatmap.highlight
R Documentation
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)
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.
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().
Note
The function LDheatmap.highlight() highlights the cells representing
the pairwise LD for the SNPs located between i-th and j-th (inclusive)
SNPs in the genomic region of interest.
The order of indices has no effect on the plot. For example,
LDheatmap.highlight(LDheatmap, i=2, j=4) is the same as
LDheatmap.highlight(LDheatmap, i=4, j=2), which highlights
the cells representing the pairwise LD for the second,
third and fourth SNPs.
Author(s)
Nicholas Lewin-Koh
<nikko@hailmail.net>,
Ji-Hyung Shin <shin@sfu.ca>, Sigal Blay <sblay@sfu.ca>
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(LDheatmap)
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LDheatmap/LDheatmap.highlight.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LDheatmap.highlight
> ### Title: Highlight a genetic region in the linkage disequilibrium heat
> ### map
> ### Aliases: LDheatmap.highlight
> ### Keywords: aplot
>
> ### ** Examples
>
> data(CEUData)
> tt <- LDheatmap(CEUSNP, genetic.distances=CEUDist)
> LDheatmap.highlight(tt, 3, 8, col="blue", fill="green", lwd=3)
>
>
>
>
>
> dev.off()
null device
1
>