baSeq
baSeq docs › ATAC-seq

ATAC-seq

An ATAC-seq analysis takes what an ATAC-seq pipeline leaves, peaks with their counts or fragments, checks each library against ENCODE's standards, and finds which regions open or close between conditions and the transcription factors behind them.

Start an ATAC-seq analysis

In a project, click New session and choose ATAC-seq as the kind of analysis. The sidebar marks ATAC-seq with two nucleosomes and a cut between them. ATAC-seq here is bulk: one library per sample.

What to upload

Any one of these, as nf-core/atacseq, ENCODE's pipeline or your own leave them:

  • A peak count table. featureCounts' consensus-peak table from nf-core/atacseq (consensus_peaks.mLb.clN.featureCounts.txt), with its .summary to get each sample's fraction of reads in peaks; or any table with the peaks' chromosome, start and end (or a region such as chr1:1000-1500) and a column of read counts per sample.
  • Each sample's peaks and fragments. A MACS2 or MACS3 narrowPeak (or broadPeak, or BED) and a fragment file (fragments.tsv.gz as 10x and ArchR write it, or BEDPE), ENCODE's tagAlign reads, or the aligned reads themselves (BAM, as nf-core/atacseq leaves them in bowtie2/mergedLibrary), named like the sample (S1_peaks.narrowPeak with S1.fragments.tsv.gz or S1.mLb.clN.sorted.bam). A single peak BED that names no sample is taken as the consensus.
  • A count table and fragments. The counts are the table's; the fragments add each sample's quality.

Optional: a GTF or GFF of the genes, for a genome UCSC does not have. From a BAM file each proper pair with a mapping quality of 30 or more is one fragment, shifted for Tn5 (+4 and −5 bp), and pairs flagged as duplicates are left out, as ENCODE filters them; single-end reads count at their 5′ end. The index files (.bai) are not needed. Coverage tracks (bigWig, bedGraph) cannot be read: they have lost the fragments.

From GEO: type a series number in Import from GEO on the session's start screen. The lookup offers the series' count tables and each sample's peaks, fragments, tagAlign and BAM files (not its coverage tracks), and takes each sample's condition from a characteristic you pick (Condition from), which fills the sample metadata. GSE74912, the atlas of Corces et al. (2016), comes in as one table of 590,650 peaks and 132 samples.

What the upload does

From each sample's peaks it makes one consensus as Corces et al. (2018) did for the TCGA: each summit widened to 501 bp, the scores made comparable between samples, the strongest peak kept wherever peaks overlap, and a peak kept when two samples or more call it. It then counts the Tn5 insertions in each peak (both ends of every fragment; a read's 5′ end, shifted +4 and −5 bp, for tagAlign). On the way it measures each sample's fragment sizes, its insertions within 2 kb of every transcription start site, and its share of insertions in peaks and on chrM. The genome assembly comes from how far the peaks reach on each chromosome (hg38 and hg19, mm39 and mm10 differ), and with it the RefSeq genes are fetched from UCSC.

Quality against ENCODE's standards

ATAC QC grades each library as ENCODE's ATAC-seq pipeline does: the TSS enrichment (insertions at the TSS over those 2 kb away; on hg38 concerning below 5 and ideal above 7, on mouse below 10 and above 15), the fraction of reads in peaks (acceptable above 0.2, ideal above 0.3), a nucleosome-free share of fragments and a visible mono-nucleosome peak near 200 bp, and the share of insertions on chrM. Without fragments, FRiP comes from featureCounts' summary.

Peak Sequences and Motifs also checks for GC bias: libraries differ in how well PCR covers GC-rich DNA, which shows as samples whose accessibility rises or falls with GC differently (Van den Berge et al. 2019). The motif tests match their background peaks on GC for that reason.

Size factors

Differential Accessibility offers three, because accessibility can change everywhere at once: Median of ratios (DESeq2) assumes most peaks do not change; Reads in peaks scales by each library's reads in peaks; Total fragments (with fragments uploaded) also counts the reads between peaks, which stays right when most peaks open or close together (csaw's background normalization; Reske et al. 2020). If the groups' FRiP differ a lot, compare the first and the third.

Motifs and transcription factors

The motifs are JASPAR 2024's CORE non-redundant matrices for the organism's group (879 for vertebrates). A peak holds a motif when a site on either strand scores above the motif's p-value threshold of 5×10−5, within 150 bp of the peak's centre. Motif Enrichment compares the peaks that changed with unchanged peaks of the same GC content (a one-sided Fisher test, Benjamini-Hochberg). TF Activity needs no comparison: it is chromVAR (Schep et al. 2017), each motif's accessibility in each sample against background peaks of the same GC content and accessibility, as a z-score. Related factors share motifs (the AP-1 family, the ETS family), so a hit names a family as much as a factor.

Sample metadata

As in bulk RNA-seq, the metadata editor asks for a condition per sample, and any other columns (a donor, a batch) go into the DESeq2 design. Pick the organism there: it decides the genome the motifs are read from.

Step reference

StepStageWhat it doesYou getKey inputs
Data UploadSetupReads a peak count table, or each sample's peaks and fragments, and counts the Tn5 insertions in one consensus of the peaks.Each sample's insertions in peaks, peaks detected and fraction of reads in peaks.The files.
ATAC QCQCChecks every library against ENCODE's ATAC-seq standards.The fragment-size ladder, the insertions around transcription start sites, and each sample's TSS enrichment, FRiP, nucleosome-free share and chrM share graded ideal, acceptable or concerning.None.
Peak AnnotationQCGives every peak its nearest gene and its region (promoter, UTR, exon, intron, downstream, distal), in ChIPseeker's order.Where the peaks lie, by how accessible they are; their distance to the nearest TSS; accessibility by region.Genome assembly.
Filter PeaksQCRemoves peaks on unplaced contigs and chrM, in the ENCODE blacklist, and those seen too rarely to test (edgeR's filterByExpr).What was removed and why, and the peaks' accessibility before and after.Groups, Minimum reads, Remove the ENCODE blacklist.
Sample SimilarityQCPrincipal components of the most variable peaks and the samples' correlations, clustered.A PCA and a clustered correlation heatmap.Colour by, Peaks used.
Peak Sequences and MotifsQCReads each peak's sequence from the genome and finds the JASPAR 2024 motifs in it; checks for GC bias.The peaks' GC content, each sample's accessibility by GC, and the most common motifs.None (the genome follows the assembly).
Differential AccessibilityAnalysisTests every peak for opening or closing between two groups with DESeq2, as DiffBind does, with a choice of size factors.An MA plot, a volcano labelled by nearest gene, where the changed peaks lie, and a table of every peak.Parameter to compare, two values, Size factors, Fold-change cut-off.
Accessibility HeatmapAnalysisClusters the changed (or most variable) peaks by their pattern over the samples.A heatmap with k-means clusters, each cluster's mean pattern and its regions.Groups, Peaks, Clusters.
Motif EnrichmentAnalysisFinds the motifs over-represented in the peaks that opened and in those that closed, against background peaks of the same GC content, as HOMER does.Enrichment against significance for each set, and the logos of the strongest motifs.None.
TF Activity (chromVAR)AnalysisScores every motif's accessibility in every sample as chromVAR does, and compares the groups.The motifs that vary most, a heatmap of their z-scores, and which are more active in each group.Groups, Motifs in the heatmap.
Accessibility at a GeneAnalysisDraws the peaks around the genes you name (ask in the step's text box), or around the largest changes, as genome browser tracks.The genes' exons and introns, and one track per group with each peak as high as its accessibility, the changed peaks in colour.Groups, Window; genes in your own words.
Checked on simulated libraries

The steps are tested on simulated libraries with a known answer: six samples, 420 sites with a nucleosome ladder and promoters at TSSs, 60 sites that open fourfold after treatment and hold one motif, 40 that close and hold another, written as narrowPeak, fragments.tsv.gz and a GTF. The consensus finds the sites, ATAC QC grades the libraries ideal, Differential Accessibility calls the 60 and the 40, and Motif Enrichment and TF Activity name the two motifs.

baSeq ApS · CVR 44568691 · Vermlandsgade 51, 2300 Copenhagen, Denmark · [email protected]

For research use only. Not for diagnostic or clinical decisions.