Usage
regionPlot(tab, dmr, cpg.islands, Genome, outfile="./regions.pdf", which.plot=1:10, plot.these, cl, legend.size=1, buffer=3000, plot.p=TRUE, plotG=FALSE, dat=NULL, grs=NULL)
Arguments
tab
a data frame with columns chr, start, and end identifying the regions to be plotted from the data.
dmr
a list object as returned by dmrFinder, providing the data to be plotted.
cpg.islands
a table with columns "chr","start", and "end" for CpG islands to plot in the second panel.
Genome
the BSgenome object for the organism based upon which your array was designed.
outfile
a character string giving the name of the pdf file that will be saved. Include the full path if file is not to be saved in the current working directory.
which.plot
a vector of indices identifying which regions (rows) from tab to plot.
plot.these
if dmr results are from unpaired analysis, specify the groups to plot. Default is colnames(dmr$gm). If dmr results are from paired analysis, specify the comparisons to plot. Default is colnames(dmr$sMD).
cl
a vector of line and point colors, one for each element of plot.these in alphabetical order by group name.
legend.size
cex argument for the legend (factor by which to magnify/shrink the legend).
buffer
An integer to control how many basepairs to show on either side of the plotted regions.
plot.p
set to FALSE if you want to plot the methlation values (the "l" output from dmrFinder) instead of the percentage methylation values (the "p" output). If dmrFinder was run on l instead of p, plot.p=FALSE necessarily.
plotG
if TRUE, a third panel of each DMR plot will show the difference between the median green channel value (after subtracting probe medians and correcting for gc content) between the 2 groups. If true, dat must be provided.
dat
if plotG=TRUE, this must be provided. It is the TilingFeatureSet object used when estimating the matrix of percent methylation estimates used in dmrFinder when it produced dmr.
grs
if plotG=TRUE, this must be provided. It is the names of the two groups whose difference in G should be plotted in the 3rd panel.