Alternative QC using ChIPQC

Learning outcomes

Using ChIPQC package

  • to generate a summary QC report for experimental sample groups

  • to be able to understand and assess QC metrics and plots

Introduction

Here, we will explore the alternative quality control workflow, using Bioconductor ChIPQC package. ChIPQC computes quality metrics for aligned data from ChIP-seq experiments. It also provides simple ways to generate a ChIP-seq experiment quality report which can be examined to asses the absolute and relative quality of individual ChIP-seq samples (and their associated controls, as well as overall quality of the experimental data.)

Setting-up

In principle one can run ChIPQC both on Uppmax or locally. The instructions below are to use the package on Uppmax. For local usage, please make sure the paths to files are correct, and that all dependecies are properly installed for the version of R you are running.

Hint

If you start from a different location, you should cd chipseq/analysis/R

You can now load the version of R for which we tested this class along with other dependencies:

module load R_packages/4.0.4

The remaining part of the exercise is performed in R.

Hint

We are running R version 4.0.4 (2021-02-15) -- "Lost Library Book"

Running ChIPQC

While running commands (in R) feel free to have a look at ChIPQC package documentation to learn more about different steps and/or build upon them. Here we will just show you the very basics.

library(DiffBind)
library(ChIPQC)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)


#       reading in the sample information (metadata)
samples = read.csv("samples_REST.txt", sep="\t")

#       inspecting the metadata
samples

#       creating an object containing data
res=dba(sampleSheet=samples, config=data.frame(RunParallel=FALSE))

# inspecting the object
res

We will now perform QC using a wrapper function which does all the heavy lifting (well, typing…) for us. This function only uses the data mapped the first chromosome in the reference. It is enough to get representative results.

#       performing quality control
resqc = ChIPQC(res,annotation="hg19", config=data.frame(RunParallel=TRUE))

Finally, we save the results for later viewing:

#       creating the quality control report in html format
ChIPQCreport(resqc)

Warning

If you run this tutorial on Rackham, you may see an error

ChIPQCreport(resqc)

Error in browseURL... : 'browser' must be a non-empty character string

This is because the html report cannot be open in a browser directly from Rackham. You can download it to your computer and view it locally.

You need to copy the report to your local computer (copy the entire ChIPQCreport folder):

scp -r <USER>@rackham.uppmax.uu.se:/path/to/ChIPQCreport .

#if you follow the paths used in this tutorial
scp -r <USER>@rackham.uppmax.uu.se:~/chipseq/analysis/R/ChIPQCreport .

Examine the html report.

What do you think?

Are these results in line with the previous quality control workflow?