niekwit/atac-seq

None

Overview

Latest release: v0.1.1, Last update: 2026-10-10

Share link: https://snakemake.github.io/snakemake-workflow-catalog?wf=niekwit/atac-seq

Quality control: linting: failed formatting: passed

Wrappers: bio/fastqc bio/multiqc bio/picard/markduplicates bio/samtools/index bio/samtools/stats

Deployment

Step 1: Install Snakemake and Snakedeploy

Snakemake and Snakedeploy are best installed via the Conda package manager. It is recommended to install conda via Miniforge. Run

conda create -c conda-forge -c bioconda -c nodefaults --name snakemake snakemake snakedeploy

to install both Snakemake and Snakedeploy in an isolated environment. For all following commands ensure that this environment is activated via

conda activate snakemake

For other installation methods, refer to the Snakemake and Snakedeploy documentation.

Step 2: Deploy workflow

With Snakemake and Snakedeploy installed, the workflow can be deployed as follows. First, create an appropriate project working directory on your system and enter it:

mkdir -p path/to/project-workdir
cd path/to/project-workdir

In all following steps, we will assume that you are inside of that directory. Then run

snakedeploy deploy-workflow https://github.com/niekwit/atac-seq . --tag v0.1.1

Snakedeploy will create two folders, workflow and config. The former contains the deployment of the chosen workflow as a Snakemake module, the latter contains configuration files which will be modified in the next step in order to configure the workflow to your needs.

Step 3: Configure workflow

To configure the workflow, adapt config/config.yml to your needs following the instructions below.

Step 4: Run workflow

The deployment method is controlled using the --software-deployment-method (short --sdm) argument.

To run the workflow using apptainer/singularity, use

snakemake --cores all --sdm apptainer

To run the workflow using a combination of conda and apptainer/singularity for software deployment, use

snakemake --cores all --sdm conda apptainer

To run the workflow with automatic deployment of all required software via conda/mamba, use

snakemake --cores all --sdm conda

Snakemake will automatically detect the main Snakefile in the workflow subfolder and execute the workflow module that has been defined by the deployment in step 2.

For further options such as cluster and cloud execution, see the docs.

Step 5: Generate report

After finalizing your data analysis, you can automatically generate an interactive visual HTML report for inspection of results together with parameters and code inside of the browser using

snakemake --report report.zip

Configuration

The following section is imported from the workflow’s config/README.md.

Workflow overview

This workflow analyses paired-end ATAC-seq data following the ENCODE ATAC-seq pipeline (v2.2.3) and checks the results against the ENCODE ATAC-seq data standards. Samples of the same condition are treated as biological replicates of one ENCODE experiment.

  1. Download genome sequence and annotation from Ensembl, and the ENCODE exclusion list (blacklist), TSS file and annotated regions (GRCh38, mm10; mm39: ENCODE mm10 exclusion list and TSS file lifted to mm39; other genomes: blacklist from AnnotationHub)

  2. Quality control of reads (FastQC)

  3. Adapter trimming (cutadapt -e 0.1 -m 5, Nextera adapter)

  4. Alignment (bowtie2 -k 5 -X2000 --mm)

  5. Removal of unmapped, unpaired and multimapping (> 4 alignments) reads (samtools, pysam)

  6. Duplicate marking (Picard MarkDuplicates) and removal of duplicates and mitochondrial reads

  7. Conversion to Tn5 shifted (+4/-5 bp) tagAlign files of both mates

  8. Pseudoreplication of each replicate, and pooling of the replicates and of the pseudoreplicates per condition

  9. Peak calling (MACS2 callpeak -p 0.01 --shift -75 --extsize 150 --nomodel --keep-dup all --call-summits), keeping the top 300,000 peaks

  10. Removal of peaks in blacklisted regions and on non-standard chromosomes

  11. Reproducibility: IDR (threshold 0.05) and naive overlap of all pairs of replicates, of the pseudoreplicates of each replicate and of the pooled pseudoreplicates, giving the optimal and conservative peak set of each condition

  12. Fold enrichment and p-value signal tracks (MACS2 bdgcmp) of each replicate and condition

  13. QC: library complexity (NRF, PBC1, PBC2), fraction of mitochondrial reads, FRiP, TSS enrichment (calculated as by ENCODE), fragment length distribution and nucleosomal pattern (Picard CollectInsertSizeMetrics), GC bias (Picard CollectGcBiasMetrics), fingerprint and Jensen-Shannon distance (deepTools plotFingerprint), fraction of reads in DHS, promoters, enhancers and blacklisted regions, rescue and self-consistency ratios, ataqv, MultiQC

  14. Annotation of the optimal peak set (ChIPseeker)

Not included from the ENCODE pipeline: its optional (off by default) preseq, cross-correlation and Roadmap comparison, its HTML/JSON QC report and the bigBed/starch/hammock peak formats. The fraction of reads in DHS, promoters and enhancers is only calculated for GRCh38 and mm10 (mm38), for which ENCODE provides these regions. TSS enrichment uses ENCODE’s TSS files (one TSS per protein coding gene; GRCh38, mm10, and for mm39 the mm10 file lifted to mm39), so that scores can be compared with the ENCODE thresholds. For other genomes it uses the 5’ end of each Ensembl protein coding gene.

Running the workflow

Input data

Paired-end reads go in reads/{sample}_R1_001.fastq.gz and reads/{sample}_R2_001.fastq.gz. The sample sheet config/samples.csv has the following layout:

sample

condition

WT_1

wt

WT_2

wt

KO_1

ko

KO_2

ko

Sample names may only contain letters, numbers and underscores, and must end with _[0-9]. The replicates of a condition are numbered (rep1, rep2, …) in the order of the sample sheet.

Parameters

The defaults in config/config.yaml are those of the ENCODE pipeline.

parameter

details

default

genome

ensembl

genome build: hg19, hg38, mm38, mm39 or dm6

mm39

release

Ensembl release

115

mito_chr_name

name of the mitochondrial chromosome

MT

cutadapt

adapter_r1, adapter_r2

adapter sequences of read 1 and read 2

CTGTCTCTTATA

extra

other cutadapt arguments

-e 0.1 -m 5

bowtie2

multimapping

maximum number of alignments of a read; 0: filter on MAPQ instead

4

extra

other bowtie2 arguments

-X2000 –mm

filter

mapq_thresh

minimum MAPQ (only used when multimapping is 0)

30

filter_chrs

chromosomes whose reads are removed after deduplication

[MT]

subsample_reads

number of reads to subsample each replicate to (0: none)

0

macs2

gsize

effective genome size (hs, mm or a number)

mm

pval_thresh

p-value threshold

0.01

smooth_win

smoothing window (--extsize; --shift is -smooth_win/2)

150

cap_num_peak

maximum number of peaks

300000

peaks

keep_chr_regex

peaks on chromosomes not matching this (POSIX extended) regex are removed

[0-9]+|X|Y

idr

enable

run IDR (naive overlap is always run)

true

threshold

IDR threshold

0.05

pseudoreplication_random_seed

seed for pseudoreplication (0: tagAlign file size, as ENCODE)

0

Output

file

content

results/filtered/{sample}.nodup.bam

filtered, deduplicated alignments without mitochondrial reads

results/tagalign/{sample}.tagAlign.gz

Tn5 shifted reads

results/macs2/{sample}.bfilt.narrowPeak

blacklist-filtered peaks of each replicate

results/{idr,overlap}/{condition}/optimal_peak.narrowPeak

optimal reproducible peak set (ENCODE’s main output)

results/{idr,overlap}/{condition}/conservative_peak.narrowPeak

conservative reproducible peak set

results/{idr,overlap}/{condition}/optimal_peak_annotated.txt

annotated optimal peak set

results/bigwig/{sample,pooled/condition}.{fc,pval}.signal.bigwig

fold enrichment and -log10(p-value) signal tracks

results/qc/encode_qc_summary.tsv

QC metrics of each sample, graded against the ENCODE standards

results/qc/encode_reproducibility_summary.tsv

reproducibility of each condition, graded against the standards

results/multiqc/multiqc_report.html

FastQC, cutadapt, bowtie2, Picard, deepTools and samtools stats report

results/qc/{sample}.fraglen_dist.png, .nucleosomal.qc

fragment length distribution and nucleosomal QC

results/qc/{sample}.tss_enrich.png

TSS enrichment profile

results/qc/{sample}.gc_plot.png

GC bias

results/qc/{condition}.jsd_plot.png

fingerprint plot of the replicates

results/ataqv_report/index.html

ataqv report

Workflow parameters

The following table is automatically parsed from the workflow’s config.schema.y(a)ml file.

Parameter

Type

Description

Required

Default

genome

yes

. ensembl

string

genome build (hg19, hg38, mm38, mm39, dm6 or test)

yes

. release

integer

Ensembl release

yes

mito_chr_name

string

yes

cutadapt

yes

. adapter_r1

string

yes

. adapter_r2

string

yes

. extra

string

yes

bowtie2

yes

. multimapping

integer

yes

. extra

string

yes

filter

yes

. mapq_thresh

integer

yes

. filter_chrs

array

yes

subsample_reads

integer

yes

macs2

yes

. gsize

string

yes

. pval_thresh

number

yes

. smooth_win

integer

yes

. cap_num_peak

integer

yes

peaks

yes

. keep_chr_regex

string

yes

idr

yes

. enable

boolean

yes

. threshold

number

yes

pseudoreplication_random_seed

integer

yes

Linting and formatting

Linting results
 1/home/runner/work/snakemake-workflow-catalog/snakemake-workflow-catalog/.pixi/envs/default/lib/python3.13/site-packages/google/auth/transport/grpc.py:43: FutureWarning: grpcio < 1.83.0 does not support Post-Quantum Cryptography (PQC). Support for non-PQC environments is deprecated. In April 2027, google-auth will raise its minimum requirements to enforce grpcio >= 1.83.0. For more details on Google Cloud's post-quantum security migration, visit: https://cloud.google.com/security/resources/post-quantum-cryptography
 2  warnings.warn(
 3ValueError in file "/tmp/tmptzdxyf74/niekwit-atac-seq-e0131cb/workflow/rules/common.smk", line 50:
 4Following files not found:
 5reads/Rep_1_R1_001.fastq.gz
 6reads/Rep_1_R2_001.fastq.gz
 7reads/Rep_2_R1_001.fastq.gz
 8reads/Rep_2_R2_001.fastq.gz
 9reads/Rep_3_R1_001.fastq.gz
10reads/Rep_3_R2_001.fastq.gz
11reads/Rep_4_R1_001.fastq.gz
12reads/Rep_4_R2_001.fastq.gz
13  File "/tmp/tmptzdxyf74/niekwit-atac-seq-e0131cb/workflow/Snakefile", line 19, in <module>
14  File "/tmp/tmptzdxyf74/niekwit-atac-seq-e0131cb/workflow/rules/common.smk", line 50, in samples
Formatting results
All tests passed!