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

View source: R/MethyDiff_Set.R

MethyDiff_SetR Documentation

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)

Arguments

chromDictMeth

chromDictMeth() output object

regions

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

Value

Returns the regions object with a mean percent methylation column.

Examples

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)

PCBS documentation built on Sept. 11, 2024, 6:11 p.m.

Related to MethyDiff_Set in PCBS...