R: Plots a symbol in the centers of cells of the heat map image
LDheatmap.marks
R Documentation
Plots a symbol in the centers of cells of the heat map image
Description
The function LDheatmap.marks() is used to plot
a symbol in the centers of cells representing the
pairwise linkage disequilibria of specified pairs of SNPs.
Usage
LDheatmap.marks(LDheatmap, i, j = NULL, pch = 20, gp=gpar(...), ...)
Arguments
LDheatmap
An object of class "LDheatmap"
returned by the function LDheatmap().
i
A vector of indices of the first set of SNPs.
j
A vector of indices of the second set of SNPs.
pch
Either an integer value or a single character specifying
the symbol to be plotted. See points()
for possible values and their corresponding symbols.
gp
Graphical parameters; See gpar().
...
Graphical parameter settings to be passed on to the gpar()
function.
Details
The lengths of the vectors i and j must be the same and
greater than or equal to 1.
If the lengths are greater than 1, the function plots the specified
symbol in the centers of the (i^k,
j^k)-th cells (for k=1,...K; K =
length of the vectors i and j), where
i^k and
j^k are
the k-th elements of vectors i and j, respectively.
For example, if i=c(1,2) and j=c(3,5), LDheatmap()
plots a symbol in the centers of the cells representing pairwise
linkage disequilibria between the first and third SNPs and between the
second and fifth SNPs in the genome of interest. Note that the order
of the sets of indices does not matter; for example,
LDheatmap.marks(LDheatmap, i=c(1,2), j=c(3,5)) is equivalent
to LDheatmap.marks(LDheatmap, i=c(3,5), j=c(1,2)).
Value
x
The vector of x coordinate(s) of the plotted symbol(s).
y
The vector of y coordinate(s) of the plotted symbol(s).
Warning
By default, LDheatmap.marks() 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.marks() 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.marks().
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.marks.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LDheatmap.marks
> ### Title: Plots a symbol in the centers of cells of the heat map image
> ### Aliases: LDheatmap.marks
> ### Keywords: aplot
>
> ### ** Examples
>
> data(CEUData)
> tt <- LDheatmap(CEUSNP, genetic.distances=CEUDist)
> LDheatmap.marks(tt, 15, 3, cex=1.6, col="blue")
>
>
>
>
>
> dev.off()
null device
1
>