knitr::opts_chunk$set(echo = TRUE)
load("Report.Rdata")

Summary Table

Sequence files below are set as inputs of the pipeline.

filelist

Summerized infomation on sequence files has been shown showed below. You can see details in later sections

knitr::kable(x = wholesummary)

A nucleosome free region (NFR) must be present. A mononucleosome peak must be present in the fragment length distribution. These are reads that span a single nucleosome, so they are longer than 147 bp but shorter than 147*2 bp. Good ATAC-seq datasets have reads that span nucleosomes (which allows for calling nucleosome positions in addition to open regions of chromatin).

library(ggplot2)
readsCounts<-getReportVal(atacProcs$fragLenDistr,"readsCounts")
ggplot(readsCounts[1:1000,], aes(length,counts))+geom_path(color="Red")+xlab("Fragment length (bp)")+ylab("Read counts") + theme_bw() + theme(panel.grid =element_blank()) + geom_vline(xintercept = c(147,294), linetype=2) + annotate("text", x = 147, y = max(readsCounts[1:1000,2]),label="147bp") + annotate("text", x = 147*2, y = max(readsCounts[1:1000,2]),label="147bp*2")+ labs(title = "Fragment Length Distribution") + theme(plot.title = element_text(hjust = 0.5))

Sequence Statistics

FastQC

Quality control for the sequence data

QC_path <- getReportVal(atacProcs$atacQC,"pdf")

Click to Visit Report

Remove adapter

The adapter sequence are shown below. For paired end reads, if adapters were not setted, the adapters below are identified by AdapterRemoval.

knitr::kable(getReportVal(atacProcs$removeAdapter,"adapters"))

The statistic of adapter removing are show below.

knitr::kable(getReportVal(atacProcs$removeAdapter,"statistics"))

For detail, you can visit Website of AdapterRemoval on Github.

Reads Alignment Statistics

Bowtie2 alignment log

getReportVal(atacProcs$bowtie2Mapping,"detail")

Library complexity

knitr::kable(x = getReportVal(atacProcs$libComplexQC,"report"))

The annotation you can see in section 1.

Filtering statistics

knitr::kable(x = filtstat)

Fragment size distribution

library(ggplot2)
load("Report.Rdata")
readsCounts<-getReportVal(atacProcs$fragLenDistr,"readsCounts")
ggplot(readsCounts[1:1000,], aes(length,counts))+geom_path(color="Red")+xlab("Fragment length (bp)")+ylab("Read counts") + theme_bw() + theme(panel.grid =element_blank()) + labs(title = "Fragment Length Distribution") + theme(plot.title = element_text(hjust = 0.5))

library(stats)
strength<-Mod(fft(readsCounts$counts))/length(readsCounts$counts)
periodx<-length(readsCounts$counts)/(1:(length(readsCounts$counts)-1))
strength<-strength[2:length(strength)]

rs1<-as.data.frame(cbind(periodx[periodx<20&periodx>2],strength[periodx<20&periodx>2],0))
rs2<-as.data.frame(cbind(periodx[periodx<400&periodx>2],strength[periodx<400&periodx>2],1))
rs<-rbind(rs1,rs2)
colnames(rs)<-c("period","strength","check")

g1<-ggplot(rs[rs["check"]==0,]) + geom_vline(xintercept = 10.4, linetype=2)+ geom_line(aes(x=period,y=strength),color="Red")+ theme_bw() + theme(panel.grid =element_blank()) + annotate("text", x = 10.4, y = max(rs[rs["check"]==0,2]), label = "10.4bp") +xlab("period") + ylab("strength")+ labs(title = "the Pitch of the DNA Helix") + theme(plot.title = element_text(hjust = 0.5))

g2<-ggplot(rs[rs["check"]==1,]) + geom_vline(xintercept = 186, linetype=2)+ geom_line(aes(x=period,y=strength),color="Red")+ theme_bw() + theme(panel.grid =element_blank()) + annotate("text", x = 186, y = max(rs[rs["check"]==1,2]), label = "186bp") +xlab("period") + ylab("strength")+ labs(title = "Nucleosome") + theme(plot.title = element_text(hjust = 0.5))
library(gridExtra)
grid.arrange(g1, g2, ncol=2)

TSS enrichment

The nucleosome free reads (<100bp) and monnucleosome span reads (180~247bp) enrichment around transcription starting site (TSS) are shown below.

library(ggplot2)
load("Report.Rdata")
df<-getReportVal(atacProcs$tssqc100,"tss")
g1<-ggplot(df,aes(pos,counts))+geom_line()+ geom_vline(xintercept = 0, linetype=2)+xlab("upstream<-TSS->downstream")+ylab("reads count")+theme_bw() + theme(panel.grid =element_blank()) + labs(title = "Nucleosome Free Reads") + theme(plot.title = element_text(hjust = 0.5))
df<-getReportVal(atacProcs$tssqc180_247,"tss")
g2<-ggplot(df,aes(pos,counts))+geom_line()+ geom_vline(xintercept = 0, linetype=2)+xlab("upstream<-TSS->downstream")+ylab("reads count")+theme_bw() + theme(panel.grid =element_blank())  + labs(title = "Monnucleosome Span Reads") + theme(plot.title = element_text(hjust = 0.5))
grid.arrange(g1, g2, ncol=2)

Peak Statistics

Blacklist ratio

knitr::kable(x = getReportVal(atacProcs$blacklistQC,"report"))

DHS ratio

knitr::kable(x = getReportVal(atacProcs$DHSQC,"report"))

Fraction of reads in peaks (FRiP)

knitr::kable(x = getReportVal(atacProcs$fripQC,"report"))

Peak Annotation

library(ChIPseeker)
peakanno <- getReportVal(atacProcs$Peakanno,"annoOutput.rds")
plotAnnoPie(x = peakanno)

Annotation of items in table

For single end sequencing data, esATAC will counts reads number.

For paired end sequencing data, esATAC will counts read pairs or fragment number.

ENCODE recommend NRF>0.9 for ATAC-seq data.

$NRF$ value range |Complexity :------------------:|:---------: $NRF<0.7$ |Concerning $0.7\le NRF \le 0.9$|Acceptable $NRF>0.7$ |Ideal

$PBC1$ value range |Bottlenecking level :-------------------:|:---------: $PBC1<0.7$ |Severe $0.7\le PBC1 \le 0.9$|Moderate $PBC1>0.7$ |None

$PBC2$ value range |Bottlenecking level :------------------:|:----------: $PBC2<1$ |Severe $1\le PBC2 \le 3$ |Moderate $PBC2>3$ |None

Session Info

sessionInfo()


wzthu/ATACpipe documentation built on Aug. 12, 2022, 7:38 a.m.