computeMethylationProfile: Compute methylation profile

Description Usage Arguments Value Author(s) See Also Examples

View source: R/profile.R

Description

This function computes the low resolution profiles for the bisulfite sequencing data.

Usage

1
2
computeMethylationProfile(methylationData, region,
  windowSize = floor(width(region)/500), context = "CG")

Arguments

methylationData

the methylation data stored as a GRanges object with four metadata columns (see methylationDataList).

region

a GRanges object with the regions where to compute the DMRs.

windowSize

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

context

the context in which the DMRs are computed ("CG", "CHG" or "CHH").

Value

a GRanges object with equal sized tiles of the region. The object consists of the following metadata

sumReadsM

the number of methylated reads.

sumReadsN

the total number of reads.

Proportion

the proportion of methylated reads.

context

the context ("CG", "CHG" or "CHH").

Author(s)

Nicolae Radu Zabet and Jonathan Michael Foonlan Tsang

See Also

plotMethylationProfileFromData, plotMethylationProfile, methylationDataList

Examples

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

# the region where to compute the profile
region <- GRanges(seqnames = Rle("Chr3"), ranges = IRanges(1,1E6))

# compute low resolution profile in 20 Kb windows
lowResProfileWTCHH <- computeMethylationProfile(methylationDataList[["WT"]],
                     region, windowSize = 20000, context = "CHH")

## Not run: 
# compute low resolution profile in 10 Kb windows
lowResProfileWTCG <- computeMethylationProfile(methylationDataList[["WT"]],
                     region, windowSize = 10000, context = "CG")

lowResProfileMet13CG <- computeMethylationProfile(
                     methylationDataList[["met1-3"]],  region,
                     windowSize = 10000, context = "CG")

## End(Not run)

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