DMR.plot: Plotting DMRs

Description Usage Arguments Value Author(s) Examples

Description

Plots an individual DMR as found by dmrcate.

Usage

1
2
3
4
DMR.plot(dmrcoutput, dmr, betas, phen.col,
         annotation=c(array="IlluminaHumanMethylation450k",
                      annotation="ilmn12.hg19"),
         samps=NULL, toscale=FALSE, plotmedians=FALSE, ...)

Arguments

dmrcoutput

An object of class dmrcate.output.

dmr

Row index of dmrcoutput$results. Indicates which DMR to be plotted. Will only plot regions constituted of 2 or more CpGs.

betas

Matrix of beta values for plotting, with unique Illumina probe IDs as rownames.

phen.col

Vector of colors denoting phenotypes. Should be length ncol(betas)[samps].

annotation

A vector describing the type of annotation from which plots are derived. Identical context to minfi, i.e. annotation <- annotation(minfiobject) where minfiobject is a [Genomic](Methyl|Ratio)Set). Default (ilmn12.hg) is recommended.

samps

Vector of samples to be plotted, corresponding to columns of betas. Default is all samples plotted.

toscale

TRUE denotes CpGs plotted to scale along the x-axis according to their genomic coordinates, FALSE denotes evenly spaced plotting. Default is FALSE.

plotmedians

Logical denoting whether group medians will be plotted. Groups are derived from phen.col.

...

Extra arguments passed to plot

Value

A plot to the current device. Square points along the top correspond to gene annotation; colours are as follows:

TSS1500: Light green

TSS200: Dark green

Gene Body: Red

1st Exon: Magenta

5'UTR: Dark Blue

3'UTR: Cyan

Author(s)

Tim J. Peters <Tim.Peters@csiro.au>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
data(dmrcatedata)
myMs <- logit2(myBetas)
myMs.noSNPs <- rmSNPandCH(myMs, dist=2, mafcut=0.05)
patient <- factor(sub("-.*", "", colnames(myMs)))
type <- factor(sub(".*-", "", colnames(myMs)))
design <- model.matrix(~patient + type) 
myannotation <- cpg.annotate(myMs.noSNPs, analysis.type="differential",
    design=design, coef=39)
dmrcoutput <- dmrcate(myannotation, lambda=1000)
phen.col <- c(rep("orange", 38), rep("blue", 38))
DMR.plot(dmrcoutput=dmrcoutput, dmr=1, betas=myBetas, phen.col=phen.col,
    pch=16, toscale=TRUE, plotmedians=TRUE)

## End(Not run)

timpeters82/DMRcate-release documentation built on May 31, 2019, 2:29 p.m.