BMIQcalibration: Calibrate methylation data to a gold standard.

Description Usage Arguments Details Value See Also Examples

View source: R/data_calibration.R

Description

BMIQcalibration uses an adapted version of the BMIQ algorithm to calibrate the beta-matrix stored in the input SummarizedExperiment object SE to the gold standard dataset used in the muscle clock (GSE50498).

Usage

1
BMIQcalibration(SE, version = "MEAT2.0")

Arguments

SE

A SummarizedExperiment-class object. The "assays" component of SE should contain a beta-matrix of DNA methylation beta-values called "beta" that has been cleaned with clean_beta. SE may optionally contain annotation information on the CpGs stored in "rowData" and sample phenotypes stored in "colData".

version

A character specifying which version of the epigenetic clock you would like to use. Dy default, version is set to "MEAT2.0" for the second version of the epigenetic clock. If you would like to use the original version, set version to "MEAT".

Details

BMIQcalibration was created by Steve Horvath, largely based on the BMIQ function from Teschendorff (2013) to adjust for the type-2 bias in Illumina HM450 and HMEPIC arrays. BMIQ stands for beta mixture quantile normalization. Horvath fixed minor errors in the v_1.2 version of the BMIQ algorithm and changed the optimization algorithm to make the code more robust. He used method = "Nelder-Mead" in optim since the other optimization method sometimes gets stuck. Toward this end, the function blc was replaced by blc2. SE needs to be a SummarizedExperiment object containing a matrix of beta-values that has been cleaned using clean_beta. Each sample in SE is iteratively calibrated to the gold standard values, so the time it takes to run BMIQcalibration is directly proportional to the number of samples in SE. This step is essential to estimate epigenetic age with accuracy.

Value

A calibrated version of the input SE calibrated to the gold standard dataset GSE50498.

See Also

clean_beta to get the DNA methylation matrix ready for calibration, BMIQ for the original BMIQ algorithm and https://genomebiology.biomedcentral.com/articles/10.1186/gb-2013-14-10-r115 for the original paper describing Horvath's adapted BMIQ algorithm, and SummarizedExperiment-class for more details on how to create and manipulate SummarizedExperiment objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Load matrix of beta-values of two individuals from dataset GSE121961
data("GSE121961", envir = environment())
# Load phenotypes of the two individuals from dataset GSE121961
data("GSE121961_pheno", envir = environment())

# Create a SummarizedExperiment object to coordinate phenotypes and
# methylation into one object.
library(SummarizedExperiment)
GSE121961_SE <- SummarizedExperiment(assays=list(beta=GSE121961),
colData=GSE121961_pheno)

# Run clean_beta() to clean the beta-matrix
GSE121961_SE_clean <- clean_beta(SE = GSE121961_SE, version = "MEAT2.0")

# Run BMIQcalibration() to calibrate the clean beta-matrix
GSE121961_SE_calibrated <- BMIQcalibration(SE = GSE121961_SE_clean, version = "MEAT2.0")

sarah-voisin/MEAT documentation built on Aug. 15, 2021, 3:28 p.m.