bam2peaks -nf

October 7, 2024 ยท View on GitHub

Nextflow pipeline for peaks calling with MACS

Workflow representation

Description

Nextflow pipeline designed for peak calling using MACS and IDR, coupled with QC generation using deeptools. The saturation option generates peaks by successively considering increasing percentages of the total reads, repeating the operation multiple times within the range of 0.05 to 0.95.

Dependencies

  1. Nextflow : for common installation procedures see the IARC-nf repository.

MACS

  1. MACS2 or MACS3

IDR (Irreproducible Discovery Rate)

  1. IDR

Deeptools

  1. Deeptools

A conda receipe, and docker and singularity containers are available with all the tools needed to run the pipeline (see "Usage")

Input

TypeDescription
--input_fileinput tabulation-separated values file with columns sample (sample name), tag (short name for figures), bam (bam file path) and group (group), for chip mode, you must also provide input : 0 for normal samples and 1 for input sample

eg:

sampletagbamgroupinput
SAM015S15S15.bam10
SAM016S16S16.bam10
SAM010S10S10.bam11

Parameters

NameExample valueDescription
--refhg38Reference fasta file hg19, hg38 or mm10'
--gencodegencode.bedgencode file
NameDefault valueDescription
--modeatacThere is two mode : atac or chip, chip require "input" sample(s)
--output_folderbam2peaksOutput folder name
--cpu16number of CPUs
--mem16memory
--extsize150MACS extsize : extendsize of peaks to to fix-sized fragments.

Flags are special parameters without value.

NameDescription
--helpprint usage and optional parameters
--broadCompute broadpeaks instead of narrowpeaks
--ignoreDuplicatesIgnore duplicates reads
--saturationRun saturation process

Usage

To run the pipeline for ATAC, one can type:

nextflow run iarcbioinfo/bam2peaks-nf -r latest -profile singularity --input_file input.tsv --ref hg38 --gencode gencode.bed --output_folder output --ignoreDuplicates

To run the pipeline without singularity just remove "-profile singularity". Alternatively, one can run the pipeline using a docker container (-profile docker) the conda receipe containing all required dependencies (-profile conda).

Chip-seq mode

To use the pipeline for Chip-seq, add the --chip flag :

nextflow run iarcbioinfo/bam2peaks-nf -r latest -profile singularity --input_file input.tsv --ref hg38 --gencode gencode.bed --output_folder output --mode chip --broad --extsize 320

Output

TypeDescription
bw/Outputs of bamCoverage in bigWig format
Counts/With --saturation return the number of reads for each subsets
PeaksPeaks computed by MACS
Peaks_intersectPeaks intersections computed by idr
QCsdeeptools graphics
Saturation_peaksWith --saturation, all peaks files for each subsets

Contributions

NameEmailDescription
Vincent CahaisCahaisV@iarc.who.intDeveloper to contact for support
Claire RenardRenardc@iarc.who.intDeveloper