differential-methylation
This skill performs differential DNA methylation analysis (DMRs and DMCs) between experimental conditions using WGBS methylation tracks (BED/BedGraph). It standardizes input files into per-sample four-column Metilene tables, constructs a merged methylation matrix, runs Metilene for DMR detection, filters the results, and generates quick visualizations.
Best use case
differential-methylation is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
This skill performs differential DNA methylation analysis (DMRs and DMCs) between experimental conditions using WGBS methylation tracks (BED/BedGraph). It standardizes input files into per-sample four-column Metilene tables, constructs a merged methylation matrix, runs Metilene for DMR detection, filters the results, and generates quick visualizations.
Teams using differential-methylation should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/21-differential-methylation/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How differential-methylation Compares
| Feature / Agent | differential-methylation | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This skill performs differential DNA methylation analysis (DMRs and DMCs) between experimental conditions using WGBS methylation tracks (BED/BedGraph). It standardizes input files into per-sample four-column Metilene tables, constructs a merged methylation matrix, runs Metilene for DMR detection, filters the results, and generates quick visualizations.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# WGBS Differential Methylation with metilene
## Overview
- Refer to the **Inputs & Outputs** section to check available inputs and design the output structure.
- **Always prompt user** for which columns in the BED files are methylation fraction/percent. Never decide by yourself.
- Convert heterogeneous inputs to a **per‑sample 4‑column Metilene table** (chrom, start, end, methylation_fraction). Sort the BED files after conversion.
- Generate the merged bed file as the input of metilene.
- **Run metilene**: call DMRs and DMCs with tunable parameters
- **Visualize**: quick plots (Δmethylation vs –log10(q), length histograms).
---
## Inputs & Outputs
### Inputs
```bash
sample1.bed # raw methylation BED files, standardize it according to the following steps
sample2.bed
```
**Assumptions**: All samples share the same reference genome build and chromosome naming scheme.
### Outputs
```bash
DMR_DMC_detection/
stats/
dmr_results.txt # raw metilene output.
dmc_results.txt
significant_dmrs.txt # filtered significant DMRs (TSV).
significant_dmrs.bed # BED for genome browser.
significant_dmcs.txt
significant_dmcs.bed
dmr_summary.txt # counts and length statistics.
plots/
volcano.pdf
length_hist.pdf
temp/
sample1.sorted.bed
... # other sorted BED files
merged_input.bed
```
---
## Decision Tree
### Step 1: Standardize BED file
- extract information from input BED files into **per‑sample 4‑column Metilene table** and sort
```bash
for sample in samples;do
awk -F'\t' 'BEGIN {OFS="\t"} {print $1, $2, $3, $<n>/100}' sample.bed | sort -V -k1,1 -k2,2n # n is provide by user, devided by 100 if is percentage
done
```
### Step 2: Build the merged methylation matrix (fractions per sample)
Call:
- `mcp__methyl-tools__generate_metilene_input`
with:
- `group1_files`: Comma-separated group 1 bedGraph/BED files (from Step 1, must be sorted)
- `group1_files`: Comma-separated group 2 bedGraph/BED files (from Step 1, must be sorted)
- `output_path`: Output file path for generated metilene input
- `group1_name`: Identifier of group 1
- `group2_name`: Identifier of group 2
This tool will:
- Generate a input file for metilene
### Step 3: Run metilene (DMR mode)
Call:
- `mcp__methyl-tools__run_metilene`
with:
- `merged_bed_path`: file path for metilene input
- `group_a_name`: name of group A (e.g. `"case"`)
- `group_b_name`: name of group B (e.g. `"control"`)
- `mode`: Mode for metilene CLI (e.g. 1: de-novo, 2: pre-defined regions, 3: DMCs), assign 1 for DMR analysis
- `threads`: Always use 1 threads to avoid error
- `output_results_path`: Output path for the DMR results
### Step 4: Run metilene (DMC mode)
Call:
- `mcp__methyl-tools__run_metilene`
with:
- `merged_bed_path`: file path for metilene input
- `group_a_name`: name of group A (e.g. `"case"`)
- `group_b_name`: name of group B (e.g. `"control"`)
- `mode`: Mode for metilene CLI (e.g. 1: de-novo, 2: pre-defined regions, 3: DMCs), assign 3 for DMR analysis
- `output_results_path`: Output path for the DMC results
### Step 5: Filter significant DMRs and export BED
Call:
- `mcp__methyl-tools__filter_dmrs`
with:
- `metilene_results_path`: DMR results from Step 3
- `significant_tsv_path`: Output path for the DMR results (e.g. significant_dmrs.tsv)
- `significant_bed_path`: Output path for the DMR results (e.g. significant_dmrs.bed)
- `q_threshold`, `delta_threshold` as agreed.
### Step 6: Filter significant DMCs and export BED
Call:
- `mcp__methyl-tools__filter_dmrs`
with:
- `metilene_results_path`: DMC results from Step 4
- `significant_tsv_path`: Output path for the DMC results (e.g. significant_dmcs.tsv)
- `significant_bed_path`: Output path for the DMC results (e.g. significant_dmcs.bed)
- `q_threshold`, `delta_threshold` as agreed.
### Step 6: Visualization (quick, optional)
**Volcano-like plot (Δmethylation vs –log10(q))**
1. Call:
- `mcp__methyl-tools__plot_dmr_volcano`
with:
- `metilene_results_path`: DMR results from Step 3
- `output_pdf_path`
- `q_threshold`, `delta_threshold` as agreed.
- Optional tuning of `point_size`, `alpha` as needed.
**DMR length histogram**
Call:
- `mcp__methyl-tools__plot_dmr_length_hist`
with:
- `significant_bed_path`: Path for the signimicant DMRs (BED format from Step 5)
- `output_pdf_path`
---
## Troubleshooting
- **Chromosome naming mismatches**: standardize to a single scheme (`chr1` vs `1`) across all samples.Related Skills
TF-differential-binding
The TF-differential-binding pipeline performs differential transcription factor (TF) binding analysis from ChIP-seq datasets (TF peaks) using the DiffBind package in R. It identifies genomic regions where TF binding intensity significantly differs between experimental conditions (e.g., treatment vs. control, mutant vs. wild-type). Use the TF-differential-binding pipeline when you need to analyze the different function of the same TF across two or more biological conditions, cell types, or treatments using ChIP-seq data or TF binding peaks. This pipeline is ideal for studying regulatory mechanisms that underlie transcriptional differences or epigenetic responses to perturbations.
differential-region-analysis
The differential-region-analysis pipeline identifies genomic regions exhibiting significant differences in signal intensity between experimental conditions using a count-based framework and DESeq2. It supports detection of both differentially accessible regions (DARs) from open-chromatin assays (e.g., ATAC-seq, DNase-seq) and differential transcription factor (TF) binding regions from TF-centric assays (e.g., ChIP-seq, CUT&RUN, CUT&Tag). The pipeline can start from aligned BAM files or a precomputed count matrix and is suitable whenever genomic signal can be summarized as read counts per region.
correlation-methylation-epiFeatures
This skill provides a complete pipeline for integrating CpG methylation data with chromatin features such as ATAC-seq signal, H3K27ac, H3K4me3, or other histone marks/TF signals.
methylation-variability-analysis
This skill provides a complete and streamlined workflow for performing methylation variability and epigenetic heterogeneity analysis from whole-genome bisulfite sequencing (WGBS) data. It is designed for researchers who want to quantify CpG-level variability across biological samples or conditions, identify highly variable CpGs (HVCs), and explore epigenetic heterogeneity.
global-methylation-profile
This skill performs genome-wide DNA methylation profiling. It supports single-sample and multi-sample workflows to compute methylation density distributions, genomic feature distribution of the methylation profile, and sample-level clustering/PCA. Use it when you want to systematically characterize global methylation patterns from WGBS or similar per-CpG methylation call files.
local-methylation-profile
This skill analyzes the local DNA methylation profiles around target genomic regions provide by user. Use this skill when you want to vasulize the average methylation profile around target regions (e.g. TSS, CTCF peak or other target regions).
differential-tad-analysis
This skill performs differential topologically associating domain (TAD) analysis using HiCExplorer's hicDifferentialTAD tool. It compares Hi-C contact matrices between two conditions based on existing TAD definitions to identify significantly altered chromatin domains.
modal-deployment
Run Python code in the cloud with serverless containers, GPUs, and autoscaling using Modal. This skill enables agents to generate code for deploying ML models, running batch jobs, serving APIs, and scaling compute-intensive workloads.
vly-money
Generate crypto payment links for supported tokens and networks, manage access to X402 payment-protected content, and provide direct access to the vly.money wallet interface.
ontopo
An AI agent skill to search for Israeli restaurants, check table availability, view menus, and retrieve booking links via the Ontopo platform, acting as an unofficial interface to its data.
astro
This skill provides essential Astro framework patterns, focusing on server-side rendering (SSR), static site generation (SSG), middleware, and TypeScript best practices. It helps AI agents implement secure authentication, manage API routes, and debug rendering behaviors within Astro projects.
chrome-debug
This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.