predictAge: Predicts gestational age using placental DNA methylation...

View source: R/predictAge.R

predictAgeR Documentation

Predicts gestational age using placental DNA methylation microarray data

Description

predictAge Multiplies the coefficients from one of three epigenetic gestational age clocks, by the corresponding CpGs in a supplied betas data.frame.

Usage

predictAge(betas, type = "RPC")

Arguments

betas

An n by m dataframe of methylation values on the beta scale (0, 1), where the CpGs are arranged in rows, and samples in columns. Should contain all CpGs used in each clock

type

One of the following: "RPC" (Robust), "CPC", (Control) or "RRPC" (Refined Robust).

Details

Predicts gestational age using one of 3 placental gestational age clocks: RPC, CPC, or refined RPC. Requires placental DNA methylation measured on the Infinium 27K/450k/EPIC methylation array. Ensure as many predictive CpGs are present in your data, otherwise accuracy may be impacted.

It's recommended that you have all predictive CpGs, otherwise accuracy may vary.

Value

A vector of length m, containing inferred gestational age.

Examples


# Load placenta DNAm data
library(dplyr)
data(plBetas)
data(plPhenoData)

plPhenoData %>%
    mutate(inferred_ga = predictAge(plBetas, type = "RPC"))
    

wvictor14/planet documentation built on Feb. 22, 2024, 10:05 p.m.