Volcano plots represent a useful way to visualise the results of differential expression analyses. Here, we present a highly-configurable function that produces publication-ready volcano plots. EnhancedVolcano (Blighe, Rana, and Lewis 2018) will attempt to fit as many labels in the plot window as possible, thus avoiding ‘clogging’ up the plot with labels that could not otherwise have been read. Other functionality allows the user to identify up to 3 different types of attributes in the same plot space via colour, shape, size, and shade parameter configurations.
Note: to install development version:
For this example, we will follow the tutorial (from Section 3.1) of RNA-seq workflow: gene-level exploratory analysis and differential expression. Specifically, we will load the ‘airway’ data, where different airway smooth muscle cells were treated with dexamethasone.
Conduct differential expression using DESeq2 in order to create 2 sets of results:
library('DESeq2') dds <- DESeqDataSet(airway, design = ~ cell + dex) dds <- DESeq(dds, betaPrior=FALSE) res1 <- results(dds, contrast = c('dex','trt','untrt')) res1 <- lfcShrink(dds, contrast = c('dex','trt','untrt'), res=res1, type = 'normal') res2 <- results(dds, contrast = c('cell', 'N061011', 'N61311')) res2 <- lfcShrink(dds, contrast = c('cell', 'N061011', 'N61311'), res=res2, type = 'normal')
For the most basic volcano plot, only a single data-frame, data-matrix, or tibble of test results is required, containing point labels, log2FC, and adjusted or unadjusted P values. The default cut-off for log2FC is >|2|; the default cut-off for P value is 10e-6.