clean_beta {MEAT}R Documentation

Clean beta-matrix.

Description

clean_beta reduces the beta-matrix stored in the input SummarizedExperiment object SE to the right CpGs, imputes missing values if any, and replaces 0 and 1 with min and max values.

Usage

clean_beta(SE = NULL)

Arguments

SE

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

Details

clean_beta will transform the the beta-matrix stored in SE by: 1) reducing it to the 19,401 CpGs used to calibrate DNA methylation profiles to the gold standard 2) checking whether it contains missing values, and impute them with impute.knn, 3) check whether it contains 0 and 1 values, and if any, change them to the minimum non-0 and maximum non-1 values in the beta-matrix.

Value

A clean version of the input SE reduced to 19,401 CpGs, with missing values imputed, and without 0 or 1 values.

See Also

impute.knn for imputation of missing values, and SummarizedExperiment-class for more details on how to create and manipulate SummarizedExperiment objects.

Examples

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

[Package MEAT version 0.99.6 Index]