A Nextflow pipeline that aligns short reads to a reference genome with Bowtie2 and derives coverage tracks and, for ChIP-seq histone modification data, called peaks.
This pipeline covers the common short-read mapping and signal-generation steps used across several VEuPathDB genomic data types: origins-of-replication profiling, splice-site read mapping, and ChIP-seq (histone modification, transcription factor binding, MNase, FAIRE, and DNase experiments). Samples are aligned to a reference genome with Bowtie2, optionally deduplicated, and then compared against a paired reference/input sample with deeptools bamCompare to produce ratio coverage tracks. For ChIP-seq datasets, the pipeline additionally builds HOMER tag directories (or, for MNase data, runs DANPOS) to generate coverage bigWigs, and — for histone modification experiments with a matched input sample — calls peaks with HOMER and indexes the results as a tabix-indexed GFF for loading into VEuPathDB's genome browser and study infrastructure.
- Nextflow (DSL2)
- Docker or Singularity/Apptainer — processes run in the
veupathdb/bowtiemapping:1.0.0image plusquay.io/biocontainers/deeptools,quay.io/biocontainers/ucsc-bedgraphtobigwig,quay.io/biocontainers/ucsc-wigtobigwig,biocontainers/danpos, andbiocontainers/tabix(select the engine via thedockerorsingularityprofile/config inconf/)
nextflow run VEuPathDB/bowtie-mapping-nextflow -r main \
--input /path/to/input \
--genome /path/to/genome.fasta \
--datasetType chipSeq \
--experimentType histonemod \
--inputFileType fastq \
--hasPairedReads true \
--removePCRDuplicates true \
--outputDir /path/to/output \
-C conf/docker.config \
-resume
The pipeline has a single (default) entry point, made up of two chained sub-workflows:
bowtieMapping— readsparams.input/<samplesheetFileName>, builds a Bowtie2 index fromparams.genome, aligns each sample's reads withbowtie2, optionally removes PCR duplicates (samtools rmdup), and indexes the resulting BAM.coverageAndPeaks— pairs each sample with the reference/input sample named in itsreffield, runsdeeptools bamCompareto produce a ratio bigWig per pair, and then — whendatasetTypeischipSeq— either runs DANPOS (forexperimentType = mnase) or builds HOMER tag directories and bedGraph/bigWig coverage tracks (forhistonemod,tfbinding,faire,dnase). ForexperimentType = histonemod, peaks are additionally called with HOMERfindPeaksagainst the paired input sample and indexed as a tabix-compressed GFF.
params.input/<samplesheetFileName> is a CSV (header row skipped) with columns: sample ID, read file 1, read file 2 (if paired), and reference/input sample ID (the ref column used to pair a sample with its control for bamCompare and peak calling). Read file paths are resolved relative to params.input unless given as absolute paths.
| Parameter | Default | Description |
|---|---|---|
input |
$launchDir/input |
Directory containing the samplesheet and (relative) read files |
samplesheetFileName |
samplesheet.csv |
Samplesheet filename, resolved under input |
genome |
$launchDir/input/genome.fasta |
Reference genome FASTA used for the Bowtie2 index and chromosome sizes |
datasetType |
— | Data type being processed: originsOfReplication, spliceSites, or chipSeq |
experimentType |
— | For chipSeq datasets: histonemod, tfbinding, mnase, faire, or dnase |
inputFileType |
— | fastq or fasta, passed to bowtie2 as -q/-f |
hasPairedReads |
true |
Whether samples have paired-end (-1/-2) or single-end (-U) reads |
removePCRDuplicates |
false |
Whether to run samtools rmdup on alignments before downstream analysis |
saveAlignments |
false |
Publish indexed BAM/BAI files to outputDir |
saveCoverage |
false |
Publish bigWig coverage tracks to outputDir |
profileSetName |
— | Profile set name written into browser track/peak config output for the study loader |
gffFileName |
output.gff |
Filename used for the sorted, tabix-indexed peaks GFF |
outputDir |
$launchDir/output |
Directory published output files are written to |
Depending on datasetType/experimentType and the save* flags, published to outputDir:
- Indexed BAM alignments (
<sample>.bam,<sample>.bam.bai) whensaveAlignmentsistrue - Ratio coverage bigWigs from
bamCompare(<sample>_vs_<ref>.bw) and their browser track config, collected intometadata_ratios - For ChIP-seq data with
saveCoverageenabled: unlogged coverage bigWigs (HOMER-derived bedGraph→bigWig for most experiment types, or DANPOS smoothed signal→bigWig for MNase), with browser track configs collected intometadata_unlogged - For
histonemodexperiments: called peaks per sample (<sample>_peaks.txt), a merged tabix-indexed peaks GFF (<gffFileName>.gz/.gz.tbi), and a collectedinsert_study_resultsconfig file for loading peak results