M2B: Converting methylation M value to beta value.

Description Usage Arguments Details Value Author(s) Examples

View source: R/utils.R

Description

Converting methylation M value to methylation beta value.

Usage

1
M2B(x)

Arguments

x

An numeric matrix

Details

Methylation beta value is calculated as beta=M/(M+U+a). M is methylated intensity, U is unmethylated intensity, and a is a constant offset (by default , a=100). M value is calculated as M=log2((M+a)/(U+a)). M or U is usually greater than 1000, so a is negligible for most probes. if a=0, then beta=2^M/(2^M+1).

Value

A matrix of methylation Beta values.

Author(s)

Zongli Xu

Examples

1
2
3
4
5
6
7
8
if (require(minfiData)){
path <- file.path(find.package("minfiData"),"extdata")
rgSet <- readidat(path = path,recursive = TRUE)
mdat=getmeth(rgSet)
beta=getB(mdat,"Illumina")
m=B2M(beta)
b=M2B(m)
}

ENmix documentation built on April 2, 2021, 6 p.m.