Usage
LD.plot(LD, snp.positions, max.dist = Inf, depth = nrow(LD), graphical.par = list(mar = c(0,0,0,0)), cex.ld, cex.snp, polygon.par = list(border = "white"), color.scheme = function(ld) rgb(1,1-abs(ld),1-abs(ld)), write.snp.id = TRUE, write.ld = function(ld) sprintf("%.2f", ld), draw.chr = TRUE, above.space = 1 + 2*write.snp.id + draw.chr, below.space = 1, pdf.file, finalize.pdf = TRUE)
Arguments
LD
A symmetric LD matrix (such as produced by LD
snp.positions
A vector of SNP positions
max.dist
Maximal distance above which the LD is not plotted
depth
Maximal number of neighbouring SNPs for which the LD is plotted
graphical.par
A list of graphical parameters for function par
cex.ld
The magnification to be used for LD values (if missing, an ad-hoc value is computed)
cex.snp
The magnification to be used for SNPs ids (if missing, an ad-hoc value is computed)
polygon.par
A list of parameters for function polygon
color.scheme
A function to set the background color of a cell
write.snp.id
Logical
. If TRUE
, SNP ids will be displayed above the plot
write.ld
NULL
, or a function which outputs the string used for displaying a LD value in a cell
draw.chr
Logical
. If TRUE
, a chromosome with SNP positions is sketched above the plot
above.space
Space above the plot (in user units = height of a cell)
below.space
Space below the plot (in user units = height of a cell)
pdf.file
The name of a pdf file in which to plot the LD matrix. If missing, current plot device will be used
finalize.pdf
Logical
. If TRUE
, dev.off()
will be called to finalize the pdf file