methylation-clock
Compute epigenetic age from DNA methylation arrays using PyAging clocks from GEO accessions or local files.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 12
- Forks
- 5
01 前言 Front Matter
- name
- methylation-clock
- license
- MIT
- metadata
- { "tags": [ "epigenetics", "methylation", "aging", "clock", "pyaging", "GEO", "illlumina-450k", "EPIC" ], "version": "0.1.0", "openclaw": { "os": [ "darwin", "linux" ], "emoji": "🕰️", "always": false, "install": [ { "kind": "pip", "package": "pandas" }, { "kind": "pip", "package": "numpy" }, { "kind": "pip", "package": "matplotlib" }, { "kind": "pip", "package": "pyaging" } ], "homepage": "https://github.com/ClawBio/ClawBio", "requires": { "bins": [ "python3" ] }, "trigger_keywords": [ "epigenetic age", "methylation clock", "pyaging", "Horvath", "GrimAge", "DunedinPACE", "GEO", "GSE" ] } }
- description
- Compute epigenetic age from DNA methylation arrays using PyAging clocks from GEO accessions or local files.
02 资源文件 4
- 其他data/GSE139307_small.csv.gz5.6 MB
- 参考文档data/PROVENANCE.md1.1 KB
- 脚本methylation_clock.py17.1 KB
- 脚本tests/test_methylation_clock.py2.1 KB
03 SKILL.md 正文
Methylation Clock
[!note] Running these commands in this vault The CLI examples below are written for the upstream ClawBio repo layout, where skills live under
skills/and aclawbio.pyorchestrator exists. This flat skills vault has noclawbio.py: run the script directly and drop theskills/prefix — e.g.python methylation-clock/methylation_clock.py ....
Domain Decisions
Epigenetic age workflows are difficult to reproduce because preprocessing and clock inputs differ across tools and publications. This skill standardizes a PyAging-first pipeline from ingestion to report generation, with explicit reproducibility outputs.
Core Capabilities
- Accepts exactly one input source: GEO accession (
--geo-id) or local methylation file (--input). - Applies notebook-aligned preprocessing (female derivation and EPICv2 aggregation by default).
- Converts tabular data to AnnData and runs one or more methylation clocks.
- Exports predictions, missing-feature diagnostics, metadata, figures, and reproducibility artifacts.
Input Contract
- Exactly one input source:
- GEO accession with
--geo-id(example:GSE139307) - Local file with
--input(.pkl,.pickle,.csv,.tsv,.csv.gz,.tsv.gz)
- GEO accession with
- Required output directory via
--output - Optional clock list via
--clocks
Demo And Usage
Demo fixture provenance and checksum are documented in methylation-clock/data/PROVENANCE.md (data/PROVENANCE.md relative to this skill).
Install optional methylation-clock dependency (not part of the global base requirements):
pip install pyaging>=0.1
# Demo
python skills/methylation-clock/methylation_clock.py \
--input skills/methylation-clock/data/GSE139307_small.csv.gz \
--output /tmp/methylation_clock_demo
# GEO input
python skills/methylation-clock/methylation_clock.py \
--geo-id GSE139307 \
--output /tmp/methylation_clock_geo
# Local methylation file
python skills/methylation-clock/methylation_clock.py \
--input my_methylation.pkl \
--clocks Horvath2013,AltumAge,PCGrimAge,GrimAge2,DunedinPACE \
--output /tmp/methylation_clock_local
Output Structure
methylation_clock_report/
├── report.md
├── figures/
│ ├── clock_distributions.png
│ └── clock_correlation.png
├── tables/
│ ├── predictions.csv
│ ├── prediction_summary.csv
│ ├── missing_features.csv
│ └── clock_metadata.json
└── reproducibility/
├── commands.sh
├── environment.yml
└── checksums.sha256
Safety Rules
- ClawBio is local-first: user methylation data must remain on-device.
- The skill refuses non-empty output directories to avoid silent overwrite.
- Reports must include this disclaimer: "ClawBio is a research and educational tool. It is not a medical device and does not provide clinical diagnoses. Consult a healthcare professional before making any medical decisions."
Agent Boundary
- Route methylation clock requests to
skills/methylation-clock/methylation_clock.py. - Do not infer clinical diagnosis or treatment from clock estimates.
- Trigger terms include: epigenetic age, methylation clock, Horvath, GrimAge, DunedinPACE, GEO, GSE.
- Valid downstream chaining:
rnaseq-defor transcriptomic-aging contrasts andequity-scorerfor cohort context.
04 同仓库更多 Skills
zarr-python
Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3/GCS storage, and NumPy/Dask/Xarray integration. Use for array layout, bounded I/O, format migration, or scientific metadata preservation.
yeet
Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.
xarray
N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF/GRIB/Zarr files, climate/weather/oceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.
writing-mstest-tests
Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for "review" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected/actual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext/lifecycle; timeout/cancellation; OS/CI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest/non-.NET code.
wgs-prs
End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core/sarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti/Tv and Het/Hom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.