AltumAge

May 27, 2025 ยท View on GitHub

Paper DOI Python TensorFlow License

๐Ÿงฌ AltumAge: A Pan-Tissue DNA Methylation Epigenetic Clock Based on Deep Learning

AltumAge is a state-of-the-art epigenetic clock that predicts biological age from DNA methylation data across multiple tissue types. Built using deep learning, AltumAge demonstrates superior performance compared to traditional epigenetic clocks.

๐ŸŽฏ Key Features

  • Pan-tissue compatibility: Works across multiple tissue types
  • Deep learning architecture: Leverages neural networks for improved accuracy
  • Multi-platform support: Compatible with Illumina 27k, 450k, and EPIC arrays
  • PyTorch compatibility: Available in both TensorFlow and PyTorch formats
  • Easy integration: Now available through the pyaging package

๐Ÿ“Š Performance Highlights

  • Trained, validated, and tested on 142 datasets
  • Outperforms Horvath's 2013 model across multiple metrics
  • Robust performance across diverse tissue types and age ranges

๐Ÿš€ Quick Start

The easiest way to use AltumAge is through pyaging:

pip install pyaging

Then follow the DNA methylation age prediction tutorial.

Option 2: Standalone Usage

Prerequisites

pip install tensorflow==2.5.0 numpy pandas scikit-learn

Basic Usage

import tensorflow as tf
import numpy as np
import pandas as pd
from sklearn import linear_model, preprocessing

# Load CpG sites
cpgs = np.array(pd.read_pickle('example_dependencies/multi_platform_cpgs.pkl'))

# Load your methylation data
data = pd.read_pickle('example_dependencies/example_data.pkl')
methylation_data = data[cpgs]

# Load scaler and model
scaler = pd.read_pickle('example_dependencies/scaler.pkl')
AltumAge = tf.keras.models.load_model('example_dependencies/AltumAge.h5')

# Scale and predict
methylation_data_scaled = scaler.transform(methylation_data)
predicted_ages = AltumAge.predict(methylation_data_scaled).flatten()

๐Ÿ“‹ Detailed Instructions

1. Data Preparation

AltumAge requires:

  • DNA methylation beta values from Illumina arrays (27k, 450k, or EPIC)
  • Selection of 20,318 specific CpG sites (provided in CpGsites.csv)

2. Model Loading

# For TensorFlow users
AltumAge = tf.keras.models.load_model('example_dependencies/AltumAge.h5')

# For PyTorch users
import torch
AltumAge_pytorch = torch.load('dependencies/AltumAge.pt')

3. Preprocessing Pipeline

  1. Select the required CpG sites in the correct order
  2. Scale using the provided RobustScaler
  3. Fill up missing values with 0 after scaling
  4. Input to the model for age prediction

๐Ÿ“ Repository Structure

AltumAge/
โ”œโ”€โ”€ example.ipynb                    # Complete usage example
โ”œโ”€โ”€ example_dependencies/            # Required files for running AltumAge
โ”‚   โ”œโ”€โ”€ AltumAge.h5                 # TensorFlow model
โ”‚   โ”œโ”€โ”€ multi_platform_cpgs.pkl     # List of CpG sites
โ”‚   โ”œโ”€โ”€ scaler.pkl                  # Preprocessing scaler
โ”‚   โ””โ”€โ”€ example_data.pkl            # Example dataset
โ”œโ”€โ”€ dependencies/
โ”‚   โ””โ”€โ”€ AltumAge.pt                 # PyTorch model
โ”œโ”€โ”€ CpGsites.csv                    # Required CpG sites
โ””โ”€โ”€ supplementary_results/          # Detailed performance metrics

๐Ÿ’พ Data Availability

Access our comprehensive dataset collection:

๐Ÿ“š Citation

If you use AltumAge in your research, please cite:

@article{de_Lima_Camillo_AltumAge,
    author = {de Lima Camillo, Lucas Paulo and Lapierre, Louis R and Singh, Ritambhara},
    title = {A pan-tissue DNA-methylation epigenetic clock based on deep learning},
    journal = {npj Aging},
    volume = {8},
    pages = {4},
    year = {2022},
    doi = {10.1038/s41514-022-00085-y},
    publisher = {Springer Nature},
    URL = {https://doi.org/10.1038/s41514-022-00085-y}
}

๐Ÿ“ง Contact

For questions or collaborations, please contact:

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.