Skip to main content

CI Release Documentation DOI PyPI Downloads Stars

🐍 pyaging: a Python-based compendium of GPU-optimized aging clocks

pyaging is a cutting-edge Python package designed for the longevity research community, offering a comprehensive suite of GPU-optimized biological aging clocks.

Installation - Clock gallery - Search, cite, get metadata and clock parameters - Illumina Human Methylation Arrays - Illumina Mammalian Methylation Arrays - RRBS DNA methylation - Bulk histone mark ChIP-Seq - Bulk ATAC-Seq - Bulk RNA-Seq - Blood chemistry - CpGPTGrimAge3 - API Reference

With a growing number of aging clocks and biomarkers of aging, comparing and analyzing them can be challenging. pyaging simplifies this process, allowing researchers to input various molecular layers (DNA methylation, histone ChIP-Seq, ATAC-seq, transcriptomics, etc.) and quickly analyze them using multiple aging clocks, thanks to its GPU-backed infrastructure. This makes it an ideal tool for large datasets and multi-layered analysis.

📦 Installation

pyaging requires Python 3.11 or newer and is available on PyPI:

pip install pyaging

To use the histone mark clocks, install the optional pyBigWig dependency as well (not supported on Windows):

pip install pyaging[histone]

🚀 Quickstart

import pandas as pd
import pyaging as pya

pya.data.download_example_data("GSE139307")
df = pd.read_pickle("pyaging_data/GSE139307.pkl")

adata = pya.pp.df_to_adata(df)
pya.pred.predict_age(adata, ["Horvath2013", "AltumAge", "DunedinPACE"])
adata.obs.head()

Clock weights are downloaded on demand from per-clock repositories under the pyaging Hugging Face organization (example data comes from lucascamillomd/pyaging-data). Set PYAGING_DATA_REVISION to an existing data release tag, such as v0.5.2, to pin downloads; it defaults to main. Package-only releases do not create new HF tags. Version 0.5.3 uses the existing model artifacts.

Run the same clocks across datasets

Reuse loaded models with a bounded cache:

clocks = ["Horvath2013", "AltumAge"]
cache = pya.pred.ClockCache(maxsize=len(clocks))
for adata in datasets:  # Each dataset is a separate AnnData object.
    pya.pred.predict_age(adata, clocks, clock_cache=cache)
cache.clear()

The cache avoids repeated download checks, deserialization, and device transfers. It holds at most maxsize models and keeps separate entries for each device and data revision. It is optional; ordinary calls retain no model cache. Clear it to refresh weights from a moving main revision. See the prediction guide for memory and cohort guidance.

❓ Can't find an aging clock?

If you have recently developed an aging clock and would like it to be integrated into pyaging, please email me. I aim to incorporate it within one to two weeks! I'm also happy to adapt to any licensing terms for commercial entities.

💬 Community Discussion

For coding-related queries, feedback, and discussions, please visit our GitHub Issues page.

📝 Changelog

Notable changes, including breaking ones, are recorded in CHANGELOG.md. Per-version release artifacts and the commit log are on the GitHub Releases page.

📖 Citation

To cite pyaging, please use the following:

@article{de_Lima_Camillo_pyaging,
    author = {de Lima Camillo, Lucas Paulo},
    title = "{pyaging: a Python-based compendium of GPU-optimized aging clocks}",
    journal = {Bioinformatics},
    pages = {btae200},
    year = {2024},
    month = {04},
    issn = {1367-4811},
    doi = {10.1093/bioinformatics/btae200},
    url = {https://doi.org/10.1093/bioinformatics/btae200},
    eprint = {https://academic.oup.com/bioinformatics/advance-article-pdf/doi/10.1093/bioinformatics/btae200/57218155/btae200.pdf},
}

Metadata

Release files for pyaging 0.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyaging 0.5.3
File Size Uploaded
pyaging-0.5.3.tar.gz 69.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyaging 0.5.3
File Interpreter ABI Platform
pyaging-0.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 148.8 kB

Release files / pyaging-0.5.3.tar.gz

Download URL pyaging-0.5.3.tar.gz
Size 69.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3dd55620940accffd5b478f55f137a73ed53919dd67aadd489ff3b30709f3347
BLAKE2b-256 checksum
How to use checksums
9e3960e35e9e6f625fe8b7777cd80a0ec46f8619b7bc375cb8d5cc57ef5f5ce3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / pyaging-0.5.3-py3-none-any.whl

Download URL pyaging-0.5.3-py3-none-any.whl
Size 79.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cea18e24065c4a2972bf02ad64576fa4366fdb43b422f4c1af24bc954aa456aa
BLAKE2b-256 checksum
How to use checksums
17d30bb6836e9a89aa6713ccf1cb298f81345574f3f7ec8b0b8022ebc537721e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

This release

0.5.3 This release

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.30

2 release files

0.1.29

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.22

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.14

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page