methylation-aggregation
Build comprehensive DNA methylation maps by aggregating WGBS (Whole Genome Bisulfite Sequencing) data across multiple ENCODE experiments, donors, and labs. Use when the user wants to answer "where is DNA methylated/unmethylated in my tissue?" by combining per-CpG methylation data into tissue-level methylation profiles. Handles coverage filtering, identifies hypomethylated regions (HMRs) and partially methylated domains (PMDs), and manages cross-lab variation.
npx skills add majiayu000/claude-skill-registry --skill methylation-aggregation-ammawla-encode-toolkit --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Aggregates WGBS data across ENCODE experiments to build a tissue-level DNA methylation landscape by combining per-CpG methylation data into a profile. It supports quality gates, per-CpG coverage filtering, cross-sample aggregation (weighted by coverage), and identification of regulatory features such as hypomethylated regions (HMRs), unmethylated regions (UMRs), and partially methylated domains (PMDs). It also yields per-CpG methylation averages across samples and region-level summaries (HMRs/UMRs/PMDs), with confidence annotations and downstream logging.
How it works
- Find all available WGBS data for a tissue via encode_search_experiments and summarize labs, donors, and coverage.
- Quality-gate each experiment with criteria including Bisulfite conversion rate (>=98%), mean CpG coverage (>=10x), mapping rate (>=50%), and duplication rate (<30%), ensuring bedMethyl outputs exist.
- Download bedMethyl files (ENCODE standard) using encode_download_files, preferring files with preferred_default.
- Per-sample quality filtering: apply coverage filters (e.g., >=5x; option for >=10x), filter out blacklisted regions, and optionally merge strands to produce a unified per-CpG call.
- Cross-sample aggregation: create a unified CpG matrix by identifying CpGs covered in at least M samples, extract per-sample methylation for shared CpGs, and compute a weighted average methylation per CpG across samples (weights by coverage). Also provide a simple unweighted average alternative.
- Identify regulatory features: detect HMRs (e.g., methylation < 30%), UMRs (methylation < 10%), and PMDs (30–70% methylation with extended domains); optionally perform tissue-specific DMR analysis with DMRcate if comparing tissues.
- Confidence annotation: label HMRs/UMRs by sample support (High, Supported, Variable) and annotate per-CpG profiles by coverage confidence (ALL_SAMPLES, MAJORITY, PARTIAL).
- Compute summary statistics: report total input experiments, QC-passing experiments, CpGs per sample, shared CpGs, mean genome-wide methylation, counts of HMRs/UMRs/PMDs, and high-confidence regions.
- Integrate with ENCODE data: example intersections with H3K27ac, ATAC-seq, and H3K4me3 to contextualize regulatory elements.
- Log provenance: record derived file paths, source accessions, descriptions, and tool usage, including parameters used for filtering and aggregation.
When to use it
- You want a tissue-level DNA methylation landscape from multiple WGBS experiments.
- You need per-CpG weighted methylation averages across experiments to infer where methylation is high or low in a tissue.
- You aim to identify hypomethylated regions (HMRs), unmethylated regions (UMRs), or partially methylated domains (PMDs) from aggregated data.
- You are comparing methylation across donors or labs and want an aggregated profile with confidence annotations.
What it can touch
- bedMethyl files (ENCODE standard) from WGBS experiments
- ENCODE QC metrics and blacklist (hg38-blacklist.v2.bed)
- Tools: bedtools, awk, shell scripting, and optional R/Python steps for advanced analyses (e.g., DMRcate integration and variance calculations)
Caveats
- Bisulfite conversion rate must be >=98% to avoid false methylation calls.
- Coverage depth directly affects accuracy; higher thresholds (e.g., 10x) yield more reliable per-CpG estimates.
- Bulk WGBS represents mixed cell populations; methylation at a CpG may reflect cell-type heterogeneity rather than a single state.
- Strand merging is optional; some files may already be merged.
- PMDs and threshold choices may vary by tissue; recommendations (e.g., 30% for HMRs) are guidance, not strict rules.
# Aggregate DNA Methylation Data Across Studies ## When to Use - User wants to build a tissue-level DNA methylation landscape from multiple WGBS experiments - User asks "where is DNA methylated in brain?" or "find hypomethylated regions across donors" - User needs to identify HMRs (hypomethylated regions), UMRs, or PMDs from aggregated WGBS data - User wants per-CpG weighted methylation averages from multiple experiments - Example queries: "aggregate WGBS data for liver", "build methylation map across donors", "find unmethylated CpG islands in pancreas" Build a comprehensive methylation landscape for a tissue/cell type by merging WGBS bedMethyl files from multiple ENCODE experiments. ## Scientific Rationale **The question**: "What is the DNA methylation state across the genome in my tissue?" DNA methylation is **fundamentally different** from histone marks and accessibility: | Property | Histone/Accessibility | DNA Methylation | |----------|----------------------|-----------------| | Signal type | Binary (bound/open or not) | Continuous (0-100% methylated) | | Default state | Unmarked | ~70-80% methylated (CpG context) | | Biology of interest | Where marks ARE present | Where methy
- When to Use
- Scientific Rationale
- Literature Support
- Two-Level Analysis
- Step 1: Find All Available WGBS Data
- Step 2: Quality-Gate Each Experiment
- WGBS Quality Checks
- Include if:
- Exclude if:
- Step 3: Download bedMethyl Files
- Step 4: Per-Sample Quality Filtering
- 4a. Coverage Filtering (CRITICAL)
- 4b. ENCODE Blocklist Filtering (Amemiya et al. 2019)
- 4c. Strand Merging (Optional but Recommended)
Keep only CpGs with >= 5x coverage (column 10)
More stringent: >= 10x for quantitative analysis
awk '$10 >= 5' sample.bedMethyl > sample.covfiltered.bedMethyl
Download from: https://github.com/Boyle-Lab/Blacklist/blob/master/lists/hg38-blacklist.v2.bed.gz
bedtools intersect -a sample.covfiltered.bedMethyl -b hg38-blacklist.v2.bed -v > sample.filtered.bedMethyl
Group CpGs by position (forward and reverse strand of same CpG)
Sum coverage, calculate weighted average methylation
awk 'BEGIN{OFS="\t"} {
if ($6 == "+") pos = $2
else pos = $2 - 1What does the methylation-aggregation skill do?
Build comprehensive DNA methylation maps by aggregating WGBS (Whole Genome Bisulfite Sequencing) data across multiple ENCODE experiments, donors, and labs. Use when the user wants to answer "where is DNA methylated/unmethylated in my tissue?" by combining per-CpG methylation data into tissue-level methylation profiles. Handles coverage filtering, identifies hypomethylated regions (HMRs) and partially methylated domains (PMDs), and manages cross-lab variation.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill methylation-aggregation-ammawla-encode-toolkit --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
