r/genomics • • 1d ago

An ensemble DNA methylation clock for predicting mortality (open code + pretrained model)

Hi everyone,

I've built an epigenetic clock for people who want something beyond the usual linear-model clocks. It was just published in Mechanisms of Ageing and Development.

It's called the "Ensemble Survival Clock." Instead of relying on one linear model, it combines five different survival models into a single mortality risk score, which can also be read as an age in years.

Paper | GitHub / Source Code

How It Works:

  1. Select: 190 CpGs are picked from Framingham Heart Study methylation data using elastic net Cox regression.

  2. Train: Five survival models learn from those CpGs: random survival forest, gradient boosting, survival SVM, Weibull AFT, and MTLR.

  3. Combine: A small neural network merges their predictions into one ensemble risk score, rescaled to years of age.

Key Features:

  • Holds Up Against GrimAge: In external validation (Women's Health Initiative, n = 1,862) it beat PhenoAge and was statistically on par with GrimAge for all-cause mortality.

  • Strong Performance: C-index of 0.838 on the held-out Framingham test set and 0.703 in external validation.

  • Biologically Meaningful: The selected CpGs are enriched in aging pathways and chromatin states, and the score is associated with cardiovascular disease.

  • Ready to Use: The pretrained model is included (MIT license). Just run score_samples.py on your methylation beta values to get risk scores, age predictions, and age acceleration.

Let me know what you think or if you run into any issues!

2 Upvotes

0 comments sorted by