getEpiTOC: Estimate methylation-based age using EpiTOC algorithm.

Description Usage Arguments Value References Examples

View source: R/getEpiTOC.R

Description

Uses the epiTOC algorithm described in Yang et al 2016.

Usage

1
getEpiTOC(df,keepcpgs.epitoc=TRUE)

Arguments

df

Beta-value dataframe for calculation of age estimation.

keepcpgs.epitoc

Whether to retain EpiTOC CpGs used in calculation.

Value

List of age estimates and user specified details.

References

Yang et al. "Correlation of an epigenetic mitotic clock with cancer risk." Genome Biology, 2016.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## The function is currently defined as
function (df, keepcpgs.epitoc = TRUE) 
{
    common.v <- intersect(rownames(df), EpiTOCcpgs)
    map.idx <- match(common.v, rownames(df))
    return.df <- data.frame(EpiTOC.Est = colMeans(df[map.idx, 
        ]))
    return.list <- list(return.df)
    names(return.list) <- "EpiTOC.Est"
    message("Number of available epiTOC CpGs: ", length(common.v), 
        "/", length(EpiTOCcpgs), ".", sep = "")
    if (keepcpgs.epitoc) {
        return.list <- append(return.list, list(common.v))
        names(return.list)[[length(return.list)]] <- "Epitoc.CpGs.Used"
    }
    return(return.list)
}

metamaden/cgageR documentation built on May 20, 2019, 5:07 p.m.