Learn R Programming

chopsticks (version 1.36.0)

plot.snp.dprime: Function to draw the pairwise D' in a eps file

Description

plot.snp.dprime takes a snp.dprime object and draw an eps file to visualize the pairwise D', $r^2$ and LOD.

Usage

"plot"(x, filename, scheme = "standard", do.notes = FALSE, metric=NULL, ...)

Arguments

x
An object of class snp.dprime
filename
The output file name, preferably ending with ".eps" (not enforced)
scheme
The colour scheme used. Valid values are "standard" for the Haploview default, and "rsq" for grayscale $r^2$. More may come later
do.notes
Boolean for whether to generate pdf annotation-related code
metric
An integer vector, detailing the chromosome position of the SNP, to drawa scaled metric of the location of the SNP. If NULL, no metric would be drawn
...
place holder

Value

return nothing. Write a file as a result. And if do.notes is specified, Will also suggest user to execute ps2pdf -dEPSCrop to get a suitable pdf.

Details

Annotation is a little used pdf features where certain part of a pdf file are hot spots where one can get pop-up balloons containing extra information, which doesn't appear in print. This is written to imitate the extra information one can get from right-clicking in Haploview's GUI.

References

Clayton, D.G. and Leung, Hin-Tak (2007) An R package for analysis of whole-genome association studies. Human Heredity 64:45-51. GSL (GNU Scientific Library) http://www.gnu.org/software/gsl/ The postscript language reference manual: http://www.adobe.com/products/postscript/pdfs/PLRM.pdf The pdf specification: http://partners.adobe.com/public/developer/en/pdf/PDFReference16.pdf

See Also

snp.dprime-class

Examples

Run this code
data(testdata)
# As for ld.snp example ...
data(testdata)
ldinfo <- ld.snp(Autosomes, start=1, end=500, depth=50)
# Now plot to an eps file
plot.snp.dprime(ldinfo, filename="test.eps")

Run the code above in your browser using DataLab