computeMethylationProfile {DMRcaller} | R Documentation

## Compute methylation profile

### Description

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

### Usage

    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

    # 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)

[Package DMRcaller version 1.14.2 Index]