plotMethylationProfileFromData: Plot methylation profile from data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/profile.R

Description

This function plots the low resolution profiles for all bisulfite sequencing data.

Usage

1
2
3
4
5
plotMethylationProfileFromData(methylationData1, methylationData2 = NULL,
  regions = NULL, conditionsNames = NULL, context = "CG",
  windowSize = NULL, autoscale = FALSE, labels = NULL, col = NULL,
  pch = c(1, 0, 16, 2, 15, 17), lty = c(4, 1, 3, 2, 6, 5),
  contextPerRow = TRUE)

Arguments

methylationData1

the methylation data in condition 1 (see methylationDataList).

methylationData2

the methylation data in condition 2 (see methylationDataList). This is optional.

regions

a GRanges object with the regions where to plot the profiles.

conditionsNames

the names of the two conditions. This will be used to plot the legend.

context

a vector with all contexts in which the DMRs are computed ("CG", "CHG" or "CHH").

windowSize

a numeric value indicating the size of the window in which methylation is averaged.

autoscale

a logical value indicating whether the values are autoscalled for each context or not.

labels

a vector of character used to add a subfigure character to the plot. If NULL nothing is added.

col

a character vector with the colours. It needs to contain a minimum of 2 colours per condition. If not or if NULL, the defalut colours will be used.

pch

the R symbols used to plot the data It needs to contain a minimum of 2 symbols per condition. If not or if NULL, the defalut symbols will be used.

lty

the line types used to plot the data. It needs to contain a minimum of 2 line types per condition. If not or if NULL, the defalut line types will be used.

contextPerRow

a logical value indicating if the each row represents an individual context. If FALSE, each column will represent an individual context.

Value

Invisibly returns NULL

Author(s)

Nicolae Radu Zabet

See Also

plotMethylationProfile, computeMethylationProfile and methylationDataList

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# load the methylation data
data(methylationDataList)

#plot the low resolution profile at 10 Kb resolution
par(mar=c(4, 4, 3, 1)+0.1)
plotMethylationProfileFromData(methylationDataList[["WT"]],
                               methylationDataList[["met1-3"]],
                               conditionsNames=c("WT", "met1-3"),
                               windowSize = 20000, autoscale = TRUE,
                               context = c("CHG"))

## Not run: 
#plot the low resolution profile at 5 Kb resolution
par(mar=c(4, 4, 3, 1)+0.1)
plotMethylationProfileFromData(methylationDataList[["WT"]],
                               methylationDataList[["met1-3"]],
                               conditionsNames=c("WT", "met1-3"),
                               windowSize = 5000, autoscale = TRUE,
                               context = c("CG", "CHG", "CHH"),
                               labels = LETTERS)

## End(Not run)

nrzabet/DMRcaller documentation built on May 23, 2019, 2:50 p.m.