Title: | Methylclock - DNA methylation-based clocks |
---|---|
Description: | This package allows to estimate chronological and gestational DNA methylation (DNAm) age as well as biological age using different methylation clocks. Chronological DNAm age (in years) : Horvath's clock, Hannum's clock, BNN, Horvath's skin+blood clock, PedBE clock and Wu's clock. Gestational DNAm age : Knight's clock, Bohlin's clock, Mayne's clock and Lee's clocks. Biological DNAm clocks : Levine's clock and Telomere Length's clock. |
Authors: | Dolors Pelegri-Siso [aut, cre] , Juan R. Gonzalez [aut] |
Maintainer: | Dolors Pelegri-Siso <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.13.0 |
Built: | 2024-10-30 08:55:38 UTC |
Source: | https://github.com/bioc/methylclock |
Check wheter input data contains the required CpGs for the implemented clocks.
checkClocks(x, ...)
checkClocks(x, ...)
x |
data.frame or tibble (Individual in columns, CpGs in rows, CpG names in first colum - i.e. Horvath's format), ExpressionSet or GenomicRatioSet. A matrix is also possible having the CpG names in the rownames. |
... |
other parameters |
To be supplied
a list with the different clocks when there are more than 80 the required CpGs
TestDataset <- get_TestDataset() checkClocks(TestDataset)
TestDataset <- get_TestDataset() checkClocks(TestDataset)
Check wheter input data contains the required CpGs for the implemented clocks for Gestational Age.
checkClocksGA(x, ...)
checkClocksGA(x, ...)
x |
data.frame or tibble (Individual in columns, CpGs in rows, CpG names in first colum - i.e. Horvath's format), ExpressionSet or GenomicRatioSet. A matrix is also possible having the CpG names in the rownames. |
... |
other parameters |
To be supplied
a list with the different GA clocks when there are more than 80
TestDataset <- get_TestDataset() checkClocksGA(TestDataset)
TestDataset <- get_TestDataset() checkClocksGA(TestDataset)
Show the required CpGs contained on input data for the implemented clocks
commonClockCpgs(object, clock)
commonClockCpgs(object, clock)
object |
resulting object from checkClocks functions |
clock |
string with the implemented clock, possible values are : "Knight", "Bohlin", "Mayne" and "Lee", "Horvath", "Hannum", "Levine", "skinHorvath", "PedBE", "Wu" and "TL" |
The common CpGs between input data and defined GA clock
TestDataset <- get_TestDataset() cpgs.missing.GA <- checkClocksGA(TestDataset) cpgs.missing <- checkClocks(TestDataset) commonClockCpgs(cpgs.missing.GA, "Bohlin") commonClockCpgs(cpgs.missing, "Hannum")
TestDataset <- get_TestDataset() cpgs.missing.GA <- checkClocksGA(TestDataset) cpgs.missing <- checkClocks(TestDataset) commonClockCpgs(cpgs.missing.GA, "Bohlin") commonClockCpgs(cpgs.missing, "Hannum")
DNAm age estimation using different DNA methylation clocks.
DNAmAge( x, clocks = "all", toBetas = FALSE, fastImp = FALSE, normalize = FALSE, age, cell.count = TRUE, cell.count.reference = "blood gse35069 complete", min.perc = 0.8, ... )
DNAmAge( x, clocks = "all", toBetas = FALSE, fastImp = FALSE, normalize = FALSE, age, cell.count = TRUE, cell.count.reference = "blood gse35069 complete", min.perc = 0.8, ... )
x |
data.frame (Individual in columns, CpGs in rows, CpG names in first colum - i.e. Horvath's format), matrix (individuals in columns and Cpgs in rows having CpG names in the rownames), ExpressionSet or GenomicRatioSet. |
clocks |
the methods used for estimating DNAmAge. Currrently "Horvath", "Hannum", "Levine", "BNN", "skinHorvath", "PedBE", "Wu", "TL", "BLUP", "EN" and "all" are available. Default is "all" and all clocks are estimated. |
toBetas |
Should data be transformed to beta values? Default is FALSE. If TRUE, it implies data are M values. |
fastImp |
Is fast imputation performed if necessary? (see details). Default is FALSE |
normalize |
Is Horvath's normalization performed? By default is FALSE |
age |
individual's chronological age. |
cell.count |
Are cell counts estimated? Default is TRUE. |
cell.count.reference |
Used when 'cell.count' is TRUE. Default is "blood gse35069 complete".See 'meffil::meffil.list.cell.count.references()' for possible values. |
min.perc |
Indicates the minimum conicidence percentage required between CpGs in or dataframee x and CpGs in clock coefficients to perform the calculation. If min.prec is too low, the estimated gestational DNAm age can be poor |
... |
Other arguments to be passed through impute package |
Imputation is performed when having missing data. Fast imputation is performed by ... what about imputing only when CpGs for the clock are missing?
The estimated chronological and biological mDNA age
MethylationData <- get_MethylationDataExample() age.example55 <- DNAmAge(MethylationData)
MethylationData <- get_MethylationDataExample() age.example55 <- DNAmAge(MethylationData)
Gestational DNAm age estimation using different DNA methylation clocks.
DNAmGA( x, toBetas = FALSE, fastImp = FALSE, normalize = FALSE, age, cell.count = TRUE, cell.count.reference = "andrews and bakulski cord blood", min.perc = 0.8, ... )
DNAmGA( x, toBetas = FALSE, fastImp = FALSE, normalize = FALSE, age, cell.count = TRUE, cell.count.reference = "andrews and bakulski cord blood", min.perc = 0.8, ... )
x |
data.frame (Individual in columns, CpGs in rows, CpG names in first colum - i.e. Horvath's format), matrix (individuals in columns and Cpgs in rows having CpG names in the rownames), ExpressionSet or GenomicRatioSet. |
toBetas |
Should data be transformed to beta values? Default is FALSE. If TRUE, it implies data are M values. |
fastImp |
Is fast imputation performed if necessary? (see details). Default is FALSE |
normalize |
Is Horvath's normalization performed? By default is FALSE |
age |
individual's chronological age. Required to compute gestational age difference output |
cell.count |
Are cell counts estimated? Default is TRUE. |
cell.count.reference |
Used when 'cell.count' is TRUE. Default is "blood gse35069 complete". See 'meffil::meffil.list.cell.count.references()' for possible values. |
min.perc |
Indicates the minimum conicidence percentage required between CpGs in or dataframee x and CpGs in clock coefficients to perform the calculation. If min.prec is too low, the estimated gestational DNAm age can be poor |
... |
Other arguments to be passed through impute package |
Imputation is performed when having missing data. Fast imputation is performed by ... what about imputing only when CpGs for the clock are missing?
the estimated gestational DNAm age
TestDataset <- get_TestDataset() TestDataset[1:5, ] ga.test <- DNAmGA(TestDataset)
TestDataset <- get_TestDataset() TestDataset[1:5, ] ga.test <- DNAmGA(TestDataset)
Get cell type reference
getCellTypeReference(name)
getCellTypeReference(name)
name |
string with predefined datasets andrews and bakulski cord blood, blood gse35069, blood gse35069 chen, blood gse35069 complete, "combined cord blood", "cord blood gse68456", "gervin and lyle cord blood", "guintivano dlpfc" or "saliva gse48472" |
ORIGINAL AUTHOR: Matthew Suderman at githug : https://github.com/perishky/meffil The original meffilListCellTypeReferences and getCellTypeReference function from meffil v1.0.0
name and reference.globals
name <- "andrews and bakulski cord blood" getCellTypeReference(name)
name <- "andrews and bakulski cord blood" getCellTypeReference(name)
Loads DNAm clock data from methylclockData
load_DNAm_Clocks_data()
load_DNAm_Clocks_data()
void
load_DNAm_Clocks_data()
load_DNAm_Clocks_data()
Loads DNAmGA clock data from methylclockData
load_DNAmGA_Clocks_data()
load_DNAmGA_Clocks_data()
void
load_DNAm_Clocks_data()
load_DNAm_Clocks_data()
Estimate cell type ratios from methylation profiles of purified cell populations (Infinium HumanMethylation450 BeadChip).
meffilEstimateCellCountsFromBetas(beta, cellTypeReference, verbose = FALSE)
meffilEstimateCellCountsFromBetas(beta, cellTypeReference, verbose = FALSE)
beta |
Matrix of Illumina 450K methylation levels (rows = CpG sites, columns = subjects). |
cellTypeReference |
Character string name of the cell type reference
to use for estimating cell counts.
See |
verbose |
If |
ORIGINAL AUTHOR: Matthew Suderman The original meffil.list.cellTypeReferences and get.cellTypeReference function from meffil v1.0.0 downloaded from githug : https://github.com/perishky/meffil
A matrix of cell count estimates.
Results should be nearly identical to
minfi::estimateCellCounts()
betas
cell.count.reference <- "andrews and bakulski cord blood" TestDataset <- get_TestDataset() cpgs <- t(as.matrix(TestDataset[, -1])) colnames(cpgs) <- TestDataset$CpGName meffilEstimateCellCountsFromBetas(t(cpgs), cell.count.reference)
cell.count.reference <- "andrews and bakulski cord blood" TestDataset <- get_TestDataset() cpgs <- t(as.matrix(TestDataset[, -1])) colnames(cpgs) <- TestDataset$CpGName meffilEstimateCellCountsFromBetas(t(cpgs), cell.count.reference)
List of available cell type references
meffilListCellTypeReferences()
meffilListCellTypeReferences()
ORIGINAL AUTHOR: Matthew Suderman The original meffilListCellTypeReferences and getCellTypeReference function from meffil v1.0.0 at githug : https://github.com/perishky/meffil
a list with reference globals
meffilListCellTypeReferences()
meffilListCellTypeReferences()
Package to estimate DNA methylation age (DNAmAge) using different methylation clocks.
Juan R Gonzalez <[email protected]>
Plot correlation among DNAm clockx
plotCorClocks(x, ...)
plotCorClocks(x, ...)
x |
a tible or data.frame with the different DNAm clocks |
... |
other arguments to be passs through function 'chart.Correlation' from 'PerformanceAnalytics' package |
To be supplied
Plot with Correlation Clocks
library(Biobase) library(GEOquery) dd <- GEOquery::getGEO("GSE109446") gse109446 <- dd[[1]] controls <- Biobase::pData(gse109446)$`diagnosis:ch1` == "control" gse <- gse109446[, controls] age <- as.numeric(Biobase::pData(gse)$`age:ch1`) age.gse <- DNAmAge(gse, age = age) plotCorClocks(age.gse)
library(Biobase) library(GEOquery) dd <- GEOquery::getGEO("GSE109446") gse109446 <- dd[[1]] controls <- Biobase::pData(gse109446)$`diagnosis:ch1` == "control" gse <- gse109446[, controls] age <- as.numeric(Biobase::pData(gse)$`age:ch1`) age.gse <- DNAmAge(gse, age = age) plotCorClocks(age.gse)
Plot DNAm age estimation vs chronological age.
plotDNAmAge(x, y, tit = "Horvath's method", clock = "chronological", ...)
plotDNAmAge(x, y, tit = "Horvath's method", clock = "chronological", ...)
x |
DNAm age estimation |
y |
Chronological age |
tit |
Plot title. Default is "Horvath's method". |
clock |
Type of clock 'chronological' or 'GA', default 'chronological' |
... |
Other plot parameters for ggplot |
Plot with estimated DNAmAge
library(tidyverse) path <- system.file("extdata", package = "methylclock") covariates <- read_csv(file.path( path, "SampleAnnotationExample55.csv" )) age <- covariates$Age MethylationData <- get_MethylationDataExample() age.example55 <- DNAmAge(MethylationData) plotDNAmAge(age.example55$Horvath, age)
library(tidyverse) path <- system.file("extdata", package = "methylclock") covariates <- read_csv(file.path( path, "SampleAnnotationExample55.csv" )) age <- covariates$Age MethylationData <- get_MethylationDataExample() age.example55 <- DNAmAge(MethylationData) plotDNAmAge(age.example55$Horvath, age)
The PROGRESS cohort data is available in the additional file 8 of : Knight, A.K., Craig, J.M., Theda, C. et al. An epigenetic clock for gestational age at birth based on blood methylation data. Genome Biol 17, 206 (2016). https://doi.org/10.1186/s13059-016-1068-z
data(progress_data)
data(progress_data)
A data frame with 148 obs. and 151 variables
A dataset containing data from the PROGRESS (Programming Research in Obesity, Growth, Environment and Social Stressors) cohort
data(progress_data)
data(progress_data)
The PROGRESS cohort data is available in the additional file 8 of : Knight, A.K., Craig, J.M., Theda, C. et al. An epigenetic clock for gestational age at birth based on blood methylation data. Genome Biol 17, 206 (2016). https://doi.org/10.1186/s13059-016-1068-z
data(progress_vars)
data(progress_vars)
A data frame with 150 obs. and 3 variables
A dataset containing data from the PROGRESS (Programming Research in Obesity, Growth, Environment and Social Stressors) cohort
data(progress_vars)
data(progress_vars)