Learn R Programming

PCBS (version 0.1.1)

MethyDiff_Set: Add a mean methylation column to a data.frame of regions.

Description

Using a chromDictMeth() output object, quickly calculate the mean methylation difference across set of regions.

Usage

MethyDiff_Set(chromDictMeth, regions)

Value

Returns the regions object with a mean percent methylation column.

Arguments

chromDictMeth

chromDictMeth() output object

regions

data.frame of regions, where column 1 = chromosome, column 2 = region start, and column 3 = region end

Examples

Run this code
chromDictMethylDiff <- chromDictMeth(eigen, c("trt", "ctl"))
regions <- data.frame(chr=c("chr3", "chr3", "chr1"),
                      s=c(4920450, 3961576, 300000),
                      e=c(4923267, 3963805, 302900),
                      ID=c("Hypo-DMR", "partial Hyper-DMR", "random"))

MethyDiff_Set(chromDictMethylDiff, regions)

Run the code above in your browser using DataLab