Description Usage Arguments Details Value See Also Examples
View source: R/data_cleaning.R
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.
1 | clean_beta(SE = NULL, version = "MEAT2.0")
|
SE |
A |
version |
A character specifying which version of the epigenetic clock
you would like to use. Dy default, |
clean_beta
will transform the the beta-matrix stored in SE
by:
reducing it to the CpGs used to calibrate DNA methylation profiles
to the gold standard. By default, clean_beta
will reduce your beta-matrix
to the 18,747 CpGs used in the updated version of MEAT (MEAT 2.0).
If you would like to use the original version of MEAT, clean_beta
will reduce your data to the 19,401 CpGs that are in common between the 12
datasets from the original publication.
checking whether it contains missing values, and impute them with
impute.knn
,
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 the right 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.