Skip to content
Data
Skill

/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

From plugin
encode-toolkit
2047 skills7 agents10 commands1 MCP

Claude Code

$ npx -y skills add ammawla/encode-toolkit --skill pipeline-wgbs --agent claude-code

SKILL.md

pipeline-wgbs.SKILL.md
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 -> sort + index -> MethylDackel -> bedMethyl
  |           |                 |               |                |             |             |
 FastQC   Trim Galore    Bismark (Bowtie2)  deduplicate_   samtools      mbias +       coverage
                                             bismark                     extract        stats

Paired-end only: `TRIM_GALORE` and `BISMARK_ALIGN` both take two mates, and `--reads` must match pairs.

ENCODE Repository

  • **GitHub**: `ENCODE-DCC/dna-me-pipeline`
  • **Container**: built from `scripts/Dockerfile` in this skill (`docker build -t encode-toolkit/pipeline-wgbs:1.0.0 scripts/`); override with `--container`
  • **WDL**: Available for Cromwell execution
  • **This skill**: Nextflow DSL2 reimplementation for portability

Core Tools and Versions

These are the versions in `scripts/Dockerfile`, which is what the workflow runs.

| Tool | Version | Purpose | Citation | |------|---------|---------|----------| | Trim Galore | 0.6.10 | Adapter + quality trimming (bisulfite-aware) | Krueger (Babraham) | | Bismark | 0.24.2 | Bisulfite-aware alignment + deduplication | Krueger & Andrews 2011 | | Bowtie2 | 2.5.4 | Backend aligner used by Bismark | Langmead & Salzberg 2012 | | MethylDackel | 0.6.1 | Methylation extraction from BAM | Ryan (GitHub) | | samtools | 1.19 | BAM sorting and indexing | Li et al. 2009 | | htslib | 1.19 | `bgzip` and `tabix` for the bedMethyl files | Bonfield et al. 2021 | | FastQC | 0.12.1 | Read quality assessment | Andrews (Babraham) | | MultiQC | 1.21 | Aggregated QC reporting | Ewels et al. 2016 |

The conda environment in `bioinformatics-installer` (`environments/wgbs-env.yml`) is a separate manual route pinned to the same versions of these tools; it also carries bedtools, which is not in the image.

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

`--reads` and `--genome_dir` are both required; the workflow stops before the first task if either is missing. `--genome_dir` is a Bismark genome folder — the output of `bismark_genome_preparation`, which must still contain the genome `.fa`, because MethylDackel reads it from there.

Quick Start (local, Docker)

nextflow run scripts/main.nf -profile local \
    --reads '/data/fastq/*_R{1,2}.fastq.gz' \
    --genome_dir /ref/bismark_index \
    --min_coverage 5 \
    --outdir results/ \
    -resume

SLURM HPC

nextflow run scripts/main.nf -profile slurm \
    --container /path/to/pipeline-wgbs.sif \
    --slurm_queue normal \
    --reads '/data/fastq/*_R{1,2}.fastq.gz' \
    --genome_dir /ref/bismark_index \
    --outdir results/ \
    -resume

Cloud

# Google Cloud Batch
nextflow run scripts/main.nf -profile gcp \
    --container us-docker.pkg.dev/<project>/<repo>/pipeline-wgbs:1.0.0 \
    --gcp_project <project> \
    --gcp_workdir gs://<bucket>/work \
    --reads 'gs://<bucket>/fastq/*_R{1,2}.fastq.gz' \
    --genome_dir gs://<bucket>/ref/bismark_index \
    --outdir gs://<bucket>/results

# AWS Batch
nextflow run scripts/main.nf -profile aws \
    --container <account>.dkr.ecr.<region>.amazonaws.com/pipeline-wgbs:1.0.0 \
    --aws_queue <job-queue> \
    --aws_workdir s3://<bucket>/work \
    --reads 's3://<bucket>/fastq/*_R{1,2}.fastq.gz' \
    --genome_dir s3://<bucket>/ref/bismark_index \
    --outdir s3://<bucket>/results

`--outdir` only sets where results are published; Google Batch and AWS Batch stage every task through the work directory, and the workflow stops with an error if it or the project/queue is missing.

Resource Requirements

| Step | CPUs | RAM | Time (30x human) | |------|------|-----|-------------------| | FastQC | 2 | 4 GB | <1 hour | | Trim Galore | 4 | 4 GB | 1-2 hours | | Bismark align | 8 | 48 GB | 8-16 hours | | Deduplication | 2 | 16 GB | 1-2 hours | | Sort + index | 4 | 8 GB | 1-2 hours | | MethylDackel (mbias, extract) | 2, 4 | 8 GB | 1-2 hours | | **Total** | **8** | **48 GB** | **12-24 hours** |

Every process asks for `memory { N.GB * task.attempt }`, so a task killed for running out of memory is retried with more: the

Read more
@ammawla
Ships withencode-toolkit

Search ENCODE, cross-reference 14 databases, run 7 analysis pipelines, and generate publication-ready methods — all from natural language in Claude Code.

2047 skills7 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
20
Star history of ammawla/encode-toolkit on GitHub, a chart by star-history.com

Other skills on encode-toolkit.

batch-analysis

batch-analysis

Guide for multi-experiment batch operations: QC screening, batch download, comparison, and report generation across many ENCODE…

cellxgene-context

cellxgene-context

Guide for integrating CellxGene Census single-cell data with ENCODE bulk experiments. Use when users need cell-type-specific…

cite-encode

cite-encode

Generate proper ENCODE citations for publications, grants, and presentations. Use when the user needs to cite ENCODE data, create…

clinvar-annotation

clinvar-annotation

Guide for annotating ENCODE regulatory variants with ClinVar clinical significance. Use when users need to check if variants in…

More skills from other plugins.

context-loader
Auto-invoked

context-loader

Search memories from earlier Pi sessions in this repository. Use it when earlier work may already explain the code, error,…

mem05d69k
@mem0ai@mem0aiInstall Skill
analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and an…

posthog12d41k
@posthog@posthogInstall Skill

Questions about pipeline-wgbs.

Which coding agents can use pipeline-wgbs?
pipeline-wgbs installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.