Skip to content
Epigenomicslatest-release

methylseq

nf-core/methylseq

Methylation (Bisulfite-Sequencing) Best Practice analysis pipeline, part of the nf-core community.

version4.2.05aa56467a8Dec 12, 2025 Upstream Usage docs

Key tools

FastQCMultiQCTrim Galore!BismarkBWA-MEMbwa-methPicardQualimapPreseqrastairSamtoolsBedtools

Run it

nfclaw
nfclaw run methylseq --input samplesheet.csv --outdir results -profile docker
raw nextflow
nextflow run pipelines/methylseq/upstream -profile docker --input samplesheet.csv --outdir results
demo · bundled test profile
nfclaw run methylseq --demo --outdir results # adds the upstream test profile (-profile test,docker)

Inputs

columntyperequiredallowed valuesconstraints
samplestringyesmatches ^\S+$
fastq_1string (file path)yesmatches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$
fastq_2string (file path)nomatches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$
genomestring (file path)nomatches ^[a-zA-Z0-9._-]+$

--input must match ^\S+\.csv$.

The samplesheet is a CSV with this header (the columns the schema requires); fill each value per the table above and reference.md (no example value is invented here):

csv
sample,fastq_1

Any of the optional columns above may be appended to the header when your data needs them: fastq_2, genome.

From data files. --input may also be the data files — a directory (searched recursively), a quoted glob, or files (--input once per file) — from which nfclaw writes this samplesheet: sample from file names; fastq_1/fastq_2 from FastQ files (mates paired by _R1/_R2, or by _1/_2 when their read names show they are mates). Set other columns with --sheet-set COLUMN=VALUE. Preview it with --check; a run records it in <outdir>/provenance/ for replay.

Reference genome

No reference genome is set by default: supply your own reference. The schema declares AWS iGenomes at s3://ngi-igenomes/igenomes/; selecting --genome <id> uses the paths in the pipeline's reference configuration. Access to that remote source is required. To supply your own reference, use e.g. --fasta; the reference_genome_options group in reference.md lists every reference option. Set --igenomes-ignore true to disable the lookup entirely. Confirm the selected reference's paths and source in the pinned upstream/nextflow.config and upstream/conf/ before running.

Resources

Resource requests follow the pipeline's configs and selected profiles. nf-core's resource labels often assume a server — a single step can request far more memory than a workstation has, and retry rules can increase requests. If a run fails with Process requirement exceeds available memory (or CPUs), cap every request, and every retry, at what this machine actually has:

bash
nfclaw run methylseq --input samplesheet.csv --outdir results -profile docker \
--limit-cpus 4 --limit-memory 15.GB

nfclaw turns those into Nextflow's process.resourceLimits and passes them as a -c config — the mechanism nf-core prescribes for exactly this (docs). Set them to the machine's real capacity. --limit-time DURATION also caps how long any one task may run: a task that needs longer is stopped, and so is every retry, so set it only as a deliberate ceiling, never as a guess at how long the analysis takes. The generated config is kept in <outdir>/provenance/, so commands.sh replays the run under the same ceiling.

Nextflow engine

This release declares nextflowVersion = '!>=25.04.0'.

To pin this release's declared minimum engine — useful when a newer Nextflow has incompatible config parsing:

bash
nfclaw run methylseq ... --nxf-ver 25.04.0

--nxf-ver is recorded in <outdir>/provenance/, so the replay uses the same engine. See known-issues.

Demo

bash
nfclaw run methylseq --demo --outdir results # adds the upstream test profile (-profile test,docker)
<!-- Generated from nf-core/methylseq@5aa56467a85a5e2d6795ea72dfa5a5f0c9babc23. Do not edit by hand. -->

Samplesheet

A CSV with this header (the columns the schema requires). Fill each value per the constraints below; optional columns from the table may be appended.

samplesheet.csv header
sample,fastq_1
ColumnTypeRequiredAllowed / constraints
samplestringrequiredmatches ^\S+$
fastq_1string (file path)requiredmatches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$
fastq_2string (file path)optionalmatches ^([\S\s]*\/)?[^\s\/]+\.f(ast)?q\.gz$
genomestring (file path)optionalmatches ^[a-zA-Z0-9._-]+$

Required parameters

--inputstring (file path)

Path to comma-separated file containing information about the samples in the experiment.

Constraint · matches ^\S+\.csv$

--outdirstring (directory path)

The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.

--alignerstring

Alignment tool to use.

bismarkbismark_hisatbwamethbwamem

Parameter explorer

88 parameters · 15 groups

Every parameter from the pinned nextflow_schema.json. nfclaw checks explicit values before launch; complex rules use the pinned pipeline's runtime validation. Search, filter by group, and expand any parameter for its default, allowed values and constraints.

68 parameters · 20 hidden

Adapter Trimming7

Trim bases from the 5' end of read 1 (or single-end reads).

Trim bases from the 5' end of read 2 (paired-end only).

Discard reads that become shorter than INT because of either quality or adapter trimming.

Trim bases below this quality value from the 3' end of the read, ignoring high-quality G bases

Skip presetting trimming parameters entirely

Trim bases from the 3' end of read 1 AFTER adapter/quality trimming.

Trim bases from the 3' end of read 2 AFTER adapter/quality trimming

Alignment options2

Alignment tool to use.

Use BWA-MEM2 algorithm for BWA-Meth indexing and alignment.

Bismark options16

Merges methylation calls for every strand into a single, context dependent file.

Output stranded cytosine report, following Bismark's bismark_methylation_extractor step.

Ignore methylation in last n bases of 3' end of R1

Ignore methylation in last n bases of 3' end of R2

Ignore methylation in first n bases of 5' end of R1

Ignore methylation in first n bases of 5' end of R2

Supply a .gtf file containing known splice sites (bismark_hisat only).

Allow soft-clipping of reads (potentially useful for single-cell experiments).

The maximum insert size for valid paired-end alignments.

Specify a minimum read coverage to report a methylation call

The minimum insert size for valid paired-end alignments.

Ignore read 2 methylation when it overlaps read 1

Sample is NOMe-seq or NMT-seq. Runs coverage2cytosine.

Run alignment against all four possible strands.

0.6 will allow a penalty of bp * -0.6 - for 100bp reads (bismark default is 0.2)

Turn on to relax stringency for alignment (set allowed penalty with --num_mismatches).

Generic options4

Display the help message.

Display the full detailed help message.

Custom MultiQC yaml file containing HTML including a methods description.

Display hidden parameters in the help message (only works when --help or --help_full are provided).

Input Output options4

Email address for completion summary.

Path to comma-separated file containing information about the samples in the experiment.

MultiQC report title. Printed as page header, used for filename if not otherwise specified.

The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.

Methyldackel options5

Call methylation in all three CpG, CHG and CHH contexts.

MethylDackel - ignore SAM flags

Merges methylation metrics of the Cytosines in a given context.

Save files for use with methylKit

Specify a minimum read coverage for MethylDackel to report a methylation call.

Qualimap options1

A GFF or BED file containing the target regions which will be passed to Qualimap/Bamqc.

Rastair options2

Nucleotides to exclude from methylation calling on Original Bottom (strand) reads, following this pattern: R1 start, R1 end, R2 start, R2 end

Nucleotides to exclude from methylation calling on Original Top (strand) reads, following this pattern: R1 start, R1 end, R2 start, R2 end

Reference Genome options6

Path to a directory containing a Bismark reference index.

Path to the BWA-MEM index filename base

bwameth index filename base

Path to FASTA genome file

Path to Fasta index file.

Name of iGenomes reference.

Run Pipeline Steps3

Run preseq/lcextrap tool

Run qualimap/bamqc tool

Run advanced analysis for targeted methylation kits with enrichment of specific regions

Save Intermediate Files4

Save aligned intermediates to results directory

Save reference(s) to results directory

Save trimmed reads to results directory.

Bismark only - Save unmapped reads to FastQ files

Skip Pipeline Steps4

Skip deduplication step after alignment.

Skip FastQC

Skip MultiQC

Skip read trimming.

Special Library Types8

Trimming preset for the Accel kit.

Preset for EM-seq libraries.

Preset for working with PBAT libraries.

Turn on if dealing with MspI digested material.

Trimming preset for single-cell bisulfite libraries.

Run bismark in SLAM-seq mode.

Preset for working with TET-assisted pyridine borane sequencing (TAPS) libraries.

Trimming preset for the Zymo kit.

Targeted Sequencing Analysis options2

Run Picard CollectHsMetrics in the targeted analysis

A BED file containing the target regions

Outputs

Results land in --outdir; the files and directory layout depend on the selected workflow, parameters and publication settings. Run metadata is normally placed in <outdir>/pipeline_info/ (execution report, software versions), when those outputs are enabled. The pinned tree includes MultiQC support; a report is produced only when its workflow step runs. --skip-multiqc true disables that report. nfclaw run also writes <outdir>/provenance/ with the exact params file and the run log, <outdir>/provenance/logs/run.log — the whole launch, whose last line states the outcome (Nextflow's own log is <outdir>/.nextflow.log); unless --no-provenance it adds a run manifest (pinned version, commit and exact command), input/output SHA-256 checksums, and a replayable commands.sh. The exact output files and directory layout for this release are documented upstream: github.com/nf-core/methylseq/blob/4.2.0/docs/output.md Check a run — in the foreground or the background — with nfclaw status <outdir>: success, still running, how it ended (with the error), or stopped without an outcome; exit 0 success, 3 running, 1 otherwise.

Chaining

Run methylseq as one stage of a chain: nfclaw chain run starts each stage only after the one before it succeeded, and prepares its inputs from that stage's outputs. Every rule is checked against both pinned schemas.

Fed by

  • demultiplex — demultiplex writes samplesheet/methylseq_samplesheet.csv for its demultiplexed FastQ files.
nfclaw
nfclaw chain edges methylseq