cutandrun
nf-core/cutandrun
Analysis pipeline for CUT&RUN and CUT&TAG experiments that includes sequencing QC, spike-in normalisation, IgG control normalisation, peak calling and downstream peak analysis.
Key tools
Run it
nfclaw run cutandrun --input samplesheet.csv --outdir results -profile dockernextflow run pipelines/cutandrun/upstream -profile docker --input samplesheet.csv --outdir resultsnfclaw run cutandrun --demo --outdir results # adds the upstream test profile (-profile test,docker)Inputs
| column | type | required | allowed values | constraints |
|---|---|---|---|---|
group | string | yes | matches ^\S+$ | |
replicate | integer | yes | matches ^[0-9]*$ | |
fastq_1 | string | yes | matches ^\S+\.f(ast)?q\.gz$ | |
fastq_2 | string | yes | matches ^\S+\.f(ast)?q\.gz$ | |
control | string | yes | matches ^\S+$ |
--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):
group,replicate,fastq_1,fastq_2,controlFrom 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: 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 the required columns no file determines with --sheet-set COLUMN=VALUE (a constant or a {sample}/{lane} template): group (matching ^\S+$); replicate (matching ^[0-9]*$); control (matching ^\S+$). 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. A genome name alone does not specify where reference files come from. Confirm the selected reference's paths and source in the pinned upstream/nextflow.config and upstream/conf/ before running. To supply your own reference, use e.g. --fasta; the reference_data_options group in reference.md lists every reference option. Set --igenomes-ignore true to disable the lookup entirely.
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:
nfclaw run cutandrun --input samplesheet.csv --outdir results -profile docker \ --limit-cpus 4 --limit-memory 15.GBnfclaw 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 = '!>=23.04.0'.
To pin this release's declared minimum engine — useful when a newer Nextflow has incompatible config parsing:
nfclaw run cutandrun ... --nxf-ver 23.04.0--nxf-ver is recorded in <outdir>/provenance/, so the replay uses the same engine. See known-issues.
Nextflow 23.04.0 predates process.resourceLimits (24.04.0), so --limit-* cannot be combined with this pin — nfclaw refuses it rather than run without the ceiling; cap resources with the release's own --max-cpus, --max-memory, --max-time instead.
Demo
nfclaw run cutandrun --demo --outdir results # adds the upstream test profile (-profile test,docker)Samplesheet
A CSV with this header (the columns the schema requires). Fill each value per the constraints below.
group,replicate,fastq_1,fastq_2,control| Column | Type | Required | Allowed / constraints |
|---|---|---|---|
group | string | required | matches ^\S+$ |
replicate | integer | required | matches ^[0-9]*$ |
fastq_1 | string | required | matches ^\S+\.f(ast)?q\.gz$ |
fastq_2 | string | required | matches ^\S+\.f(ast)?q\.gz$ |
control | string | required | matches ^\S+$ |
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 store on Cloud infrastructure.
Parameter explorer
103 parameters · 9 groupsEvery 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.
77 parameters · 26 hidden
Flow Switching options16
Run pipeline up to alignment
Run pipeline up to q-filtering
Run pipeline up to reference preparation
Run pipeline up to input checking
Run pipeline up to peak calling
Run pipeline up to pre-alignment
Skips deeptools QC repoting
Skips fastqc reporting
Skips deeptools heatmap generation
Skips igv session generation
Skips multiqc
Skips peak QC reporting
Skips preseq reporting
Skips de-duplication
Skips reporting
Skips trimming
Generic options2
Custom MultiQC yaml file containing HTML including a methods description.
Pull Docker container.
Input Output options11
Output calculated scale factors from pipeline
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 store on Cloud infrastructure.
Save alignment intermediates to the output directory (WARNING: can be very large)
Save any technical replicate FASTQ files that were merged to the output directory
Save genome reference data to the output directory
Save BAM files aligned to the spike-in genome to the output directory
Save trimmed FASTQ files to the output directory
Save unaligned sequences to the output directory
Pipeline options23
Specifies what samples to group together for consensus peaks. Options are [group, all]
De-duplicate target reads AND control reads (default is control only)
Use --end-to-end mode of Bowtie2 during alignment
Specifies whether to extend paired-end fragments between the read mates when calculating coveage tracks
Specifies whether the background control is scaled prior to being used to normalise peaks.
Show gene names instead of symbols in IGV browser sessions
MACS2 broad cutoff parameter
Determines whether MACS2 broad or narrow peak mode is used for the peak caller
P-value threshold for macs2 peak caller. If set it will overide the qvalue.
Q-value threshold for MACS2 peak caller.
parameter required by MACS2. If using an iGenomes reference these have been provided when --genome is set as *GRCh37*, *GRCh38*, *GRCm38*, *WBcel235*, *BDGP6*, *R64-1-1*, *EF2*, *hg38*, *hg19* and *mm10*. Otherwise the gsize will default to GRCh38.
Filter reads below a q-score threshold
Name of mitochondrial reads in reference genome. Only necessary when using a custom (non-igenomes) reference genome.
If normsalisation option is one of "RPKM", "CPM", "BPM" - then the binsize that the reads count is calculated on is used.
Sets the target read normalisation mode. Options are: ["Spikein", "RPKM", "CPM", "BPM", "None" ]
Selects the peak caller for the pipeline. Options are: [seacr, macs2]. More than one peak caller can be chosen and the order specifies which is a primary peak called (the first) that will be used downstream. Any secondary peak callers will be run and outputed to the results folder.
De-duplicate reads based on read 1 5' start position. Relevant for assays using linear amplification with tagmentation (default is false).
Filter mitochondrial reads
Minimum number of overlapping replicates needed for a consensus peak
SEACR normalization.
SEACR specifies returns the top n fraction (between 0 and 1) of peaks based on total signal within peaks. This is only used if there are no controls included with the samples and if --use_control is false
SEACR stringency.
Specifies whether to use a control to normalise peak calls against (e.g. IgG)
Reference Data options9
Path to genome blacklist
Path to bowtie2 index
Path to FASTA genome file.
Path to gene BED file
Name of iGenomes reference.
Path to GTF annotation file
Path to spike-in bowtie2 index
Path to spike-in fasta
Name of the iGenome reference for the spike-in genome, defaulting to E. coli K12, for yeast set to R64-1-1, for fruit fly BDGP6
Reporting options11
Flag for whether to generate a heatmap for all samples together
Deeptools heatmap gene plot after length (bases)
Deeptools heatmap gene plot before length (bases)
Deeptools heatmap gene plot body length (bases)
Deeptools heatmap peak plot after length (bases)
Deeptools heatmap peak plot before length (bases)
Deeptools multiBamSummary bam bin size
Deeptools Correlation Plot statistical calculation method
Sort the IGV output tracks by group
Minimum fragment overlap for FriP score
Minimum peak overlap for peak reproducibility plot
Trimming options5
Instructs Trim Galore to remove bp from the 5' end of read 1 (or single-end reads).
Instructs Trim Galore to remove bp from the 5' end of read 2 (paired-end reads only).
Instructs Trim Galore to remove bp from the 3' end of read 1 AFTER adapter/quality trimming has been performed.
Instructs Trim Galore to remove bp from the 3' end of read 2 AFTER adapter/quality trimming has been performed.
Instructs Trim Galore to apply the --nextseq=X option, to trim based on quality after removing poly-G tails.
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/cutandrun/blob/3.2.2/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.