# Installing necessary packages
if (!requireNamespace("scRNAtoolVis", quietly = TRUE)) {
install_github('junjunlab/scRNAtoolVis')
}if (!requireNamespace("corrplot", quietly = TRUE)) {
install.packages("corrplot")
}
# Load packages
library(scRNAtoolVis)
library(corrplot)
Multiple Volcano Plot
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 multi-group 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 (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 multi-group volcano plot not only highlights the specific differential genes of each cell cluster (such as marker genes for specific cell types), but also can intuitively identify the key regulatory molecules shared across cell clusters.
Setup
System Requirements: Cross-platform (Linux/MacOS/Windows)
Programming Language: R
Dependencies:
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
Note: The dataset should include at least the following 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 Plot
Multiple volcano plots can be drawn using the jjVolcano
function provided in the scRNAtoolVis package.
# Basic Multiple Volcano Plot
<- jjVolcano(
p 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'
)
p

Figure 1 plots the up-regulated and down-regulated differentially expressed genes in the nine single-cell populations.
Key Parameters:
-
diffData
: The input differential gene table, the data structure is shown inpbmc.markers
. -
myMarkers
: Customize the genes to display text labels, for example:myMarkers = c('PPBP', 'PF4')
customizes the text labels for two genes.
# Set myMarkers = c('PPBP', 'PF4')
<- jjVolcano(
p 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)
)
p

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 log2FC.cutoff=0.5
<- jjVolcano(
p1 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)
)
# Set log2FC.cutoff=2.5
<- jjVolcano(
p2 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)
)
+ p2 p1

log2FC.cutoff
Key Parameters:
-
col.type
: Scatter point color grouping method, Figure 1 example is grouped by “updown”, and can also be grouped by “adjustP”.
# Set col.type="adjustP"
<- jjVolcano(
p 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)
)
p

col.type
Key Parameters:
-
aesCol
:Set the color of the scatter points. -
tile.col
:Set the color of the grouped blocks. -
cluster.order
:Sets the order of grouping blocks. -
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. Direction of rotation
Use the flip
parameter in the jjVolcano function to rotate the orientation of the heatmap.
# Horizontal multiple volcano plot
<-
p 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)
p

flip
Figure 5. Multiple volcano plots are rotated to horizontal orientation by setting the parameter flip = T
.
3. Polar Coordinates
# Polar coordinates Multiple volcano plot
<- jjVolcano(
p diffData = pbmc.markers,
tile.col = corrplot::COL2('RdBu', 15)[4:12],
size = 3.5,
fontface = 'italic',
polar = T)
p

polar
Figure 6 Convert multiple volcano plots to polar coordinates by setting the parameter polar = T
.
Applications

Figure 7H shows the differential gene expression analysis of up- and down-regulated genes in all ten single-cell clusters. Adjusted P values < 0.01 are indicated in red, while adjusted P values ≥ 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.