plotDMRs: Plot differentially methylated regions (DMRs) found using the...

Description Usage Arguments Details Author(s) See Also Examples

View source: R/pipeline1.R

Description

Plot differentially methylated regions (DMRs) from tiling microarray data that were identified using the dmrFind function.

Usage

1
plotDMRs(dmrs, Genome, cpg.islands, exposure, outfile, which_plot=1:50, which_lines=NULL, which_points=which_lines, ADD=3000, cols=c("black","blue","red","gray","brown","pink","orange"), legend.size=1, smoo="loess", SPAN=300, DELTA=36, point.info=FALSE, pch.groups=NULL, panel3="pvalues", G=NULL, seq=NULL)

Arguments

dmrs

a list object as returned by dmrFind.

Genome

the BSgenome object for the organism based upon which your array was designed.

cpg.islands

a table with columns "chr","start", and "end" for CpG islands to plot in the second panel.

exposure

The covariate of interest.

outfile

the name of the file to save (including the full path)

which_plot

numeric vector of indices identifying which DMR candidates from dmrs$dmrs to plot.

which_lines

vector specifying which groups (unique elements of exposure) to plot the lines for. If NULL (the default), plots lines for all groups. Only applies if exposure is categorical.

which_points

vector specifying which groups (unique elements of exposure) to plot the points for. If NULL (the default), plots points for all groups. Only applies if exposure is categorical.

SPAN

see DELTA. Only used if smoo="loess"

DELTA

span parameter in loess smoothing will = SPAN/(DELTA * number of probes in the plotted region). Only used if smoo="loess".

smoo

"loess" for loess smoother or "runmed" for running median smoother (runmed with k=3). This does not need to be the same as the smoo argument to dmrFind.

ADD

Number of base pairs to plot on either side of each DMR candidate (if it is covered on the array).

cols

vector of colors to use, one for each group (if covariate is categorical)

point.info

if TRUE, function returns a table identifying which sample is plotted with which number or letter (if pch.groups=NULL, the default).

legend.size

magnification factor for the legend

pch.groups

vector whose length is equal to the number of samples. Each unique value will be plotted with a different point type.

panel3

if panel3="G", the 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 (i.e., the group defined by mod[,coef] in dmrFind minus the reference group). If panel="G", seq argument must be provided. If panel!="G", the 3rd panel will show -log10(dmrs$pval). G

G

matrix of green channel intensities to use for plotting in the 3rd panel if panel3="G".

seq

vector of probe sequences corresponding to the rows of G (and dmrs$cleanp) if panel3="G".

Details

This function plots the differentially methylated regions (DMRs) that were identified using the dmrFind function.

Author(s)

Martin Aryee <[email protected]>, Peter Murakami, Rafael Irizarry

See Also

plotRegions, dmrFind, qval

Examples

1
# See qval

Bioconductor-mirror/charm documentation built on June 1, 2017, 5:29 a.m.