grothlab/crepas

grothlab/crepas is a bioinformatics pipeline for the analysis of chromatin sequencing data (ChIP-seq, ATAC-seq, SCAR-seq, ChOR-seq, etc.).

https://github.com/grothlab/crepas/tree/1.0.0View on GitHub

Table of Contents

  1. Samplesheet input
  2. Reference genome files
  3. Running the pipeline
    1. Parameters
    2. Updating the pipeline
    3. Reproducibility
    4. Core Nextflow arguments
    5. Custom configuration
    6. Running in the background
    7. Nextflow memory requirements

Samplesheet input

You will need to create a samplesheet with information about the samples you would like to analyse before running the pipeline. Use the --input parameter to specify its location:

--input <path_to_samplesheet_csv>

It has to be a comma-separated (.csv) file with with at least the sample, biological_replicate, exp_type and fastq_1 columns, and a header row as explained below. The columns can be provided in any order:

Column (header)DescriptionTypeRequired
sampleCustom sample (or condition) name. This identifier must be the same for all biological and technical replicates of the same sample; just specify a biological_replicate appropriately. For output file naming purposes, the sequencing experiment type is parsed from the exp_type column and prepended to the sample identifier, so you should avoid including the experiment type as part of the sample name. It cannot contain spaces.stringtrue
biological_replicateString or integer representing the biological replicate. This identifier should be identical for re-sequenced libraries (technical replicates). If you do not have biological replicates you can set the biological_replicate to any number or string for each of your samples. It cannot contain spaces.string or integertrue
technical_replicateIdentifier representing the technical replicate. It cannot contain spaces.string or integer
input_controlThis column should contain the sample identifier of the corresponding input control for that sample. It should be empty if an input control is not available or in the case of input control rows.string
input_control_biological_replicateString or integer representing the biological replicate of the corresponding input control sample. It should be empty in the case of input control rows.string or integer
input_control_technical_replicateString or integer representing the technical replicate of the corresponding input control sample. It should be empty in the case of input control rows.string or integer
exp_typeOne of ChIP-seq, ATAC-seq, SCAR-seq, ChOR-seq, ChIP-exo, OK-seq, CUT&RUN, CUT&Tag, TIP-seqstringtrue
strandednessEither forward or reverse:


This field is only relevant for SCAR-seq and OK-seq; leave it empty for unstranded data (ChIP-seq, ChIP-exo, ChOR-seq, or ATAC-seq).
string
antibodyThis column is required to separate the downstream consensus peak merging for different antibodies. It is not advisable to generate a consensus peak set across different antibodies especially if their binding patterns are inherently different e.g. narrow transcription factors and broad histone marks. It should be empty in the case of input control rows.string
with_umiMust be set to true for samples that contain UMIs, either in the read sequence, in the read name, or in a separate FastQ file (fastq_umi). If your samples contain UMIs, but they are not in a separate FastQ file, set with_umi to true and leave the fastq_umi column empty.boolean
extract_umiIf the UMIs are contained in the read sequence, extract_umi must be set to true to move them to the read name. If the UMIs have already been extracted and moved to the read name, set extract_umi to false.boolean
fastq_1GZIP-compressed FastQ file for reads 1. Must have the extension .fastq.gz or .fq.gz.string (file-path)true
fastq_2GZIP-compressed FastQ file for reads 2. Must have the extension .fastq.gz or .fq.gz. Leave empty for single-end data.string (file-path)
fastq_umiGZIP-compressed FastQ file for UMI reads. Must have the extension .fastq.gz or .fq.gz. Leave empty if a separate UMI file is not available.string (file-path)

Example 1: Multiple biological replicates

This is an example of a samplesheet for a ChIP-seq experiment with one condition and two biological replicates for each antibody:

samplefastq_1fastq_2fastq_umibiological_replicateexp_typestrandednessantibodyinput_controlinput_control_biological_replicate
condition_1_H3K9me3condition_1_bRep1_H3K9me3_R1.fastq.gzcondition_1_bRep1_H3K9me3_R3.fastq.gzcondition_1_bRep1_H3K9me3_R2.fastq.gz1ChIP-seqH3K9me3condition_1_INPUT1
condition_1_H3K9me3condition_1_bRep2_H3K9me3_R1.fastq.gzcondition_1_bRep2_H3K9me3_R3.fastq.gzcondition_1_bRep2_H3K9me3_R2.fastq.gz2ChIP-seqH3K9me3condition_1_INPUT2
condition_1_H3K27accondition_1_bRep1_H3K27ac_R1.fastq.gzcondition_1_bRep1_H3K27ac_R3.fastq.gzcondition_1_bRep1_H3K27ac_R2.fastq.gz1ChIP-seqH3K27accondition_1_INPUT1
condition_1_H3K27accondition_1_bRep2_H3K27ac_R1.fastq.gzcondition_1_bRep2_H3K27ac_R3.fastq.gzcondition_1_bRep2_H3K27ac_R2.fastq.gz2ChIP-seqH3K27accondition_1_INPUT2
condition_1_INPUTcondition_1_bRep1_INPUT_R1.fastq.gzcondition_1_bRep1_INPUT_R3.fastq.gzcondition_1_bRep1_INPUT_R2.fastq.gz1ChIP-seq
condition_1_INPUTcondition_1_bRep2_INPUT_R1.fastq.gzcondition_1_bRep2_INPUT_R3.fastq.gzcondition_1_bRep2_INPUT_R2.fastq.gz2ChIP-seq

Example 2: Multiple runs of the same library (technical replicates)

Both the sample and biological_replicate identifiers have to be the same when you have sequenced the same sample more than once e.g. to increase sequencing depth. The pipeline will perform the alignments in parallel, and subsequently merge them before further analysis.

This is an example of a samplesheet for a ChIP-seq experiment with one condition, two biological replicates for each antibody, and two technical replicates for each biological replicate:

samplefastq_1fastq_2fastq_umibiological_replicateexp_typestrandednessantibodyinput_controlinput_control_biological_replicate
condition_1_H3K9me3condition_1_bRep1_tRep1_H3K9me3_R1.fastq.gzcondition_1_bRep1_tRep1_H3K9me3_R3.fastq.gzcondition_1_bRep1_tRep1_H3K9me3_R2.fastq.gz1ChIP-seqH3K9me3condition_1_INPUT1
condition_1_H3K9me3condition_1_bRep1_tRep2_H3K9me3_R1.fastq.gzcondition_1_bRep1_tRep2_H3K9me3_R3.fastq.gzcondition_1_bRep1_tRep2_H3K9me3_R2.fastq.gz1ChIP-seqH3K9me3condition_1_INPUT1
condition_1_H3K9me3condition_1_bRep2_tRep1_H3K9me3_R1.fastq.gzcondition_1_bRep2_tRep1_H3K9me3_R3.fastq.gzcondition_1_bRep2_tRep1_H3K9me3_R2.fastq.gz2ChIP-seqH3K9me3condition_1_INPUT2
condition_1_H3K9me3condition_1_bRep2_tRep2_H3K9me3_R1.fastq.gzcondition_1_bRep2_tRep2_H3K9me3_R3.fastq.gzcondition_1_bRep2_tRep2_H3K9me3_R2.fastq.gz2ChIP-seqH3K9me3condition_1_INPUT2
condition_1_H3K27accondition_1_bRep1_tRep1_H3K27ac_R1.fastq.gzcondition_1_bRep1_tRep1_H3K27ac_R3.fastq.gzcondition_1_bRep1_tRep1_H3K27ac_R2.fastq.gz1ChIP-seqH3K27accondition_1_INPUT1
condition_1_H3K27accondition_1_bRep1_tRep2_H3K27ac_R1.fastq.gzcondition_1_bRep1_tRep2_H3K27ac_R3.fastq.gzcondition_1_bRep1_tRep2_H3K27ac_R2.fastq.gz1ChIP-seqH3K27accondition_1_INPUT1
condition_1_H3K27accondition_1_bRep2_tRep1_H3K27ac_R1.fastq.gzcondition_1_bRep2_tRep1_H3K27ac_R3.fastq.gzcondition_1_bRep2_tRep1_H3K27ac_R2.fastq.gz2ChIP-seqH3K27accondition_1_INPUT2
condition_1_H3K27accondition_1_bRep2_tRep2_H3K27ac_R1.fastq.gzcondition_1_bRep2_tRep2_H3K27ac_R3.fastq.gzcondition_1_bRep2_tRep2_H3K27ac_R2.fastq.gz2ChIP-seqH3K27accondition_1_INPUT2
condition_1_INPUTcondition_1_bRep1_tRep1_INPUT_R1.fastq.gzcondition_1_bRep1_tRep1_INPUT_R3.fastq.gzcondition_1_bRep1_tRep1_INPUT_R2.fastq.gz1ChIP-seq
condition_1_INPUTcondition_1_bRep1_tRep2_INPUT_R1.fastq.gzcondition_1_bRep1_tRep2_INPUT_R3.fastq.gzcondition_1_bRep1_tRep2_INPUT_R2.fastq.gz1ChIP-seq
condition_1_INPUTcondition_1_bRep2_tRep1_INPUT_R1.fastq.gzcondition_1_bRep2_tRep1_INPUT_R3.fastq.gzcondition_1_bRep2_tRep1_INPUT_R2.fastq.gz2ChIP-seq
condition_1_INPUTcondition_1_bRep2_tRep2_INPUT_R1.fastq.gzcondition_1_bRep2_tRep2_INPUT_R3.fastq.gzcondition_1_bRep2_tRep2_INPUT_R2.fastq.gz2ChIP-seq

Reference genome files

Genome index, FASTA, GTF/GFF and gene BED files

The minimum reference genome requirements are a FASTA and a GTF file, all other files required to run the pipeline can be generated from these files. However, it is more storage and compute friendly if you are able to re-use reference genome files as efficiently as possible. It is recommended to use the --save_reference parameter if you are using the pipeline to build new indices (e.g. those unavailable on AWS iGenomes) so that you can save them somewhere locally. The index building step can be quite a time-consuming process and it permits their reuse for future runs of the pipeline to save disk space. You can then either provide the appropriate reference genome files on the command-line via the appropriate parameters (e.g. --bwa_index '/path/to/bwa/index/') or via a custom config file.

  • If --gene_bed is not provided then it will be generated from the GTF file.

NB: Compressed reference files are also supported by the pipeline i.e. standard files with the .gz extension and indices folders with the tar.gz extension.

Genome blacklist regions

The blacklist bed files where obtained using the commands below:

cd ..
mkdir -p v1.0
cd v1.0
wget -L https://www.encodeproject.org/files/ENCFF001TDO/@@download/ENCFF001TDO.bed.gz && gunzip ENCFF001TDO.bed.gz && mv ENCFF001TDO.bed hg19-blacklist.v1.bed

mkdir -p assets/blacklists/v2.0/
cd assets/blacklists/v2.0/
wget -L https://raw.githubusercontent.com/Boyle-Lab/Blacklist/master/lists/ce10-blacklist.v2.bed.gz && gunzip ce10-blacklist.v2.bed.gz
wget -L https://raw.githubusercontent.com/Boyle-Lab/Blacklist/master/lists/ce11-blacklist.v2.bed.gz && gunzip ce11-blacklist.v2.bed.gz
wget -L https://raw.githubusercontent.com/Boyle-Lab/Blacklist/master/lists/dm3-blacklist.v2.bed.gz && gunzip dm3-blacklist.v2.bed.gz
wget -L https://raw.githubusercontent.com/Boyle-Lab/Blacklist/master/lists/dm6-blacklist.v2.bed.gz && gunzip dm6-blacklist.v2.bed.gz
wget -L https://raw.githubusercontent.com/Boyle-Lab/Blacklist/master/lists/hg19-blacklist.v2.bed.gz && gunzip hg19-blacklist.v2.bed.gz
wget -L https://raw.githubusercontent.com/Boyle-Lab/Blacklist/master/lists/hg38-blacklist.v2.bed.gz && gunzip hg38-blacklist.v2.bed.gz
wget -L https://raw.githubusercontent.com/Boyle-Lab/Blacklist/master/lists/mm10-blacklist.v2.bed.gz && gunzip mm10-blacklist.v2.bed.gz

cd ..
mkdir -p v3.0
cd v3.0
wget -L https://www.encodeproject.org/files/ENCFF356LFX/@@download/ENCFF356LFX.bed.gz && gunzip ENCFF356LFX.bed.gz && mv ENCFF356LFX.bed hg38-blacklist.v3.bed

NB: A detailed description of the different versions of the files can be found here. Also, to to see which blacklist bed files are assigned by default to the respective reference genome check the igenomes.config.

Initiation zones

OK-seq partitions

Running the pipeline

The typical command for running the pipeline is as follows:

nextflow run grothlab/crepas \
  -profile docker \
  --input samplesheet.csv \
  --genome GRCh37 \
  --outdir <OUTDIR>

This will launch the pipeline with the docker configuration profile. See below for more information about profiles.

Note that the pipeline will create the following files in your working directory:

work                # Directory containing the nextflow working files
<OUTDIR>            # Finished results in specified location (defined with --outdir)
.nextflow.log       # Log file from Nextflow
# Other nextflow hidden files, eg. history of pipeline runs and old logs.

If you wish to repeatedly use the same parameters for multiple runs, rather than specifying each flag in the command, you can specify these in a params file.

Pipeline settings can be provided in a yaml or json file via -params-file <file>.

nextflow run grothlab/crepas -profile docker -params-file params.yaml

with params.yaml containing:

input: './samplesheet.csv'
outdir: './results/'
genome: 'GRCh37'
input: 'data'
<...>

You can also generate such YAML/JSON files via nf-core/launch.

Parameters

Input/output options

Define where the pipeline should find input data and save output data.

ParameterDescriptionTypeDefaultRequiredHidden
inputPath to comma-separated file containing information about the samples in the experiment.
HelpYou will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 5 columns, and a header row. See usage docs.
stringtrue
fragment_sizeEstimated fragment size used to extend single-end reads.integer250
seq_platformPlatform/technology used to produce the reads. Corresponds to the PL tag in the SAM/BAM file header.
HelpSee the SAM format specification. Valid values: CAPILLARY, DNBSEQ (MGI/BGI), ELEMENT, HELICOS, ILLUMINA, IONTORRENT, LS454, ONT (Oxford Nanopore), PACBIO (Pacific Biosciences), SINGULAR, SOLID, and ULTIMA. This field should be omitted when the technology is not in this list (though the PM field may still be present in this case) or is unknown.
string
seq_centerSequencing center information to be added to read group of BAM files.string
read_lengthRead length used to calculate MACS3 genome size for peak calling if --macs_gsize isn't provided. (accepted: 50|75|100|150|200)integer50
outdirThe output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.stringtrue
emailEmail address for completion summary.
HelpSet this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits. If set in your user config file (~/.nextflow/config) then you don't need to specify this on the command line for every run.
string
multiqc_titleMultiQC report title. Printed as page header, used for filename if not otherwise specified.string

Reference genome options

Reference genome related files and options required for the workflow.

ParameterDescriptionTypeDefaultRequiredHidden
genomeName of reference genome (e.g., GRCh38, hg19, mm10).stringtrue
fastaPath to FASTA genome file.
HelpIf you don't have the appropriate alignment index available this will be generated for you automatically based on this file. Combine with --save_reference to save alignment index for future runs.
stringtrue
gtfPath to GTF annotation file.stringtrue
gffPath to GFF3 annotation file.string
bwa_indexPath to directory or tar.gz archive for pre-built BWA index.string
bwa_mem2_indexPath to directory or tar.gz archive for pre-built BWAMEM2 index.string
bowtie_indexPath to directory or tar.gz archive for pre-built Bowtie index.string
bowtie2_indexPath to directory or tar.gz archive for pre-built Bowtie2 index.string
chromap_indexPath to directory or tar.gz archive for pre-built Chromap index.string
star_indexPath to directory or tar.gz archive for pre-built STAR index.string
hisat2_indexPath to directory or tar.gz archive for pre-built HISAT2 index.string
minimap2_indexPath to directory or tar.gz archive for pre-built Minimap2 index.string
strobealign_indexPath to Strobealign index file with extension '.sti'. This will be created from the FASTA file if not specified and the aligner is set to strobealign.string
gene_bedPath to BED file containing gene intervals. This will be created from the GTF file if not specified.string
initiation_zonesPath to BED file containing initiation zones for SCAR-seq analysis.string
okseq_rfd_filePath to GZIP-compressed OK-seq RFD text file. The path cannot contain spaces and must have extension '.txt.gz', '.tsv.gz' or '.bed.gz'string
macs_gsizeEffective genome size parameter required by MACS3.
HelpEffective genome size parameter required by MACS3.
number
blacklistPath to blacklist regions in BED format, used for filtering alignments.
HelpIf provided, alignments that overlap with the regions in this file will be filtered out (see ENCODE blacklists). The file should be in BED format.
string
sparsebedPath to BED file with sparse segments for Consenrich.
HelpDefines the annotation file of 'sparse segments' (genomic regions) from the complement of an 'inflated' BED file of known active regions. See https://github.com/nolan-h-hamilton/Consenrich/blob/5e7f287d81ac4a9bc098ae29e825a5ded07af3b8/consenrich/consenrich.py#L58C54-L58C174
string
active_regionsPath to BED file with active regions for Consenrich.
HelpDefines the annotation file of 'active regions' (genomic regions) for Consenrich. See https://github.com/nolan-h-hamilton/Consenrich/blob/5e7f287d81ac4a9bc098ae29e825a5ded07af3b8/consenrich/consenrich.py#L67
string
rocco_paramsPath to ROCCO parameters file.
HelpCSV file containing chromosome-specific optimization parameters. Each supported genome has a custom --params file packaged with ROCCO, but a custom file has to be manually passed to ROCCO within this pipeline. Consider using this argument to set chromosome-specific budget and gamma values custom to your data and preferences. See the ROCCO documentation for more details.
string
splicesitesPath to splice sites file for HISAT2.
HelpIf using HISAT2 as the aligner, you can provide a list of known splice sites, which HISAT2 makes use of to align reads with small anchors. If this file is not provided, it will be generated from the GTF file.
string
save_referenceIf generated by the pipeline save the BWA index in the results directory.
HelpIf the BWA index is generated by the pipeline use this parameter to save it to your results folder. These can then be used for future pipeline runs, reducing processing times.
booleantrue
skip_gtf_indexSkip indexing the GTF file with tabix before processing.
HelpSet this parameter to true to skip indexing the GTF file with tabix. This may be useful if your GTF file is already indexed or if you encounter issues with tabix.
booleanfalse
igenomes_baseDirectory / URL base for iGenomes references.strings3://ngi-igenomes/igenomes/true
igenomes_ignoreDo not load the iGenomes reference config.
HelpDo not load igenomes.config when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in igenomes.config.
booleantruetrue
refgenie_ignoreWhether to ignore the Refgenie reference genomes.
HelpDo not use the Refgenie reference genomes, even if loaded before through config files.
booleantruetrue

UMI extraction and deduplication options

Options to adjust UMI extraction and deduplication criteria.

ParameterDescriptionTypeDefaultRequiredHidden
skip_markduplicatesSkip the MarkDuplicates step with Picard for samples without UMIs.booleanfalse
umitools_extract_methodUMI pattern to use. Can be either string (default) or regex. (accepted: string|regex)
HelpMore details can be found in the UMI-tools documentation.
stringstring
umitools_bc_patternThe UMI barcode pattern to use e.g. 'NNNNNN' indicates that the first 6 nucleotides of the read are from the UMI.
HelpMore details can be found in the UMI-tools documentation.
stringNNNNNNNNN
umitools_bc_pattern2The UMI barcode pattern to use if the UMI is located in read 2.stringNNNNNNNNN
umi_separatorSeparator used to separate the UMI from the read name.string_
umi_grouping_methodMethod to use to determine read groups by subsuming those with similar UMIs. All methods start by identifying the reads with the same mapping position, but treat similar yet nonidentical UMIs differently. (accepted: unique|percentile|directional|adjacency|cluster)stringpercentile
umi_discard_readAfter UMI barcode extraction discard either R1 or R2 by setting this parameter to 1 or 2, respectively.integer
get_dedup_statsGet deduplication statistics.booleantrue
umi_dedup_toolUMI deduplication tool to use. (accepted: umicollapse|umitools)stringumitools
save_dedup_intermedsSave intermediate files from the UMI deduplication step.booleantrue
skip_split_by_chromSkip splitting the BAM file by chromosome before UMI deduplication.booleanfalse

Adapter trimming options

Options to adjust adapter trimming criteria.

ParameterDescriptionTypeDefaultRequiredHidden
clip_r1Instructs Trim Galore to remove bp from the 5' end of read 1 (or single-end reads).integer
clip_r2Instructs Trim Galore to remove bp from the 5' end of read 2 (paired-end reads only).integer
three_prime_clip_r1Instructs Trim Galore to remove bp from the 3' end of read 1 AFTER adapter/quality trimming has been performed.integer
three_prime_clip_r2Instructs Trim Galore to remove bp from the 3' end of read 2 AFTER adapter/quality trimming has been performed.integer
trim_full_lengthInstructs Trim Galore to search for the full length (33 bp) TruSeq (ChIP-seq, ChOR-seq, SCAR-seq) or Nextera (ATAC-seq) adapter sequences for both complement and reverse complements.
HelpThe default (false) setting will mean that the auto-detect function of Trim Galore will be used. See https://github.com/FelixKrueger/TrimGalore/blob/master/Docs/Trim_Galore_User_Guide.md#adapter-auto-detection
booleantrue
trim_nextseqInstructs Trim Galore to apply the --nextseq=X option, to trim based on quality after removing poly-G tails.
HelpThis enables the Cutadapt --nextseq-trim=3'CUTOFF option via Trim Galore, which will set a quality cutoff (that is normally given with -q instead), but qualities of G bases are ignored. This trimming is in common for the NextSeq- and NovaSeq-platforms, where basecalls without any signal are called as high-quality G bases. Read the Cutadapt documentation for more details.
integer20
trim_stringencyInstructs Trim Galore to use this stringency (minimum overlap) when searching for adapter sequences.
HelpIn other words, to reduce the number of falsely trimmed bases, the alignment algorithm in Trim Galore requires that at least this number of bases of the adapter are aligned to the read. This parameter corresponds to the --stringency option in Trim Galore and the --overlap option in Cutadapt.
integer3
trim_error_rateInstructs Trim Galore to use this error rate when trimming.number0.2
trim_q_cutoffInstructs Trim Galore to use this quality cutoff when trimming.integer
trim_minimum_lengthInstructs Trim Galore to remove reads shorter than this length after adapter/quality trimming.integer5
skip_trimmingSkip the adapter trimming step.
HelpUse this if your input FastQ files have already been trimmed outside of the workflow or if you're very confident that there is no adapter contamination in your data.
boolean
save_trimmedSave the trimmed FastQ files in the results directory.
HelpBy default, trimmed FastQ files will not be saved to the results directory. Specify this flag (or set to true in your config file) to copy these files to the results directory when complete.
boolean
min_trimmed_readsMinimum number of reads required after trimming.integer1

Hard trimming options

Options to adjust hard trimming criteria.

ParameterDescriptionTypeDefaultRequiredHidden
hardtrim5_lengthInstructs Trim Galore to hard-trim (shorten) reads to this length from their 3' end. This is performed after adapter/quality trimming.integer
hardtrim3_lengthInstructs Trim Galore to hard-trim (shorten) reads to this length from their 5' end. This is performed after adapter/quality trimming.integer
save_hardtrimmedWhether to save the hard-trimmed reads (FASTQs) in the output directory.booleantrue

Alignment options

Options to adjust parameters and filtering criteria for read alignments.

ParameterDescriptionTypeDefaultRequiredHidden
alignerSpecifies the alignment algorithm to use. The available options are bwa, bowtie2, chromap, star, and hisat2.stringchromap
bwa_min_scoreDon't output BWA MEM alignments with score lower than this parameter.integer
sort_bamShould the BAM files be sorted by coordinate? Only relevant if Bowtie2 or BWA are used as aligners.booleantrue
save_align_intermedsSave the intermediate BAM files from the alignment step.
HelpBy default, intermediate BAM files will not be saved. The final BAM files created after the appropriate filtering step are always saved to limit storage usage. Set this parameter to also save other intermediate BAM files.
boolean
save_unalignedWhere possible, save unaligned reads from either STAR or HISAT2 to the results directory.
HelpThis may either be in the form of FastQ or BAM files depending on the options available for that particular tool.
boolean
map_n_multimappersNumber of multimappers to map.integer

Spike-in options

Options to adjust spike-in splitting criteria.

ParameterDescriptionTypeDefaultRequiredHidden
spikein_genomeName of the spike-in genome (if used in the experiment). The spike-in (exogenous) chromosome names in the --fasta and <aligner>_index files should have the format <chromosome_name>_<spikein_genome>, e.g. chr1_dm6.string
save_spikein_intermedsSave intermediate files during spike-in splitting and filtering of BAMs. These include the split and filtered BAM files before coordinate-sorting.booleanfalse

Multimapper allocation options

Options to adjust multimapper allocation criteria.

ParameterDescriptionTypeDefaultRequiredHidden
multimap_allocation_methodMethod to allocate multimappers. Options are allo, chromap, and mmr. Not setting this parameter means that multimappers will not be allocated (the default).string
allo_mixed_cnnWhen using Allo for multimapper allocation, use the CNN trained on histone ChIP-seq datasets with mixed peaks, otherwise use the default (narrow). See allo for more details.booleantrue
save_allocation_intermedsSave the intermediate BAM files from the multimapper allocation step.booleantrue
allocate_exogenousWhether to also allocate multimappers in the spike-in (exogenous) BAM files.booleantrue

Alignment shifting options

Options to adjust alignment shifting criteria.

ParameterDescriptionTypeDefaultRequiredHidden
save_shifting_intermedsWhether to save the intermediate files from the alignment shifting (only done on ATAC-seq data).booleanfalse

Filtering options

Options to adjust filtering criteria for BAM files.

ParameterDescriptionTypeDefaultRequiredHidden
skip_flT3Whether to skip the flT3 filtering step (filtering by mapping quality, which also removes multimapping reads in most cases).booleanfalse

Coverage and normalization options

Options to adjust coverage and normalization criteria.

ParameterDescriptionTypeDefaultRequiredHidden
skip_srpmWhether to skip the SRPM normalization step. See the output documentation for more details.booleanfalse
skip_cisrpmWhether to skip the CISRPM normalization step. See the output documentation for more details.booleanfalse
coverage_extend_readsThis parameter allows the extension of reads to fragment size. If set, each read is extended, without exception.
HelpSingle-end: Requires a user specified value for the final fragment length. Reads that already exceed this fragment length will not be extended. Paired-end: Reads with mates are always extended to match the fragment size defined by the two read mates. Unmated reads, mate reads that map too far apart (>4x fragment length) or even map to different chromosomes are treated like single-end reads. The input of a fragment length value is optional. If no value is specified, it is estimated from the data (mean of the fragment size of all mate reads). Read the deepTools documentation for more details.
integer250
coverage_bin_sizeSize of the bins, in bases, for the output of the coverage calculation.integer250
coverage_skip_nasThis parameter determines if non-covered regions (regions without overlapping reads) should be skipped. The default is to treat those regions as having a value of zero. See the deepTools documentation for more details.booleanfalse
skip_signal_vs_inputWhether to skip the signal vs input comparison step.booleanfalse
signal_vs_input_operationOperation to perform when comparing IP and input coverage. soi is basically the same as ratio, although it is computed with a special script. For the rest of the operations, see the deepTools documentation for more details. (accepted: soi|log2|ratio|subtract|add|mean|reciprocal_ratio|first|second)stringsoi
min_signal_for_soiMinimum signal in the IP bin to be included in the signal over input (SOI) calculation. Otherwise, the the score of that bin is set to NaN.number0
min_input_for_soiMinimum input signal in the input bin to be included in the signal over input (SOI) calculation. Otherwise, the the score of that bin is set to NaN.number0.001
bw_compare_pseudocountA small number to avoid x/0. Only useful together with --operation log2 or --operation ratio. See the deepTools documentation for more details.number1
bw_compare_skip_zero_over_zeroThis parameter determines if regions with zero coverage in both the IP and input should be skipped when comparing IP and input coverage. This is determined BEFORE any applicable pseudocount is added. See the deepTools documentation for more details.booleantrue
use_flT2_as_total_refComma-separated list of histone marks for which downsampling or normalization factors should be calculated using the total number of reads before the quality filtering in flT3. The total mapped reads after flT1 will be used if flT2 was not performed (i.e., when there is no spike-in splitting). For marks/antibodies not in this list the total mapped reads after flT3 will be used for normalization factor calculation.stringH3K9me3,H3K27me3
save_coverage_intermedsWhether to save the intermediate files from the coverage calculation step. These include the coverage files in bedGraph format.booleanfalse
min_reads_for_normMinimum number of total mapped reads required to include a BAM in any normalization. For example, this prevents having an empty exogenous input control BAM when no reads map to the spike-in genome.integer1
skip_bw_averageWhether to skip the generation of average bigWig files across replicates for each sample group.booleanfalse
skip_exo_bwWhether to skip the generation of exogenous bigWig files for each sample.booleantrue

Downsampling options

Options to adjust downsampling criteria.

ParameterDescriptionTypeDefaultRequiredHidden
bam_downsampling_methodMethod to downsample BAM files. Leave empty to disable downsampling.
HelpThe min_endo_across method will downsample all IPs and inputs of the same antibody to the minimum number of endogenous reads across all IPs and inputs of the same antibody.
The min_exo_across method will downsample all IPs and inputs of the same antibody to the minimum number of exogenous reads across all IPs and inputs of the same antibody.
The min_endo_by_type method will downsample all IPs to the minimum number of endogenous reads across all IPs of the same antibody, and all the inputs to the minimum number of endogenous reads across all inputs of the same antibody.
The min_exo_by_type method will downsample all IPs to the minimum number of exogenous reads across all IPs of the same antibody, and all the inputs to the minimum number of exogenous reads across all inputs of the same antibody.
string
downsampling_endo_thresholdThreshold of endogenous mapped reads for downsampling. For downsampling methods that search for the minimum endogenous mapped reads across a set of samples, this parameter will determine the lower limit of that minimum. In other words, the minimum mapped endogenous reads should be the minimum number above the downsampling_endo_threshold. If there are no totals above this threshold, then the (true) minimum is used.integer10000000
downsampling_exo_thresholdThreshold of exogenous mapped reads for downsampling. For downsampling methods that search for the minimum exogenous mapped reads across a set of samples, this parameter will determine the lower limit of that minimum. In other words, the minimum mapped exogenous reads should be the minimum number above the downsampling_exogenous_threshold. If there are no totals above this threshold, then the (true) minimum is used.integer300000
dSp_use_flT2_totalComma-separated list of histone marks for which downsampling probabilities should be calculated using the total number of reads before the quality filtering in flT3. The total mapped reads after flT1 will be used if flT2 was not performed (i.e., when there is no spike-in splitting). For marks/antibodies not in this list, the total mapped reads after flT3 will be used for downsampling probability calculation.stringH3K9me3,H3K27me3
bam_downsampling_strategyStrategy to downsample BAM files. See Picard for more details.stringChained
bam_downsampling_accuracyAccuracy of downsampling BAM files. See Picard for more details.number1e-06
save_downsampling_intermedsSave the intermediate BAM files from the downsampling step.booleantrue

TE counting options

Options to adjust transposable element (TE) counting criteria.

ParameterDescriptionTypeDefaultRequiredHidden
skip_te_countingSkip transposable element (TE) counting.booleantrue
skip_telocalSkip local TE counting.booleantrue
skip_tecount_gzSkip gzip compression of TEcount output files.booleantrue
skip_telocal_gzSkip gzip compression of TElocal output files.booleantrue
te_counting_modeMethod to use for TE counting. See TEcount's documentation for more details. (accepted: multi|uniq)stringmulti
te_counting_gene_gtfPath to a different gene GTF file for counting with TEcount and TElocal. If not provided, the main --gtf file will be used to generate a gene index suitable for TEcount or TElocal, unless the respective prebuilt gene index files are provided.string
tecount_gene_indexPath to the prebuilt gene index file (.ind) for counting with TEcount. If not provided, this file in --gtf will be used to generate a gene index suitable for TEcount.string
telocal_gene_indexPath to the prebuilt gene index file (.ind) for counting with TElocal. If not provided, this file in --gtf will be used to generate a gene index suitable for TElocal.string
te_gtfPath to the TE GTF file for counting with TEcount or TElocal. If not provided, this file will be used to generate a TE index suitable for TEcount or TElocal.string
tecount_te_indexPath to the prebuilt TE index file (.ind) for counting with TEcount. If not provided, this file in --te_gtf will be used to generate a TE index suitable for TEcount.string
telocal_te_indexPath to the prebuilt TE index file (.locInd) for local (instance) TE counting with TElocal. If not provided, this file in --te_gtf will be used to generate a TE index suitable for TElocal.string

Peak calling options

Options to adjust peak calling criteria.

ParameterDescriptionTypeDefaultRequiredHidden
narrow_peakWhether to call narrow peaks with MACS3 and Genrich. Default is to call broad peaks.booleanfalse
peak_cutoff_methodWhether to use q-value or p-value as the cutoff for peak calling. (accepted: qvalue|pvalue)stringqvalue
narrow_cutoffSpecifies narrow cutoff value (p-value or q-value) for MACS3 and Genrich peak calling.number0.01
broad_cutoffSpecifies broad cutoff value (p-value or q-value) for MACS3 and Genrich peak calling.number0.1
min_reps_consensusNumber of biological replicates required from a given condition for a peak to contribute to a consensus peak.
HelpIf you are confident you have good reproducibility amongst your replicates then you can increase the value of this parameter to create a 'reproducible' set of consensus peaks. For example, a value of 2 will mean peaks that have been called in at least 2 replicates will contribute to the consensus set of peaks, and as such peaks that are unique to a given replicate will be discarded.
integer1
macs_extsizeUsed to extend reads in 5'->3' direction to fix-sized fragments when processing ATAC-seq data, for which MACS3 bypasses building the shifting model (--nomodel). See MACS3 documentation for more details.integer250
macs_slocalSize of the small local region around peak regions to calculate the maximum lambda as local lambda.
HelpBy default, MACS3 considers 1000 bp for small local region (--slocal). You can tweak this according to your project. Remember that if the region is set too small, a sharp spike in the input data may kill a significant peak. See MACS3 documentation for more details.
integer1500
macs_llocalSize of the large local region around peak regions to calculate the maximum lambda as local lambda.
HelpBy default, MACS3 considers 10000 bp for large local region (--llocal) which captures the bias from a long-range effect like an open chromatin domain. You can tweak this according to your project. See MACS3 documentation for more details.
integer10000
save_macs_pileupInstruct MACS3 to create bedGraph files normalised to signal per million reads.booleantrue
skip_peak_qcSkip MACS3 peak QC plot generation.boolean
skip_peak_annotationSkip annotation of MACS3 and consensus peaks with HOMER.boolean
skip_consensus_peaksSkip consensus peak generation, annotation and counting.boolean
skip_consensus_plotprofileSkip generation of the consensus peak profile plot.boolean
consensus_plotprofile_modeMode to use for the consensus peak profile plot. See the deepTools documentation for more details. (accepted: reference_point|scale_regions)stringreference_point
consensus_plotprofile_ref_pointReference point to use for the consensus peak profile plot when --consensus_plotprofile_mode is set to reference_point. See the deepTools documentation for more details. (accepted: TSS|TES|center)stringcenter
consensus_plotprofile_region_body_lengthLength of the region body to plot for the consensus peak profile plot when --consensus_plotprofile_mode is set to scale_regions. See the deepTools documentation for more details.integer1000
consensus_plotprofile_upstreamLength of the upstream region to plot for the consensus peak profile plot. See the deepTools documentation for more details.integer6000
consensus_plotprofile_downstreamLength of the downstream region to plot for the consensus peak profile plot. See the deepTools documentation for more details.integer6000
consensus_plotprofile_skip_zerosWhether to skip regions with zero coverage in the consensus peak profile plot. See the deepTools documentation for more details.booleantrue
consensus_plotprofile_per_groupWhether to plot all samples in a group together in the consensus peak profile plot. See the deepTools documentation for more details.booleantrue
input_cisrpm_in_plotprofileWhether to include the input CISRPM signal in the gene or consensus peak profile plots.booleanfalse
skip_bdgcmpSkip bdgcmp calculation with MACS3.booleantrue
save_macs_bdgcmp_intermedsboolean
skip_eddWhether to skip EDD peak calling.booleantrue
edd_bin_sizeBin size (Kb) for EDD peak calling. Autoestimated if left blank. See EDD documentation for more details.string
edd_gap_penaltyGap penalty for EDD peak calling. Autoestimated by EDD if left blank. See EDD documentation for more details.string
edd_num_trialsNumber of Monte Carlo trials for EDD peak calling. See EDD documentation for more details.integer10000
edd_fdrFDR threshold for EDD peak calling. See EDD documentation for more details.number0.01
genrich_narrow_gapGenrich narrow gap parameter.integer100
genrich_broad_gapGenrich broad gap parameter.integer200
save_genrich_pileupInstruct Genrich to save pileup files.booleantrue
save_genrich_pvaluesInstruct Genrich to save p-values.booleantrue
save_genrich_intervalsInstruct Genrich to save intervals.booleantrue
skip_genrichSkip Genrich peak calling.booleantrue
epic2_binsizeSize of the windows to scan the genome in epic2. Bin size is the smallest possible island.integer250
epic2_fdrIn epic2 peak calling, remove all islands with an FDR above this cutoff.number0.01
skip_dpeakSkip DANPOS2's dpeak peak calling.booleantrue
skip_dposSkip DANPOS2's dpos peak calling.booleantrue
skip_encode_pipelineSkip peak calling with the ENCODE ChIP-seq pipeline.booleantrue
ctl_depth_ratio_thresholdFor each sample, if the ratio of depth between input controls is higher than this, then a pooled input control will be used for all sample replicates.number1.2
use_best_multisummit_idrSet the IDR value for a group of multi summit peaks (a group of peaks with the same chr/start/stop but different summits) to the best value across all of these peaks. This is a work around for peak callers that don't do a good job splitting scores across multi summit peaks (e.g. MACS). If set in conjunction with --plot two plots will be created - one with alternate summits and one without. Use this option with care. See the IDR documentation for more details.booleantrue
idr_soft_thresholdReport statistics for peaks with a global IDR below this value but return all peaksnumber0.05
idr_filtering_thresholdFilter peaks with an IDR above this value.number0.05
spp_npeakThreshold on the number of peaks to call with SPP for the ENCODE-based processing.integer300000
encode_peak_max_scoreSet peaks with a score above this value to this value.number1000
xcor_exclusion_range_minMinimum fragment length to exclude when calculating cross-correlation metrics for the ENCODE-based processing.integer-500
xcor_exclusion_range_maxMaximum fragment length to exclude when calculating cross-correlation metrics for the ENCODE-based processing. If not provided max(params.read_length + 10, 100) will be used.integer
skip_epic2Skip epic2 peak calling.booleantrue
skip_consenrichSkip Consenrich (Genome-wide 'consensus' epigenomic state estimates and uncertainty metrics).booleantrue
skip_maceSkip MACE peak calling.booleantrue
skip_macs3Skip MACS3 peak calling.booleanfalse
seacr_peak_thresholdSEACR 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 falsenumber0.05
seacr_normSEACR normalization. (accepted: non|norm)stringnon
seacr_stringencySEACR stringency. (accepted: stringent|relaxed)stringstringent
mace_kmer_sizeSet the k-mer size for MACE peak calling. Kmer size [6,12] to correct nucleotide composition bias. kmerSize < 0.5*read_length. Larger KmerSize might make program slower. Set kmerSize = 0 to turn off nucleotide compsition bias correction. default=6. See the MACE documentation for more details.integer
mace_binChromosome chunk size. Each chomosome will be cut into small chunks of this size. Decrease chunk size will save more RAM. default=100000 (bp). See the MACE documentation for more details.integer
mace_depthReference reads count (default = 10 million). Sequencing depth will be normailzed to this number, so that wig files are comparable between replicates. See the MACE documentation for more details.integer
mace_qcutphred scaled mapping quality threshhold to determine “uniqueness” of alignments. default=30. See the MACE documentation for more details.number
mace_norm_methodmethods (“EM”, “AM”, “GM”, or “SNR”) used to consolidate replicates and reduce noise. “EM” = Entropy weighted mean, “AM”=Arithmetic mean, “GM”=Geometric mean, “SNR”=Signal-to-noise ratio. default=EM. See the MACE documentation for more details. (accepted: EM|AM|GM|SNR)string
mace_pvaluePvalue cutoff for border detection and subsequent border pairing. default=0.05. See the MACE documentation for more details.number
mace_max_distMaximum distance allowed for border pairing. default=100 (bp). See the MACE documentation for more details.integer
mace_fuzzy_sizePeaks (i.e. borders) located closely within this window will be merged. default=5 (bp). See the MACE documentation for more details.integer
mace_window_sizeBackground window size used to determine background signal level. default=100 (bp). See the MACE documentation for more details.integer
mace_signal_foldMinimum coverage signal used to build model (i.e. estimate optimal peak pair size). default=2.0. See the MACE documentation for more details.number
save_mace_intermedsWhether to save the intermediate files from the MACE peak calling step. These include the MACE peak files in bedGraph format.booleanfalse
skip_denopaSkip deNOPA peak calling for ATAC-seq.booleantrue

Process skipping options

Options to skip various steps within the workflow.

ParameterDescriptionTypeDefaultRequiredHidden
skip_fastqcSkip FastQC.boolean
spikein_barcode_tablePath to a tab-delimited file containing the spike-in barcode targets, ids, and sequences. See the sc_spikein_barcodes.tsv for an example. This is only useful for CUT&Tag or CUT&RUN experiments with SNAP-CUTANA™ Spike-ins (See https://support.epicypher.com/v1/docs/analyzing-snap-cutana-spike-in-controls-and-expected-results).string
skip_spikein_barcode_extractWhether to skip the extraction of spike-in barcodes from FASTQ files. This is useful for CUT&Tag or CUT&RUN experiments with SNAP-CUTANA™ Spike-ins (See https://support.epicypher.com/v1/docs/analyzing-snap-cutana-spike-in-controls-and-expected-results).boolean
skip_picard_metricsSkip Picard CollectMultipleMetrics.boolean
skip_preseqSkip Preseq.booleantrue
deseq2_vstUse vst transformation instead of rlog with DESeq2.
HelpSee DESeq2 docs.
booleantrue
skip_genes_plotprofileSkip deepTools plotProfile.booleanfalse
genes_plotprofile_modeMode to compute the matrix for deepTools plotProfile. See the deepTools documentation for more details. (accepted: scale_regions|reference_point)stringscale_regions
genes_plotprofile_ref_pointReference point for deepTools plotProfile when --genes_plotprofile_mode is reference_point. See the deepTools documentation for more details. (accepted: TSS|TES|center)stringTSS
genes_plotprofile_region_body_lengthRegion body length (in bp) for deepTools plotProfile when --genes_plotprofile_mode is scale_regions. See the deepTools documentation for more details.integer3000
genes_plotprofile_upstreamUpstream distance (in bp) from the reference point for deepTools plotProfile when --genes_plotprofile_mode is reference_point. See the deepTools documentation for more details.integer3000
genes_plotprofile_downstreamDownstream distance (in bp) from the reference point for deepTools plotProfile when --genes_plotprofile_mode is reference_point. See the deepTools documentation for more details.integer3000
genes_plotprofile_skip_zerosWhether to skip regions with zero coverage in all samples when computing the matrix for deepTools plotProfile. This is determined BEFORE any applicable pseudocount is added. See the deepTools documentation for more details.booleanfalse
skip_plot_fingerprintSkip deepTools plotFingerprint.boolean
skip_spp_qcSkip Phantompeakqualtools QC metrics and plots.boolean
skip_deseq2_qcSkip DESeq2 PCA and heatmap plotting.boolean
skip_igvSkip IGV.boolean
skip_multiqcSkip MultiQC.boolean
skip_qcSkip all QC steps except for MultiQC.boolean

SCAR-seq (partition) and OK-seq (RFD) analysis options

Options to adjust SCAR-seq and OK-seq analysis criteria.

ParameterDescriptionTypeDefaultRequiredHidden
partition_fragment_sizeFor single-end SCAR-seq or OK-seq data, the fragment size (in bp) to extend reads when calculating coverage for partition/RFD analysis. For paired-end data, coverage of intervals is calculated from the left point of a read pair to the right point.integer250
partition_window_sizeWindow/bin size (in bp) for dividing chromosomes when calculating coverage for partition/RFD analysis in SCAR-seq or OK-seq experiments. See this reference for more details.integer1000
partition_step_sizeStep size (in bp) for sliding window when calculating coverage for partition/RFD analysis in SCAR-seq or OK-seq experiments. Default is the same as --partition_window_size to create fixed-size book-ended bins instead of sliding windows.integer1000
smooth_radiusSmoothing radius for partition/RFD signal smoothing. Smoothing is computed across consecutive book-ended bins, performing a uniform blur considering the neighboring bins on each side. See this reference for more details.integer30
derivative_radiusRadius for nonparametric derivative estimation of RFD signal to detect sharp transitions between neighboring bins for initiation zone detection. See this reference for more details.integer30
zero_crossing_radiusRadius for zero-crossing detection when defining replication initiation zones. See this reference for more details.integer1
partition_rpm_cutoffRPM (reads per million) cutoff for bins to be included in downstream partition analysis. Bins with normalized read-counts above this threshold will be included. See this reference for more details.number0.3
partition_plot_rangePlot range for partition analysis visualization.integer100
partition_exclude_scaffoldsWhether to exclude scaffolds from partition plots. Scaffolds are defined as chromosomes whose name begins with 'chrUn' or contains a dot ('.').booleantrue
partition_exclude_chromosomesComma-separated list of chromosomes to exclude from partition analysis. Typically sex chromosomes and mitochondrial chromosomes are excluded. See this reference for more details.stringchrX,chrY,chrM
save_partition_intermedsWhether to save the intermediate files from the partition/RFD analysis step.booleanfalse

Institutional config options

Parameters used to describe centralised config profiles. These should not be edited.

ParameterDescriptionTypeDefaultRequiredHidden
custom_config_versionGit commit id for Institutional configs.stringmastertrue
custom_config_baseBase directory for Institutional configs.
HelpIf you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.
stringhttps://raw.githubusercontent.com/nf-core/configs/mastertrue
config_profile_nameInstitutional config name.stringtrue
config_profile_descriptionInstitutional config description.stringtrue
config_profile_contactInstitutional config contact information.stringtrue
config_profile_urlInstitutional config URL link.stringtrue

Generic options

Less common options for the pipeline, typically set in a config file.

ParameterDescriptionTypeDefaultRequiredHidden
helpDisplay help text.booleantrue
publish_dir_modeMethod used to save pipeline results to output directory. (accepted: symlink|rellink|link|copy|copyNoFollow|move)
HelpThe Nextflow publishDir option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See Nextflow docs for details.
stringcopytrue
fingerprint_binsNumber of genomic bins to use when calculating deepTools fingerprint plot.integer500000true
email_on_failEmail address for completion summary, only when pipeline fails.
HelpAn email address to send a summary email to when the pipeline is completed - ONLY sent if the pipeline does not exit successfully.
stringtrue
plaintext_emailSend plain-text email instead of HTML.booleantrue
max_multiqc_email_sizeFile size limit when attaching MultiQC reports to summary emails.string25.MBtrue
monochrome_logsDo not use coloured log outputs.booleantrue
multiqc_configCustom config file to supply to MultiQC.stringtrue
validate_paramsBoolean whether to validate parameters against the schema at runtimebooleantruetrue

Other parameters

ParameterDescriptionTypeDefaultRequiredHidden
multiqc_logostring
multiqc_methods_descriptionstring
hook_urlstring
versionboolean
pipelines_testdata_base_pathstringhttps://raw.githubusercontent.com/nf-core/test-datasets/
local_testdata_base_pathstring/maps/projects/dan1/data/Groth_group/SRP/crepas_testdata/
trace_report_suffixstring2025-08-03_12-45-27

Updating the pipeline

When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline:

nextflow pull grothlab/crepas

Reproducibility

Running a specific version of the pipeline (-r)

It is a good idea to specify a pipeline version when running the pipeline on your data. This ensures that a specific version of the pipeline code and software are used when you run your pipeline. If you keep using the same tag, you'll be running the same version of the pipeline, even if there have been changes to the code since.

To run a specific version of the pipeline, use the -r option. For example:

  • With a release tag from the pipeline's repository:

    nextflow run grothlab/crepas \
      -r 1.1.12
  • With a commit ID (revision number) from the pipeline's repository:

    nextflow run grothlab/crepas \
      -r a6840348453bebe2cb49384f8522bbfb20d7087b

    You can also use the short version of the commit ID:

    nextflow run grothlab/crepas \
      -r a684034
  • With a git branch from the pipeline's repository:

    nextflow run grothlab/crepas \
      -r dev

The version number you use will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future. For example, at the bottom of the MultiQC reports.

Sharing and reusing parameter files (-params-file)

To further assist in reproducibility, you can use share and re-use parameter files to repeat pipeline runs with the same settings without having to write out a command with every single parameter.

Core Nextflow arguments

-profile

Use this parameter to choose a configuration profile. Profiles can give configuration presets for different compute environments.

Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Shifter, Charliecloud, Apptainer, Conda) - see below.

We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported.

The pipeline also dynamically loads configurations from https://github.com/nf-core/configs when it runs, making multiple config profiles for various institutional clusters available at run time. For more information and to see if your system is available in these configs please see the nf-core/configs documentation.

Note that multiple profiles can be loaded, for example: -profile test,docker - the order of arguments is important! They are loaded in sequence, so later profiles can overwrite earlier profiles.

If -profile is not specified, the pipeline will run locally and expect all software to be installed and available on the PATH. This is not recommended, since it can lead to different results on different machines dependent on the computer enviroment.

  • test
    • A profile with a complete configuration for automated testing
    • Includes links to test data so needs no other parameters
  • docker
    • A generic configuration profile to be used with Docker
  • singularity
    • A generic configuration profile to be used with Singularity
  • podman
    • A generic configuration profile to be used with Podman
  • shifter
    • A generic configuration profile to be used with Shifter
  • charliecloud
    • A generic configuration profile to be used with Charliecloud
  • apptainer
    • A generic configuration profile to be used with Apptainer
  • conda
    • A generic configuration profile to be used with Conda. Please only use Conda as a last resort i.e. when it's not possible to run the pipeline with Docker, Singularity, Podman, Shifter, Charliecloud, or Apptainer.

-resume

Specify this when restarting a pipeline. Nextflow will use cached results from any pipeline steps where the inputs are the same, continuing from where it got to previously. For input to be considered the same, not only the names must be identical but the files' contents as well. For more info about this parameter, see this blog post.

You can also supply a run name to resume a specific run: -resume [run-name]. Use the nextflow log command to show previous run names.

-c

Specify the path to a specific config file (this is a core Nextflow command). See the nf-core website documentation for more information.

Custom configuration

Resource requests

Whilst the default requirements set within the pipeline will hopefully work for most people and with most input data, you may find that you want to customise the compute resources that the pipeline requests. Each step in the pipeline has a default set of requirements for number of CPUs, memory and time. For most of the steps in the pipeline, if the job exits with any of the error codes specified here it will automatically be resubmitted with higher requests (2 x original, then 3 x original). If it still fails after the third attempt then the pipeline execution is stopped.

To change the resource requests, please see the max resources and tuning workflow resources section of the nf-core website.

Custom Containers

In some cases you may wish to change which container or conda environment a step of the pipeline uses for a particular tool. By default nf-core pipelines use containers and software from the biocontainers or bioconda projects. However in some cases the pipeline specified version maybe out of date.

To use a different container from the default container or conda environment specified in a pipeline, please see the updating tool versions section of the nf-core website.

Custom Tool Arguments

A pipeline might not always support every possible argument or option of a particular tool used in pipeline. Fortunately, nf-core pipelines provide some freedom to users to insert additional parameters that the pipeline does not include by default.

To learn how to provide additional arguments to a particular tool of the pipeline, please see the customising tool arguments section of the nf-core website.

nf-core/configs

In most cases, you will only need to create a custom config as a one-off but if you and others within your organisation are likely to be running nf-core pipelines regularly and need to use the same settings regularly it may be a good idea to request that your custom config file is uploaded to the nf-core/configs git repository. Before you do this please can you test that the config file works with your pipeline of choice using the -c parameter. You can then create a pull request to the nf-core/configs repository with the addition of your config file, associated documentation file (see examples in nf-core/configs/docs), and amending nfcore_custom.config to include your custom profile.

See the main Nextflow documentation for more information about creating your own configuration files.

If you have any questions or issues please send us a message on Slack on the #configs channel.

Azure Resource Requests

To be used with the azurebatch profile by specifying the -profile azurebatch. We recommend providing a compute params.vm_type of Standard_D16_v3 VMs by default but these options can be changed if required.

Note that the choice of VM size depends on your quota and the overall workload during the analysis. For a thorough list, please refer the Azure Sizes for virtual machines in Azure.

Running in the background

Nextflow handles job submissions and supervises the running jobs. The Nextflow process must run until the pipeline is finished.

The Nextflow -bg flag launches Nextflow in the background, detached from your terminal so that the workflow does not stop if you log out of your session. The logs are saved to a file.

Alternatively, you can use screen / tmux or similar tool to create a detached session which you can log back into at a later time.

Some HPC setups also allow you to run nextflow within a cluster job submitted your job scheduler (from where it submits more jobs). For example, the nextflow head job can be submitted to SLURM by saving the following script:

#!/bin/bash

#SBATCH --job-name=crepas_job        # specify a name for the job
#SBATCH --mail-type=END,FAIL        # mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=NONE            # email address to receive the notifications
#SBATCH -c 1                        # number of requested cores for the Nextflow head job
#SBATCH --mem=4gb                   # total requested RAM for the Nextflow head job
#SBATCH --time=2-00:00:00           # max. running time of the pipeline job, format in D-HH:MM:SS
#SBATCH --output=crepas_job.%j.log   # standard output and error log, '%j' gives the job ID

# Create an output directory for the pipeline run if it does not exist
mkdir -p <path_to_output_directory>
cd <path_to_output_directory>

# Run the pipeline
nextflow run grothlab/crepas \
    -r main \
    -profile test_scarseq \
    --outdir <path_to_output_directory>

And then, submitting the job to the queue with:

sbatch crepas_job.sh

Nextflow memory requirements

In some cases, the Nextflow Java virtual machines can start to request a large amount of memory. We recommend adding the following line to your environment to limit this (typically in ~/.bashrc or ~./bash_profile):

NXF_OPTS='-Xms1g -Xmx4g'

Examples

Setting the environment

Before analyzing any kind of data, we need to install or load Nextflow and a container runtime, as explained in the Quick start section of the README.

First, we create a directory structure for our project:

mkdir ${HOME}/projects/project1

Analyzing OK-seq data

Downloading the data

For this example, we will replicate the initiation zone and fork directionality analyses from the following article:

Petryk, N., Dalby, M., Wenger, A., Stromme, C. B., Strandsby, A., Andersson, R., & Groth, A. (2018). MCM2 promotes symmetric inheritance of modified histones during DNA replication. Science, 361(6409), 1389–1392. https://doi.org/10.1126/science.aau0294

First, we need to download the OK-seq data. We will do so using the nf-core/fetchngs pipeline, which works very well to fetch metadata and raw FastQ files from public databases, including the Gene Expression Omnibus (GEO).

We create a subdirectory for nf-core/fetchngs files:

mkdir -p ${HOME}/projects/project1/fetchngs/
Input IDs file

We then create a CSV file with the SRA IDs of the samples we want to download. In this case, we want the OK-seq data from the Petryk et al. 2018 paper, which is available under accession SRR7535256. Therefore, the file CSV should look like this:

SRR7535256

And we save it as project1.fetchngs.input.csv in the fetchngs subdirectory.

SBATCH script

Now, we will create an SBATCH script to submit the job to the cluster queue. You can use the following template.

#!/bin/bash

#SBATCH --job-name=FETCHNGS            # specify a name for the job
#SBATCH --mail-type=END,FAIL           # mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=NONE               # email address to receive the notifications
#SBATCH -c 1                           # number of requested cores for the Nextflow head job
#SBATCH --mem=4gb                      # total requested RAM for the Nextflow head job
#SBATCH --time=2-00:00:00              # max. running time of the pipeline job, format in D-HH:MM:SS
#SBATCH --output=fetchngs_job.%j.log   # standard output and error log, '%j' gives the job ID

# Load the required modules
module load openjdk/20.0.0 nextflow/25.04.4 singularity/3.8.7

# Create an output directory for the pipeline's output
mkdir -p ${HOME}/projects/project1/fetchngs/output/
cd ${HOME}/projects/project1/fetchngs/output/

# Run the pipeline
nextflow run nf-core/fetchngs \
    -r 1.11.0 \
    -profile ku_sund_danhead_mod \
    --input ${HOME}/projects/project1/fetchngs/project1.fetchngs.input.csv \
    --outdir ${HOME}/projects/project1/fetchngs/output/

Then place the script in your project directory, e.g., as project1.fetchngs.sbatch.sh.

Your folder structure should so far look something like this:

projects/
└── project1/
    └── fetchngs/
        ├── project1.fetchngs.input.csv
        └── project1.fetchngs.sbatch.sh
Submitting the job

We can then submit the job to the queue with:

cd ${HOME}/projects/project1/fetchngs/
sbatch project1.fetchngs.sbatch.sh

You can then monitor the job status using squeue or by looking at the fetchngs_job.%j.log file in the fetchngs directory. You can also check the .nextflow.log file in the fetchngs/output/ directory for more detailed logs.

When this job is finished, you should have the raw FastQ file SRX4403092_SRR7535256.fastq.gz downloaded in the fetchngs/output/fastq/ subdirectory.

Running crepas

Now that we have the data, we can run the crepas pipeline to analyze it. We will create another subdirectory for the crepas files:

mkdir -p ${HOME}/projects/project1/crepas/
Input samplesheet CSV

Then, we need to create a samplesheet CSV file for the crepas pipeline. This file should contain information about the samples we want to analyze. For this example, we will create a file called project1.crepas.samplesheet.csv in the crepas subdirectory with the following content:

sample,fastq_1,biological_replicate,exp_type,strandedness
SRR7535256,<PATH>/projects/project1/fetchngs/output/fastq/SRX4403092_SRR7535256.fastq.gz,1,OK-seq,forward
Parameter YAML file

Next, since the crepas pipeline has many more parameters, we will compile them into a parameter YAML file for easier management. The file should contain:

input: OK_seq_SRR7535256.crepas.samplesheet.csv
outdir: output_mm10_bowtie2
bowtie2_index: /reference_files/GRCm38/bowtie2_2.5.4_index
fasta: /reference_files/GRCm38/GRCm38.primary_assembly.genome.fa.gz
gtf: /reference_files/GRCm38/gencode.vM25.primary_assembly.annotation.gtf.gz
blacklist: /reference_files/GRCm38/GRCm38.ENCODE_ENCFF999QPV.Kundaje.unified_Excludable.bed.gz
aligner: bowtie2
genome: GRCm38
seq_platform: ILLUMINA
read_length: 75
fragment_size: 200
partition_fragment_size: 200
skip_macs3: true
multiqc_title: OK_seq_SRR7535256
trim_full_length: false
trim_minimum_length: 10
trim_maximum_length: 70
trim_nextseq: 0
trim_stringency: 1
trim_error_rate: 0.1
trim_q_cutoff: 20
skip_flT3: true
skip_flTbl: false
save_partition_intermeds: true
skip_plot_profile: true
skip_plot_fingerprint: true
skip_spp: true

Save this file as project1.crepas.params.yaml in the crepas/ subdirectory.

SBATCH script

Now, we will create an SBATCH script to submit the crepas job to the cluster queue. You can use the following template.

Submitting the job

Analyzing ChIP-seq data

For this example, we will analyze a subset of the ChIP-seq data from the following article:

Flury, V., Reverón-Gómez, N., Alcaraz, N., Stewart-Morgan, K. R., Wenger, A., Klose, R. J., & Groth, A. (2023). Recycling of modified H2A-H2B provides short-term memory of chromatin states. Cell, 186(5), 1050-1065.e19. https://doi.org/10.1016/j.cell.2023.01.007

Downloading the data

Now we need to download the ChIP-seq data. We will do so using the nf-core/fetchngs pipeline, which works very well to fetch metadata and raw FastQ files from public databases.

Running crepas

Relevant parameters

WIP

Analyzing ChOR-seq data

WIP

Analyzing SCAR-seq data

WIP

Analyzing ATAC-seq data

WIP

Analyzing ChIP-exo data

WIP

View this page's source on GitHub