/pipeline-wgbs
Execute ENCODE Whole Genome Bisulfite Sequencing (WGBS) pipeline from FASTQ to methylation calls. Child of pipeline-guide. Provides Nextflow execution with Docker and cloud deployment. Use when processing WGBS/bisulfite-seq data, calling methylation levels, generating bedMethyl
$ npx -y skills add ammawla/encode-toolkit --skill pipeline-wgbs --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/pipeline-wgbs
Context preview
The summary Claude sees to decide when to auto-load this skill.
Execute ENCODE Whole Genome Bisulfite Sequencing (WGBS) pipeline from FASTQ to methylation calls. Child of pipeline-guide. Provides Nextflow execution with Docker and cloud deployment. Use when processing WGBS/bisulfite-seq data, calling methylation levels, generating bedMethyl
SKILL.md
pipeline-wgbs.SKILL.mdname: pipeline-wgbs
description: "Execute ENCODE Whole Genome Bisulfite Sequencing (WGBS) pipeline from FASTQ to methylation calls. Child of pipeline-guide. Provides Nextflow execution with Docker and cloud deployment. Use when processing WGBS/bisulfite-seq data, calling methylation levels, generating bedMethyl files. Trigger on: WGBS pipeline, bisulfite sequencing, methylation calling, DNA methylation pipeline, bismark, bwa-meth, bedMethyl."
ENCODE WGBS Pipeline: FASTQ to Methylation Calls
When to Use
- User wants to run a WGBS/bisulfite sequencing pipeline from FASTQ to methylation calls
- User asks about "WGBS pipeline", "bisulfite sequencing", "methylation calling", "Bismark", or "bedMethyl"
- User needs to process whole-genome bisulfite sequencing data following ENCODE standards
- Example queries: "process my WGBS FASTQs", "call methylation levels from bisulfite-seq", "run Bismark on my WGBS data"
Execute the ENCODE DNA methylation pipeline for Whole Genome Bisulfite Sequencing data, producing per-CpG methylation levels in bedMethyl format.
Pipeline Overview
FASTQ -> Trim adapters -> Bismark align -> Deduplicate -> MethylDackel extract -> bedMethyl
| | | | | |
QC Trim Galore Bismark/bwa-meth Picard Per-CpG calls Final output
ENCODE Repository
- **GitHub**: `ENCODE-DCC/dna-me-pipeline`
- **Container**: `encodedcc/dna-me-pipeline`
- **WDL**: Available for Cromwell execution
- **This skill**: Nextflow DSL2 reimplementation for portability
Core Tools and Versions
| Tool | Version | Purpose | Citation | |------|---------|---------|----------| | Trim Galore | 0.6.10 | Adapter + quality trimming (bisulfite-aware) | Krueger (Babraham) | | Bismark | 0.24.2 | Bisulfite-aware alignment + methylation | Krueger & Andrews 2011 | | bwa-meth | 0.2.7 | Alternative bisulfite aligner (faster) | Pedersen 2014 | | MethylDackel | 0.6.1 | Methylation extraction from BAM | Ryan (GitHub) | | Picard | 3.1.1 | Duplicate marking | Broad Institute | | samtools | 1.19 | BAM operations | Li et al. 2009 | | FastQC | 0.12.1 | Read quality assessment | Andrews (Babraham) | | MultiQC | 1.21 | Aggregated QC reporting | Ewels et al. 2016 |
Key Literature
1. **Krueger & Andrews 2011** - "Bismark: a flexible aligner and methylation caller for Bisulfite-Seq applications" (Bioinformatics, ~4,000 citations) DOI: 10.1093/bioinformatics/btr167
2. **Lister et al. 2009** - "Human DNA methylomes at base resolution show widespread epigenomic differences" (Nature, ~5,000 citations) DOI: 10.1038/nature08514
3. **Schultz et al. 2015** - "Human body epigenome maps reveal noncanonical DNA methylation variation" (Nature, ~1,500 citations) DOI: 10.1038/nature14248
4. **Pedersen et al. 2014** - "Fast and accurate alignment of long bisulfite-seq reads" arXiv:1401.1129 (bwa-meth)
5. **Amemiya et al. 2019** - "The ENCODE Blacklist" (Scientific Reports, ~1,372 citations) DOI: 10.1038/s41598-019-45839-z
Execution
Quick Start (Local)
nextflow run main.nf \
-profile local \
--reads '/data/fastq/*_R{1,2}.fastq.gz' \
--genome_dir '/ref/bismark_index' \
--outdir results/ \
-resumeSLURM HPC
nextflow run main.nf \
-profile slurm \
--reads '/data/fastq/*_R{1,2}.fastq.gz' \
--genome_dir '/ref/bismark_index' \
--outdir results/ \
-resumeCloud (GCP / AWS)
nextflow run main.nf \
-profile gcp \
--reads 'gs://bucket/fastq/*_R{1,2}.fastq.gz' \
--genome_dir 'gs://bucket/ref/bismark_index' \
--outdir 'gs://bucket/results/' \
-resumeResource Requirements
| Step | CPUs | RAM | Time (30x human) | |------|------|-----|-------------------| | Trim Galore | 4 | 4 GB | 1-2 hours | | Bismark align | 8 | 48 GB | 8-16 hours | | Deduplication | 2 | 16 GB | 1-2 hours | | MethylDackel | 4 | 8 GB | 1-2 hours | | **Total** | **8** | **48 GB** | **12-24 hours** |
Pipeline Parameters
| Parameter | Default | Description | |-----------|---------|-------------| | `--reads` | required | Glob pattern to paired FASTQ files | | `--genome_dir` | required | Path to Bismark genome index directory | | `--outdir` | `./results` | Output directory | | `--aligner` | `bismark` | Aligner: `bismark` or `bwameth` | | `--min_coverage` | `5` | Minimum coverage for CpG reporting | | `--no_overlap` | `true` | Remove overlapping PE reads (avoid double-counting) | | `--lambda_genome` | `null` | Lambda genome index for conversion rate QC | | `--skip_dedup` | `false` | Skip deduplication (for RRBS data) |
Output Files
results/
fastqc/ # Raw read quality
trim_galore/ # Trimmed reads + reports
bismark/
alignments/ # Sorted, deduplicated BAMs
dedup_reports/ # Duplication metrics
methylation/ # bedMethyl files (primary output)
{sample}.CpG.bedMethyl.gz
{sample}.CHG.bedMethyl.gz # Non-CpG contexts
{sample}.CHH.bedMethyl.gz
conversion_rate/ # Lambda/pUC19 conversion QC
coverage/
{sample}.coverage_stats.txt
multiqc/
multiqc_report.htmlbedMethyl Format
The primary output is per-CpG methylation in bedMethyl format:
chr1 10468 10470 . 1000 + 10468 10470 0,0,0 12 83.3
Columns: chr, start, end, name, score, strand, thickStart, thickEnd, color, coverage, methylation_percentage
QC Thresholds (ENCODE Standards)
| Metric | Pass | Warning | Fail | |--------|------|---------|------| | Bisulfite conversion rate | ≥98% | 95-98% | <95% | | CpG coverage (genome-wide) | >10x | 5-10x | <5x | | Mapping rate | >70% | 50-70% | <50% | | Duplication rate | <30% | 30-50% | >50% | | CpG sites covered (>=5x) | >80% | 60-80% | <60% | | Lambda spike-in conversion | ≥98% | 95-98% | <95% |
Critical Pitfalls
RRBS vs WGBS
RRBS (Reduced Representation) uses MspI
Read more
name: pipeline-wgbs description: "Execute ENCODE Whole Genome Bisulfite Sequencing (WGBS) pipeline from FASTQ to methylation calls. Child of pipeline-guide. Provides Nextflow execution with Docker and cloud deployment. Use when processing WGBS/bisulfite-seq data, calling methylation levels, generating bedMethyl files. Trigger on: WGBS pipeline, bisulfite sequencing, methylation calling, DNA methylation pipeline, bismark, bwa-meth, bedMethyl."
ENCODE WGBS Pipeline: FASTQ to Methylation Calls
When to Use
- User wants to run a WGBS/bisulfite sequencing pipeline from FASTQ to methylation calls
- User asks about "WGBS pipeline", "bisulfite sequencing", "methylation calling", "Bismark", or "bedMethyl"
- User needs to process whole-genome bisulfite sequencing data following ENCODE standards
- Example queries: "process my WGBS FASTQs", "call methylation levels from bisulfite-seq", "run Bismark on my WGBS data"
Execute the ENCODE DNA methylation pipeline for Whole Genome Bisulfite Sequencing data, producing per-CpG methylation levels in bedMethyl format.
Pipeline Overview
FASTQ -> Trim adapters -> Bismark align -> Deduplicate -> MethylDackel extract -> bedMethyl | | | | | | QC Trim Galore Bismark/bwa-meth Picard Per-CpG calls Final output
ENCODE Repository
- **GitHub**: `ENCODE-DCC/dna-me-pipeline`
- **Container**: `encodedcc/dna-me-pipeline`
- **WDL**: Available for Cromwell execution
- **This skill**: Nextflow DSL2 reimplementation for portability
Core Tools and Versions
| Tool | Version | Purpose | Citation | |------|---------|---------|----------| | Trim Galore | 0.6.10 | Adapter + quality trimming (bisulfite-aware) | Krueger (Babraham) | | Bismark | 0.24.2 | Bisulfite-aware alignment + methylation | Krueger & Andrews 2011 | | bwa-meth | 0.2.7 | Alternative bisulfite aligner (faster) | Pedersen 2014 | | MethylDackel | 0.6.1 | Methylation extraction from BAM | Ryan (GitHub) | | Picard | 3.1.1 | Duplicate marking | Broad Institute | | samtools | 1.19 | BAM operations | Li et al. 2009 | | FastQC | 0.12.1 | Read quality assessment | Andrews (Babraham) | | MultiQC | 1.21 | Aggregated QC reporting | Ewels et al. 2016 |
Key Literature
1. **Krueger & Andrews 2011** - "Bismark: a flexible aligner and methylation caller for Bisulfite-Seq applications" (Bioinformatics, ~4,000 citations) DOI: 10.1093/bioinformatics/btr167
2. **Lister et al. 2009** - "Human DNA methylomes at base resolution show widespread epigenomic differences" (Nature, ~5,000 citations) DOI: 10.1038/nature08514
3. **Schultz et al. 2015** - "Human body epigenome maps reveal noncanonical DNA methylation variation" (Nature, ~1,500 citations) DOI: 10.1038/nature14248
4. **Pedersen et al. 2014** - "Fast and accurate alignment of long bisulfite-seq reads" arXiv:1401.1129 (bwa-meth)
5. **Amemiya et al. 2019** - "The ENCODE Blacklist" (Scientific Reports, ~1,372 citations) DOI: 10.1038/s41598-019-45839-z
Execution
Quick Start (Local)
nextflow run main.nf \
-profile local \
--reads '/data/fastq/*_R{1,2}.fastq.gz' \
--genome_dir '/ref/bismark_index' \
--outdir results/ \
-resumeSLURM HPC
nextflow run main.nf \
-profile slurm \
--reads '/data/fastq/*_R{1,2}.fastq.gz' \
--genome_dir '/ref/bismark_index' \
--outdir results/ \
-resumeCloud (GCP / AWS)
nextflow run main.nf \
-profile gcp \
--reads 'gs://bucket/fastq/*_R{1,2}.fastq.gz' \
--genome_dir 'gs://bucket/ref/bismark_index' \
--outdir 'gs://bucket/results/' \
-resumeResource Requirements
| Step | CPUs | RAM | Time (30x human) | |------|------|-----|-------------------| | Trim Galore | 4 | 4 GB | 1-2 hours | | Bismark align | 8 | 48 GB | 8-16 hours | | Deduplication | 2 | 16 GB | 1-2 hours | | MethylDackel | 4 | 8 GB | 1-2 hours | | **Total** | **8** | **48 GB** | **12-24 hours** |
Pipeline Parameters
| Parameter | Default | Description | |-----------|---------|-------------| | `--reads` | required | Glob pattern to paired FASTQ files | | `--genome_dir` | required | Path to Bismark genome index directory | | `--outdir` | `./results` | Output directory | | `--aligner` | `bismark` | Aligner: `bismark` or `bwameth` | | `--min_coverage` | `5` | Minimum coverage for CpG reporting | | `--no_overlap` | `true` | Remove overlapping PE reads (avoid double-counting) | | `--lambda_genome` | `null` | Lambda genome index for conversion rate QC | | `--skip_dedup` | `false` | Skip deduplication (for RRBS data) |
Output Files
results/
fastqc/ # Raw read quality
trim_galore/ # Trimmed reads + reports
bismark/
alignments/ # Sorted, deduplicated BAMs
dedup_reports/ # Duplication metrics
methylation/ # bedMethyl files (primary output)
{sample}.CpG.bedMethyl.gz
{sample}.CHG.bedMethyl.gz # Non-CpG contexts
{sample}.CHH.bedMethyl.gz
conversion_rate/ # Lambda/pUC19 conversion QC
coverage/
{sample}.coverage_stats.txt
multiqc/
multiqc_report.htmlbedMethyl Format
The primary output is per-CpG methylation in bedMethyl format:
chr1 10468 10470 . 1000 + 10468 10470 0,0,0 12 83.3
Columns: chr, start, end, name, score, strand, thickStart, thickEnd, color, coverage, methylation_percentage
QC Thresholds (ENCODE Standards)
| Metric | Pass | Warning | Fail | |--------|------|---------|------| | Bisulfite conversion rate | ≥98% | 95-98% | <95% | | CpG coverage (genome-wide) | >10x | 5-10x | <5x | | Mapping rate | >70% | 50-70% | <50% | | Duplication rate | <30% | 30-50% | >50% | | CpG sites covered (>=5x) | >80% | 60-80% | <60% | | Lambda spike-in conversion | ≥98% | 95-98% | <95% |
Critical Pitfalls
RRBS vs WGBS
RRBS (Reduced Representation) uses MspI
Showing the first part of this file.
Search ENCODE, cross-reference 14 databases, run 7 analysis pipelines, and generate publication-ready methods — all from natural language in Claude Code.
Repo: ammawla/encode-toolkit
Other skills on encode-toolkit.
- /accessibility-aggregation
Build comprehensive chromatin accessibility maps by aggregating ATAC-seq and DNase-seq narrowPeak data across multiple ENCODE experiments, donors, and labs. Use when the user wants to answer "where is chromatin accessible in my tissue?" by combining peak calls into a union peak
Open skill - /batch-analysis
Guide for multi-experiment batch operations: QC screening, batch download, comparison, and report generation across many ENCODE experiments simultaneously. Use when users need to process 5+ experiments together, create experiment comparison tables, perform batch quality checks,
Open skill - /bioinformatics-installer
Install bioinformatics tools for ENCODE data analysis. Covers CLI tools (BWA, STAR, samtools, MACS2), R/Bioconductor packages (DESeq2, Seurat, ChIPseeker), Python packages (Scanpy, deeptools), and Nextflow pipeline infrastructure. Generates conda environments, R install scripts,
Open skill - /cellxgene-context
Guide for integrating CellxGene Census single-cell data with ENCODE bulk experiments. Use when users need cell-type-specific expression context for ENCODE regulatory data, want to deconvolve bulk ENCODE signals, or validate regulatory elements at single-cell resolution. Trigger
Open skill - /cite-encode
Generate proper ENCODE citations for publications, grants, and presentations. Use when the user needs to cite ENCODE data, create bibliography entries, write acknowledgment sections, or ensure compliance with ENCODE data use policy.
Open skill - /clinvar-annotation
Guide for annotating ENCODE regulatory variants with ClinVar clinical significance. Use when users need to check if variants in ENCODE peaks have clinical associations, find pathogenic variants in regulatory regions, or assess variant clinical impact. Trigger on: ClinVar,
Open skill

