# Install packages
if (!requireNamespace("scRNAtoolVis", quietly = TRUE)) {
install.packages("scRNAtoolVis")
}if (!requireNamespace("corrplot", quietly = TRUE)) {
install.packages("corrplot")
}
# Load packages
library(scRNAtoolVis)
library(corrplot)
Multiple Volcano Plot
The multiple volcano plot is a graph used for differential expression analysis of high-throughput data (such as transcriptomes and proteomes). Compared with the traditional volcano plot, the multiple volcano plot can display the results of multiple groups at the same time, making it easier to compare the consistency or specificity of differential features horizontally.
Example
This multiple volcano plot shows the differential gene expression patterns of multiple cell clusters in single-cell sequencing data. The blocks of different colors on the X-axis represent different cell clusters, and the scattered points inside the blocks represent differential genes. The geom_jitter
function is used to add a jitter effect to the scattered points to avoid overlapping data points. The Y-axis represents the difference fold change (Average log2FoldChange), red scattered points represent up-regulated genes with log2FC>0, blue scattered points represent down-regulated genes with log2FC<0, and the top5 differential genes are marked with text. The multiple volcano plot not only highlights the specific differential genes of each cell cluster (such as marker genes for specific cell clusters), but also can intuitively identify the key regulatory molecules shared across cell clusters.
Setup
System Requirements: Cross-platform (Linux/MacOS/Windows)
Programming language: R
Dependent packages:
scRNAtoolVis
;corrplot
Data Preparation
The data uses the pbmc.markers
single-cell sequencing differentially expressed gene dataset provided by the scRNAtoolVis package.
# Load data
data('pbmc.markers')
# View data
head(pbmc.markers)
p_val avg_log2FC pct.1 pct.2 p_val_adj cluster gene
RPS12 2.008629e-140 0.7256738 1.000 0.991 2.754633e-136 Naive CD4 T RPS12
RPS27 2.624075e-140 0.7242847 0.999 0.992 3.598656e-136 Naive CD4 T RPS27
RPS6 1.280169e-138 0.6742630 1.000 0.995 1.755623e-134 Naive CD4 T RPS6
RPL32 4.358823e-135 0.6121027 0.999 0.995 5.977689e-131 Naive CD4 T RPL32
RPS14 3.618793e-128 0.6179756 1.000 0.994 4.962812e-124 Naive CD4 T RPS14
CYBA 1.090337e-124 -1.5739355 0.661 0.914 1.495288e-120 Naive CD4 T CYBA
Data Structure
The dataset should include at least five columns: p_val
, avg_log2FC
, p_val_adj
, cluster
, and gene
. The column names cannot be changed, but the order of the columns can be changed. The names of the grouping blocks shown in the plot are the names in the cluster
column content.
Visualization
1. Basic Multiple Volcano Plot
Multiple volcano plot can be drawn using the jjVolcano
function provided in the scRNAtoolVis package.
# Basic Multiple Volcano Plot
<- jjVolcano(
p1_1 diffData = pbmc.markers,
topGeneN = 5,
log2FC.cutoff = 0.5,
col.type = "updown",
aesCol = c('#0099CC','#CC3333'),
tile.col = corrplot::COL2('PuOr', 15)[4:12],
cluster.order = rev(unique(pbmc.markers$cluster)),
size = 3.5,
fontface = 'italic'
)
p1_1

Figure 1 plots the differentially up-regulated and down-regulated genes in the 9 single-cell clusters.
Key Parameters:
-
diffData: The input differentially expressed gene table has the data structure shown in
pbmc.markers
. -
myMarkers: Customize the genes to display text labels, for example:
myMarkers = c('PPBP', 'PF4')
customizes the text labels for two genes.
# Set Parameter: myMarkers = c('PPBP', 'PF4')
<- jjVolcano(
p1_2 diffData = pbmc.markers,
myMarkers = c('PPBP', 'PF4'),
log2FC.cutoff = 0.5,
col.type = "updown",
aesCol = c('#0099CC','#CC3333'),
tile.col = corrplot::COL2('PuOr', 15)[4:12],
cluster.order = rev(unique(pbmc.markers$cluster)),
size = 3.5,
fontface = 'italic',
legend.position = c(0.7,0.9)
)
p1_2

myMarkers
Key Parameters:
-
topGeneN: How many top gene text labels are displayed. In the example of Figure 1,
topGeneN = 5
displays the text labels of the top 5 up-regulated and down-regulated genes in each cluster. ThetopGeneN
andmyMarkers
parameters cannot be used at the same time. - log2FC.cutoff: Set the threshold of log2FoldChange, which determines the upper and lower boundaries of the grouping box.
# Set Parameter: log2FC.cutoff=0.5
<- jjVolcano(
p1_3_1 diffData = pbmc.markers,
topGeneN = 0,
log2FC.cutoff = 0.5,
col.type = "updown",
aesCol = c('#0099CC','#CC3333'),
tile.col = corrplot::COL2('PuOr', 15)[4:12],
cluster.order = rev(unique(pbmc.markers$cluster)),
size = 3.5,
fontface = 'italic',
legend.position = c(0.7,0.9)
)
p1_3_1
# Set Parameter: log2FC.cutoff=2.5
<- jjVolcano(
p1_3_2 diffData = pbmc.markers,
topGeneN = 0,
log2FC.cutoff = 2.5,
col.type = "updown",
aesCol = c('#0099CC','#CC3333'),
tile.col = corrplot::COL2('PuOr', 15)[4:12],
cluster.order = rev(unique(pbmc.markers$cluster)),
size = 3.5,
fontface = 'italic',
legend.position = c(0.7,0.9)
)
p1_3_2

log2FC.cutoff
Key Parameter:
- col.type: Scatter point color grouping method. Figure 1 shows an example of grouping by “updown”. It can also be grouped by “adjustP”.
# Set Parameter: col.type="adjustP"
<- jjVolcano(
p1_4 diffData = pbmc.markers,
topGeneN = 5,
log2FC.cutoff = 0.5,
col.type = "adjustP",
aesCol = c('#0099CC','#CC3333'),
tile.col = corrplot::COL2('PuOr', 15)[4:12],
cluster.order = rev(unique(pbmc.markers$cluster)),
size = 3.5,
fontface = 'italic',
legend.position = c(0.7,0.9)
)
p1_4

col.type
Key Parameters:
- aesCol: Set the color of the scatter points.
- tile.col: Set the color of the cluster tile.
- cluster.order: Sets the order of cluster tile.
- size: Set the font size for gene text labels.
- fontface: Set the font style for gene text labels.
- legend.position: Set the position of the legend.
2. Flip Multiple Volcano Plot
Use the flip
parameter in the jjVolcano function to rotate the orientation of the plot.
# Flip Multiple Volcano Plot
<-
p2 jjVolcano(
diffData = pbmc.markers,
tile.col = corrplot::COL2('PiYG', 15)[4:12],
size = 3.5,
fontface = 'italic',
legend.position = c(0.8,0.2),
flip = T)
p2

Figure 5 Multiple volcano plots are flipped to horizontal orientation by setting the parameter flip = T
.
3. Polar Multiple Volcano Plot
Use the polar
parameter in the jjVolcano function to convert to polar coordinates.
# Polar Multiple Volcano Plot
<- jjVolcano(
p3 diffData = pbmc.markers,
tile.col = corrplot::COL2('RdBu', 15)[4:12],
size = 3.5,
fontface = 'italic',
polar = T)
p3

Figure 6 Multiple volcano plots are converted to polar coordinates by setting the parameter polar = T
.
Application

Figure 7H shows differential gene expression analysis of up-regulated and down-regulated genes in all ten single-cell clusters. Adjusted P-val<0.01 are indicated in red, while adjusted P-val>=0.01 are indicated in black.[1]
Reference
[1] Asp M, Giacomello S, Larsson L, et al. A Spatiotemporal Organ-Wide Gene Expression and Cell Atlas of the Developing Human Heart. Cell. 2019;179(7):1647-1660.e19. doi:10.1016/j.cell.2019.11.025