meffonym.score: Calculate DNA methylation scores

View source: R/score.r

meffonym.scoreR Documentation

Calculate DNA methylation scores

Description

Calculate DNA methylation scores

Usage

meffonym.score(
  x,
  model,
  calibrate = F,
  scale = model %in% c("zhang", "zhang.blup"),
  transform = NULL,
  adjust = NULL
)

Arguments

x

A matrix of all score input variables, such as DNA methylation values (rows=Input variables like CpG sites, columns=samples). Missing values in x will be replaced with the mean value of the row.

model

Model name from available list (meffonym.models()).

calibrate

Prior to calculating scores, if TRUE then calibrate DNA methylation, otherwise use DNA methylation unmodified (Default: FALSE). If 'model=="dunedinpace"', then calibration involves quantile normalization to the DunedinPACE gold standard; otherwise, calibration involves applying the BMIQ algorithm to the Horvath gold standard as in Horvath's DNAm age calculator.

scale

Prior to calculating scores, standardize methylation levels, i.e. subtract mean and divide by standard deviation for each CpG site. Default is TRUE for 'zhang' and 'zhang.blup', otherwise FALSE.

transform

After calculating scores, transform scores using this function. Default is anti.trafo for the "horvath", "skin" and "pedbe" models, otherwise NULL.

adjust

Data frame with variables for adjusting the final score (Default: NULL).

Value

List containing the list of score variables (e.g. CpG sites) actually used (sites) in case some score variables included in the model are missing from x, the resulting score (score) for each sample in the dataset. If adjust is not NULL, then the score prior to adjustment will also be included in the return list (raw).


perishky/meffonym documentation built on Nov. 8, 2024, 8:36 p.m.