Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

methylation-clock

БесплатноЗапускает вложенные скриптыНе проверен

Compute epigenetic age from DNA methylation arrays using PyAging clocks from GEO accessions or local files.

ClawBioот ClawBio★ 1 197 звёзд на GitHub

Об этом скилле

Methylation Clock

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

  1. Accepts exactly one input source: GEO accession (--geo-id) or local methylation file (--input).
  2. Applies notebook-aligned preprocessing (female derivation and EPICv2 aggregation by default).
  3. Converts tabular data to AnnData and runs one or more methylation clocks.
  4. 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)
  • One row per sample and numeric methylation beta values in [0, 1] under cg, ch, rs, or nv probe IDs. Missing probe values are allowed and passed to PyAging's selected imputer. Illumina defines beta values on [0, 1]; if your export reports methylation percentages on [0, 100], divide the probe values by 100 before running this skill. Do not divide age or other metadata. The skill never guesses the input scale.
  • An optional sample_id column in CSV/TSV files becomes the sample index and must be present, nonblank, and unique. Otherwise CSV/TSV rows receive numeric IDs. Pickle files retain their DataFrame index, which must also have present, nonblank, unique identifiers.
  • Known metadata columns are gender, sex, tissue_type, and dataset. List any other nonnumeric columns with --metadata-cols; do not list a probe column as metadata. For PCGrimAge or GrimAge2, supply numeric age in years and known gender/sex (F/M, Female/Male) or a numeric female column (1/0). Numeric gender/sex codes are rejected because their meaning is ambiguous. Do not list age or female in --metadata-cols: PyAging needs them as model features. The skill rejects missing inputs for those two clocks rather than imputing demographic covariates.
  • Required output directory via --output
  • Optional clock list via --clocks

Demo And Usage

The bundled two-sample demo is synthetic. Its fixed-seed generator, public probe-identifier source, and checksums are documented in skills/methylation-clock/data/PROVENANCE.md. Its placeholder ages and sex labels have no relationship to the simulated beta values; use its clock predictions only to check that the workflow runs. Reports label this fixture as synthetic whether it is selected with --demo or supplied through --input.

Install the optional PyAging dependency in the Python environment used to run ClawBio. The demo below was verified with PyAging 0.5.7; first use of a clock downloads its public model weights. Local input data is not uploaded.

python -m pip install "pyaging>=0.5.7,<0.6"
# Demo
python skills/methylation-clock/methylation_clock.py \
  --demo --clocks Horvath2013 \
  --output /tmp/methylation_clock_demo

# GEO input
python skills/methylation-clock/methylation_clock.py \
  --geo-id GSE139307 \
  --clocks Horvath2013 \
  --output /tmp/methylation_clock_geo

# Local methylation file
python skills/methylation-clock/methylation_clock.py \
  --input my_methylation.csv.gz \
  --clocks Horvath2013,DunedinPACE \
  --output /tmp/methylation_clock_local

Use pickle input only when you trust its source; deserializing an untrusted pickle can execute code. --geo-id downloads a public GEO example into the chosen output directory. The skill refuses a nonempty output directory.

What The Five Default Clocks Measure

Clock PyAging target Intended tissue Additional model inputs Output unit
Horvath2013 Chronological age Multiple tissues None Years
AltumAge Chronological age Multiple tissues None Years
PCGrimAge Mortality-risk proxy reproducing GrimAge Whole blood Age and sex Years
GrimAge2 Mortality risk Whole blood Age and sex Years
DunedinPACE Pace of aging Whole blood None Biological years per chronological year

The targets, tissues, and units come from the PyAging clock catalogue; its DNA methylation tutorial identifies age and sex as features for PCGrimAge and GrimAge2. The report uses a unit from PyAging metadata when available, with documented units for the five default clocks as fallbacks. tissue_type is descriptive metadata, not an automatic compatibility check. Compare predictions only within an appropriate tissue and target; a DunedinPACE value is not an age in years. A difference between an estimate and chronological age is not, by itself, a validated health assessment or an age-acceleration analysi

Полный SKILL.md на GitHub

Установить methylation-clock в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

data/PROVENANCE.mddata/generate_synthetic_demo.pydata/probe_ids.txt.gzdata/synthetic_beta_demo.csv.gzmethylation_clock.py

FAQ

Что делает скилл methylation-clock?

Compute epigenetic age from DNA methylation arrays using PyAging clocks from GEO accessions or local files.

Как установить скилл methylation-clock?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл methylation-clock запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить methylation-clock с