long-read-sequencing-nanopore-methylation

$npx mdskill add swaruplab/operon/long-read-sequencing-nanopore-methylation

Calls DNA methylation from Oxford Nanopore sequencing data using signal-level analysis.

  • Detects 5mC or 6mA modifications directly from nanopore reads without bisulfite conversion.
  • Depends on modkit, samtools, minimap2, and basecalled BAM files with MM/ML tags.
  • Uses modkit pileup to extract per-site methylation frequencies from aligned reads.
  • Outputs methylation frequencies in bedMethyl format for downstream analysis.

SKILL.md

.github/skills/long-read-sequencing-nanopore-methylationView on GitHub ↗
---
name: long-read-sequencing-nanopore-methylation
description: Calls DNA methylation from Oxford Nanopore sequencing data using signal-level analysis. Use when detecting 5mC or 6mA modifications directly from nanopore reads without bisulfite conversion.
tool_type: cli
primary_tool: modkit
---

## Version Compatibility

Reference examples tested with: methylKit 1.28+, minimap2 2.26+, samtools 1.19+

Before using code patterns, verify installed versions match. If versions differ:
- CLI: `<tool> --version` then `<tool> --help` to confirm flags

If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.

# Nanopore Methylation Calling

**"Call methylation from my Nanopore reads"** -> Extract 5mC/6mA modification probabilities from basecalled reads and summarize per-site methylation frequencies.
- CLI: `modkit pileup aligned.bam methylation.bed --ref ref.fa`

## Modern Workflow (modkit)

ONT's modkit is the recommended tool for methylation analysis from basecalled data.

### Extract Methylation from BAM

```bash
# Assumes BAM has MM/ML tags from dorado basecalling
modkit pileup input.bam methylation.bed \
    --ref reference.fa \
    --cpg \
    --combine-strands
```

### Output Format

```
# bedMethyl format
chr1  1000  1001  .  10  +  1000  1001  0,0,0  10  80.5
# Columns: chrom, start, end, name, score, strand, thickStart, thickEnd,
#          itemRgb, coverage, percent_modified
```

## Basecalling with Methylation

```bash
# Dorado basecalling with 5mC model
dorado basecaller [email protected] \
    pod5_dir/ \
    --modified-bases 5mCG \
    > calls.bam

# Index and align
samtools fastq calls.bam | \
    minimap2 -ax map-ont -y reference.fa - | \
    samtools sort -o aligned.bam
samtools index aligned.bam
```

## Region-Specific Analysis

```bash
# CpG islands only
modkit pileup aligned.bam cpg_islands.bed \
    --ref reference.fa \
    --cpg \
    --include-bed cpg_islands.bed

# Promoter regions
modkit pileup aligned.bam promoters.bed \
    --ref reference.fa \
    --cpg \
    --include-bed promoters.bed
```

## Sample Summary

```bash
# Get modification summary statistics
modkit summary aligned.bam

# Output includes:
# - Total reads with modifications
# - Modification types detected
# - Fraction modified per type
```

## Differential Methylation

```bash
# Create BED files for each sample
modkit pileup sample1.bam sample1.bed --ref ref.fa --cpg
modkit pileup sample2.bam sample2.bed --ref ref.fa --cpg

# Compare with methylKit or DSS in R
```

## Quality Considerations

- Minimum coverage: 10x for reliable calls
- Modified base probability threshold: 0.5 default, adjust as needed
- Combine strands for CpG (symmetric methylation)

## Related Skills

- long-read-sequencing/basecalling - Dorado basecalling
- methylation-analysis/methylation-calling - General methylation concepts
- methylation-analysis/dmr-detection - Differential methylation

More from swaruplab/operon

SkillDescription
agentd-drug-discoveryUse the AgentD workflow to mine evidence, design molecules, and rank candidates with SAR plus ADMET annotations for early drug discovery tasks.
alphafold-databaseAccess AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.
antibody-design-agentAn advanced agent for de novo antibody design and optimization using state-of-the-art protein language models (MAGE, RFdiffusion).
archrSingle-cell ATAC-seq analysis with ArchR (R). The mature R-based scATAC pipeline — Arrow files, doublet inference, iterative LSI + Harmony, clustering, gene scores, MACS2 peak calling, motif enrichment, chromVAR deviations, footprinting, scRNA-seq integration (label transfer), trajectory analysis (built-in + Monocle3 + Slingshot), and ArchR's interactive genome browser. Sister protocol to snapatac2 — pick this for established R workflows.
automated-bioinformatics-pipelinesPipeline maestro
autonomous-biomedical-agentAutonomous biomedical AI agent framework for executing complex research tasks across genomics, drug discovery, molecular biology, and clinical analysis. Use this skill when conducting multi-step biomedical research including CRISPR screening design, single-cell RNA-seq analysis, ADMET prediction, GWAS interpretation, rare disease diagnosis, or lab protocol optimization. Leverages LLM reasoning with code execution and integrated biomedical databases.
autonomous-oncology-agentPrecision Oncology
basecallingConvert raw Nanopore signal data (FAST5/POD5) to nucleotide sequences using Dorado basecaller. Covers model selection, GPU acceleration, modified base detection, and quality filtering. Use when processing raw Nanopore data before alignment. Note: Guppy is deprecated; use Dorado for all new analyses.
batch-processingProcess multiple sequence files in batch using Biopython. Use when working with many files, merging/splitting sequences, or automating file operations across directories.
bindingdb-databaseQuery BindingDB for measured drug-target binding affinities (Ki, Kd, IC50, EC50). Search by target (UniProt ID), compound (SMILES/name), or pathogen. Essential for drug discovery, lead optimization, polypharmacology analysis, and structure-activity relationship (SAR) studies.