← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-methylation-analysis-dmr-detection / references / usage-guide.md

DMR Detection - Usage Guide

Overview

Differentially methylated region (DMR) detection aggregates per-CpG methylation into contiguous regions that differ between conditions. The decision-grade framing: a DMR is DEFINED by a chain of arbitrary thresholds (min-CpGs, max-gap, delta-beta, q) plus a smoothing bandwidth, and the region p-value is only honest if its null was generated by re-running that selection under permuted labels. dmrseq is the headline caller built to do this; DSS, methylKit tiles, bsseq BSmooth, DMRcate, metilene, and comb-p combine-and-correct but do not re-select, so region q-values are not comparable across tools and cross-tool overlap is the real evidence. A separate single-sample domain-segmentation step (PMDs/UMRs/LMRs via MethylSeekR) must run before focal calling on cancer, aging, placenta, or cultured-cell genomes.

Prerequisites

if (!require('BiocManager', quietly = TRUE))
    install.packages('BiocManager')

BiocManager::install(c('dmrseq', 'DSS', 'methylKit', 'bsseq', 'DMRcate',
                       'annotatr', 'missMethyl', 'MethylSeekR', 'GenomicRanges'))
# metilene (C CLI) and comb-p (Python) are separate second callers:
conda install -c bioconda metilene combined-pvalues

Conceptual prerequisites and notes: - Input is a per-CpG methylation+coverage table: Bismark .cov/cytosine reports for sequencing callers, a beta/M matrix for DMRcate array mode, or long-read modkit bedMethyl counts piped from long-read-sequencing/nanopore-methylation. - Annotation packages (annotatr, TxDb) are large and genome-build-specific; the build must match the alignment genome. - dmrseq and the sequencing callers need count data, not betas; arrays use DMRcate or comb-p. - Run per-CpG quality checks and the methylKit object-model import (methylkit-analysis) before region calling.

Quick Start

Tell your AI agent what you want to do: - "Find DMRs between treatment and control in my WGBS data with a selection-aware region FDR" - "Call DMRs with dmrseq and corroborate with DSS, then report the overlap" - "Detect DMRs from my EPIC array beta matrix with DMRcate" - "Check whether my cancer hypomethylation DMRs are just PMD background"

Example Prompts

Selection-aware region inference

"I have WGBS coverage files for 3 controls and 3 treated samples. Call DMRs with dmrseq using a region-level FDR that accounts for region selection, and explain why I should not run BSmooth first."

Method choice and corroboration

"Which DMR caller should I use for low-coverage WGBS with only 2 replicates per group, and how do I cross-check the result with a second tool?"

Array DMRs

"Detect DMRs from my EPIC array M-value matrix with DMRcate array mode, and tell me why the WGBS kernel settings would be wrong here."

Domain structure first

"My samples are tumor-vs-normal WGBS and I got thousands of hypomethylation DMRs. Segment PMDs first with MethylSeekR and report what fraction of my hypo-DMRs are PMD background."

Interpretation

"Annotate my DMRs to genes and CpG islands, then run enrichment with a method that corrects for CpG-density bias."

What the Agent Will Do

  1. Identify the assay (WGBS/RRBS/array/long-read), replicate count, and coverage to pick a caller from the decision tree.
  2. For cancer/aging/placenta/cultured samples, segment single-sample domains (PMDs/UMRs/LMRs) before focal calling and screen for PMD-background DMRs.
  3. Build the appropriate input object (BSseq counts, methylKit object, or beta/M matrix) without pre-smoothing where the caller smooths internally.
  4. Run the headline caller (dmrseq) with documented thresholds and a selection-aware region FDR.
  5. Corroborate with a second caller and report cross-tool overlap rather than a single tool's count.
  6. Annotate DMRs to features, flag multiple-genes-per-DMR ambiguity, and hand CpG-bias-aware enrichment to pathway-analysis/go-enrichment.

Tips