clean_beta {MEAT} | R Documentation |
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.
clean_beta(SE = NULL)
SE |
A |
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.
A clean version of the input SE
reduced to 19,401 CpGs,
with missing values imputed, and without 0 or 1 values.
impute.knn
for imputation of missing values,
and SummarizedExperiment-class
for more
details on how to create and manipulate SummarizedExperiment objects.
# 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)