readme.md

DNA methylation indices of exposure and phenotype (meffonym)

Installation

library(remotes)
install_github("perishky/meffonym")

Typical use

In the example below, we show how to apply the Hannum clock (Hannum et al. 2013).

library(meffonym)

meth <- ... ## methylation matrix, rows=CpG site, columns=samples
age <- ... ## age for each sample
female <- ... ## sex for each sample (1=female,0=male)

ret <- meffonym.score(meth, "hannum")

cor(ret$score, age)
## [1] 0.9342

Special cases

Some models require additional inputs or have optional steps:

meffonym.score(meth,"horvath",calibrate=TRUE)$score
== meffonym.horvath.age(meth)
meffonym.score(meth, "dunedinpace", calibrate=TRUE)$score
== meffonym.dunedinpace.estimate(meth)
meffonym.score(rbind(meth,female=female,age=age))$score
== meffonym.grimage(meth,female,age)

Current list of models

models.csv

For developers

Models can be added temporarily to the package using meffonym.add.models(). However, these models will disappear as soon as R is exited or meffonym is reloaded. To add a model so that it persists, create a new folder and add the model definition to inst and add a new row for the model in inst/models.csv. The model definition is encoded in a csv file with two columns, pred.var and coef. One row can optionally provide a model intercept with the pred.var name 'intercept'.

Models to add



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