5.4 Plotting Sample Fragment Size Distribution and TSS Enrichment Profiles.

Because of how the data is stored and accessed, ArchR can compute fragment size distributions and TSS enrichment profiles from Arrow files very quickly.

Fragment size distributions

To plot the fragment size distributions of all samples, we use the plotFragmentSizes() function. Fragment size distributions in ATAC-seq can be quite variable across samples, cell types, and batches. Slight differences like those shown below are common and do not necessarily correlate with differences in data quality.

p1 <- plotFragmentSizes(ArchRProj = projHeme1)
## ArchR logging to : ArchRLogs/ArchR-plotFragmentSizes-371b0711708f8-Date-2022-12-23_Time-05-46-40.log
## If there is an issue, please report to github with logFile!
## ArchR logging successful to : ArchRLogs/ArchR-plotFragmentSizes-371b0711708f8-Date-2022-12-23_Time-05-46-40.log
p1

TSS enrichment profiles

To plot TSS enrichment profiles, we use the plotTSSEnrichment() function. TSS enrichment profiles should show a clear peak in the center and a smaller shoulder peak right-of-center which is caused by the well-positioned +1 nucleosome.

p2 <- plotTSSEnrichment(ArchRProj = projHeme1)
## ArchR logging to : ArchRLogs/ArchR-plotTSSEnrichment-371b07a6fa120-Date-2022-12-23_Time-05-46-59.log
## If there is an issue, please report to github with logFile!
## subThreading Disabled since ArchRLocking is TRUE see `addArchRLocking`
## 2022-12-23 05:47:00 : scATAC_BMMC_R1 Computing TSS (1 of 3)!, 0.021 mins elapsed.
## 2022-12-23 05:47:25 : scATAC_BMMC_R1 Finished Computing TSS (1 of 3)!, 0.433 mins elapsed.
## 2022-12-23 05:47:25 : scATAC_CD34_BMMC_R1 Computing TSS (2 of 3)!, 0.433 mins elapsed.
## 2022-12-23 05:47:46 : scATAC_CD34_BMMC_R1 Finished Computing TSS (2 of 3)!, 0.788 mins elapsed.
## 2022-12-23 05:47:46 : scATAC_PBMC_R1 Computing TSS (3 of 3)!, 0.788 mins elapsed.
## 2022-12-23 05:48:06 : scATAC_PBMC_R1 Finished Computing TSS (3 of 3)!, 1.118 mins elapsed.
## ArchR logging successful to : ArchRLogs/ArchR-plotTSSEnrichment-371b07a6fa120-Date-2022-12-23_Time-05-46-59.log
p2

To save editable vectorized versions of these plots, we use plotPDF().

plotPDF(p1,p2, name = "QC-Sample-FragSizes-TSSProfile.pdf", ArchRProj = projHeme1, addDOC = FALSE, width = 5, height = 5)
## Plotting Ggplot!
## Plotting Ggplot!