BatchQC package Introduction

Solaiappan Manimaran

2022-11-01

Sequencing and microarray samples often are collected or processed in multiple batches or at different times. This often produces technical biases that can lead to incorrect results in the downstream analysis. BatchQC is a software tool that streamlines batch preprocessing and evaluation by providing interactive diagnostics, visualizations, and statistical analyses to explore the extent to which batch variation impacts the data. BatchQC diagnostics help determine whether batch adjustment needs to be done, and how correction should be applied before proceeding with a downstream analysis. Moreover, BatchQCvinteractively applies multiple common batch effect approaches to the data, and the user can quickly see the benefits of each method. BatchQC is developed as a Shiny App. The output is organized into multiple tabs, and each tab features an important part of the batch effect analysis and visualization of the data. The BatchQC interface has the following analysis groups: Summary, Differential Expression, Median Correlations, Heatmaps, Circular Dendrogram, PCA Analysis, Shape, ComBat and SVA.

The package includes:

  1. Summary and Sample Diagnostics
  2. Differential Expression Plots and Analysis using LIMMA
  3. Principal Component Analysis and plots to check batch effects
  4. Heatmap plot of gene expressions
  5. Median Correlation Plot
  6. Circular Dendrogram clustered and colored by batch and condition
  7. Shape Analysis for the distribution curve based on HTShape package
  8. Batch Adjustment using ComBat
  9. Surrogate Variable Analysis using sva package
  10. Function to generate simulated RNA-Seq data

batchQC is the pipeline function that generates the BatchQC report and launches the Shiny App in interactive mode. It combines all the functions into one step.

Installation

To begin, install Bioconductor and simply run the following to automatically install BatchQC and all the dependencies, except pandoc, which you have to manually install as follows.

if (!requireNamespace("BiocManager", quietly=TRUE))
    install.packages("BiocManager")
BiocManager::install("BatchQC")

Install ‘pandoc’ package by following the instructions at the following URL: http://pandoc.org/installing.html

Rstudio also provides pandoc binaries at the following location for Windows, Linux and Mac: https://s3.amazonaws.com/rstudio-buildtools/pandoc-1.13.1.zip

If all went well you should now be able to load BatchQC. Here is an example usage of the pipeline.

Simulate data and Apply BatchQC

Apply combat and rerun the BatchQC pipeline on the batch adjusted data

Apply BatchQC on a real signature dataset

Apply BatchQC on a real bladderbatch dataset

Apply BatchQC on a real protein expression dataset

Second simulated dataset example with only batch variance difference