regionPlot: Plot user-supplied genomic regions using data returned by the...

Description Usage Arguments Details Author(s) See Also Examples

Description

Plot any given genomic regions from tiling microarray data using data returned by the dmrFinder function.

Usage

1
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.

Details

This function enables plotting of any regions, not just DMRs, using the results of dmrFinder. The second panel shows the location of CpG's with ticks on the bottom (islands are colored) and the location of mcrbc recognition sites with ticks on the top.

Author(s)

Martin Aryee <aryee@jhu.edu>, Peter Murakami, Rafael Irizarry

See Also

plotRegions, dmrPlot, dmrFinder, dmrFdr

Examples

1
# See dmrFdr

charm documentation built on May 6, 2019, 2:29 a.m.