1 of 29

Enrichment visualization and differential analysis of chromatin accessibility (ATAC-seq) in MCF7 vs. MCF10A

Mai Tam Pham – 29 March 2025

2 of 29

Objectives

We only examine chr22:17,000,000 – 52,000,000 (GRCh38)

  • Task 1:

Detect differential accessibility regions in MCF7 vs. MCF10A

Tools: csaw R/Bioconductor package (https://bioconductor.org/books/release/csawBook/)

  • Task 2:

Visualize enrichment ATAC-seq signals of

    • Differential accessibility regions in MCF7 vs. MCF10A (Visualization example)
    • Transcription start site (TSS) and gene regions (transcription start/end site - TSS/TES) (Real-case example)

Tools:

deeptools (https://deeptools.readthedocs.io/en/latest/)

IGV (https://igv.org/doc/desktop/#)

Note: we can do the same thing with ChIP-seq data

3 of 29

Datasets

We only examine chr22:17,000,000 – 52,000,000 (hg19 - Gencode)

For task 1:

  • Input: Pre-processed .bam/.bai files (2 reps for each cell line)
  • Output: Differential accessibility regions (direction – upReg/downReg, logFC, FDR…)

For task 2:

  • Input:
    • Processed .bam/.bai files (2 reps for each cell line)
    • BED3 file contains differential accessibility regions
    • BED6 file contain gene regions (TSS/TES) with strand specified
  • Output:
    • Score matrix
    • Profile/heatmap plot

4 of 29

ATAC-seq overview

  • Nucleosome-free regions (open chromation)
    • Short fragments (50-100bp)
    • Active enhancers/promoters, TF-binding sites, TF footprint
  • Nucleosome-bound regions
    • Long fragments (200-600bp)
    • Poised promoters/enhancers
  • Closed chromatin (heterochromatin)
    • Very low/no reads
    • Telomere, centromeres, inactive genes

5 of 29

ATAC-seq analysis workflow

Raw FASTQ

Processed FASTQ

Raw BAM

Processed BAM

  • QC - FastQC
  • Adapter (Nextera Transposase sequence)/read trimming - Cutadapt
  • Alignment – bowtie2
  • Remove reads mapping to ChrM + multimapped reads – samtools view
  • Mark duplicates – Picard MarkDuplicates
  • Remove reads in blacklist regions – bedtools intersect
  • Shift read coordinates – alignmentSieve --ATACshift (optional for TFBS analysis)

Downstream (fundamental) analysis

Peak calling

Differential accessibility regions

Enrichment ATAC-seq signal visualization

bamToBigWig

macs2

csaw

deeptools bamCoverage

  • deeptools computeMatrix
  • deeptools plotProfile/plotHeatmap

Task 1

Task 2

Other (advanced) analysis:

  • Peak annotation (MACS2, CHIPseekers)
  • Known/De novo motif discovery (HOMER)
  • Peak calling/Nucleosome positioning detection (HMMRATAC – HMM-based FL modeling)
  • TF footprint (HINT-ATAC – HMM-based modeling)

6 of 29

Code and results – Task 1 – Differential accessibility regions

Step 1: Load sorted and indexed BAM files (require .bai files in the same location as .bam)

Step 2: Prepare design matrix and contrast expression (for differential analysis)

  • DiffBind, DBChiP: perform differential binding analysis based on read counts for peak intervals identified by MACS
  • csaw: uses read counts of sliding windows across the genome (call differential directly from .bam files)

Note: These tools are designed for calling differential binding of ChIP-seq, but can also use for ATAC-seq

7 of 29

Step 3: Summarize window-level read counts

SE reads

PE reads

8 of 29

  • readParam(): specify read features (e.g. minMQS, ignore dup reads…) to be counted
  • windowCounts(): use sliding-window approach to count fragments for a set of .bam files
  • Choice of window width: 5-10bp for TF, >=150bp for histone ChIP-seq or ATAC-seq (to account for the length of DNA wrapped up nucleosome)
  • assay(data): a matrix with col as library (sample), rows as fragment counts for each window
  • rowRanges(data): genomic locations of each window
  • data$totals: total number of fragment counts of each library

9 of 29

  • windowCounts(): fragment counts for background (2000bp in width)
  • to estimate background abundance

  • filterWindowsGlobal(): Compare background abundance (binned) with window-based abundance (data)
  • to determine which window is driven by background enrichment
  • reduce false positives

  • log2(3): cutoff filtering option

Filtering options:

By count size, by proportion, by local enrichment, by global enrichment, with negative controls, by prior information

Normalization is necessary to remove library-specific biases (e.g. different sequencing depth) prior to differential analysis

10 of 29

Step 4: Detect differential accessibility regions

11 of 29

G1_rep1

G1_rep2

G2_rep1

G2_rep2

23

25

78

90

1

4

7

10

100

200

76

150

Feature

(Window)

Window 1

Tagwise (feature-specific) dispersion follows Chi-squared distribution

NB distribution X~NB(mean,dispersion)

Var(X) = mean(X)+mean^2(X)*1/dispersion

Mean1, var1, dispersion1

Mean2, var2, dispersion2

12 of 29

GLM-NB distribution model is used to account for overdispersion (the nature of count data)

F (QL F-statistic): higher means stronger differential

13 of 29

14 of 29

15 of 29

Code and results – Task 2.1 Visualization example of enrichment signals of differential accessibility regions

16 of 29

Step 1: Prepare score (.bw/.bigwig) files from .bam files (require .bai files at the same location as .bam files

17 of 29

Step 2: Prepare region files (BED3/BED6 with strand specified)

18 of 29

INFO row

Regions

Step 3: Construct a score matrix (rows as regions, columns as bin-based scores)

19 of 29

Step 4: Create heatmap plot based on the computed matrix score

Scenario 1: Enrichment heatmap plot for only 2 samples (MCF7_rep1 and MCF10A_rep1)

20 of 29

Scenario 2: Enrichment heatmap plot for 4 samples (MCF7_rep1, MCF7_rep2, MCF10A_rep1, MCF10A_rep2)

21 of 29

Code and results – Task 2.2 Visualization of ATAC-seq enrichment signals in TSS and gene regions

22 of 29

Scenario 1: Enrichment ATAC-seq signal around TSS

23 of 29

Scenario 2: Enrichment ATAC-seq signal along gene regions (TSS/TES)

24 of 29

Task 2.3 ATAC-seq peak/alignment visualization using IGV

25 of 29

TSS+/-8000bp

26 of 29

TSS+/-500bp

27 of 29

TSS+/-200bp

28 of 29

TSS+/-200bp

29 of 29

References