plotRegions: Plot user-provided regions.

Description Usage Arguments Details Author(s) See Also Examples

Description

Plot user-provided regions.

Usage

1
plotRegions(thetable, cleanp, chr, pos, seq=NULL, Genome, cpg.islands, exposure, exposure.continuous=FALSE, outfile="./myregions.pdf", which_lines=NULL, which_points=which_lines, ADD=3000, cols=c("black","red","blue","gray","green","orange","brown"), legend.size=1, smoo="loess", SPAN=300, DELTA=36, panel3="none", G=NULL, grs=NULL)

Arguments

thetable

a table with columns for "chr","start", and "end", identifying the genomic regions to plot (if they are covered on the array).

cleanp

the matrix of percent methylation estimates to be used for plotting

chr

vector of chromosome labels for the probes in cleanp

pos

vector of chromosomal coordinates for the probes in cleanp

seq

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

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.

outfile

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

exposure

The covariate of interest.

exposure.continuous

set to TRUE if exposure is a continuous variable.

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.

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)

legend.size

magnification factor for the legend

smoo

"loess" for loess smoother or "runmed" for running median smoother (runmed with k=3).

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

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

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

grs

if panel3="G", plot difference between the median green channel value (after subtracting probe medians and correcting for gc content) between these 2 groups.

Details

This function plots user-provided regions.

Author(s)

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

See Also

plotDMRs, dmrFind, qval

Examples

1
# See qval

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