This function processes the summary statistics table generated by differential expression analysis
like limma
or DESeq2
to show on the volcano plot with the highlight gene set option (like disease
related genes from Disease vs Healthy comparison).
plot_volcano(
data = data,
comp.names = NULL,
geneset = NULL,
geneset.FCflag = "logFC",
highlight.1 = NULL,
highlight.2 = NULL,
upcolor = "#FF0000",
downcolor = "#0000FF",
plot.save.to = NULL,
xlim = c(-4, 4),
ylim = c(0, 12),
FCflag = "logFC",
FDRflag = "adj.P.Val",
highlight.FC.cutoff = 1.5,
highlight.FDR.cutoff = 0.05,
title = "Volcano plot",
xlab = "log2 Fold Change",
ylab = "log10(FDR)"
)
Summary statistics table or a list contain multiple summary statistics tables from limma or DEseq2, where each row is a gene.
A character vector that contains the comparison names which correspond to the same order as data
. Required if data
is list. No default.
Summary statistic table that contains the genes which needed to be highlighted, the gene name format (in row names) needs to be consistent with the main summary statistics table). For example, this summary statistics table could be the output summary statistics table from the Disease vs Healthy comparison (Only contains the subsetted significant genes to be highlighted).
The column name of fold change in geneset
, Default = "logFC".
Genes to be highlighted, in the format of a vector consists of gene names. The gene name format needs to be consistent to the main summary statistics table.
Genes to be highlighted, in the format of a vector consists of gene names. The gene name format needs to be consistent to the main summary statistics table.
The color of the gene names in highlight.1
or the positive fold change gene
in geneset
, default = "#FDE725FF" (viridis color palette).
The color of the gene names in highlight.2
or the negative fold change gene
in geneset
, default = "#440154FF" (viridis color palette).
The file name and address where to save the volcano plot, e.g. "~/address_to_folder/volcano_plot.png".
Range of x axis. Default = c(-3,3)
.
Range of x axis. Default = c(0,6)
.
Column name of log2FC in the summary statistics table. Default = "logFC".
Column name of FDR in the summary statistics table. Default = "adj.P.Val".
Fold change cutoff line want to be shown on the plot. Default = 1.5.
FDR cutoff shades want to be shown on the plot. Default = 0.05.
The plot title. Default "Volcano plot".
The label for x-axis. Default "log2 Fold Change".
The label for y-axis. Default "log10(FDR)".
The function return a volcano plot as a ggplot object.
The function takes the summary statistics table and returns a ggplot, with the option to highlight genes, e.g. disease signature genes, the genes which are up-regulated and down-regulated in diseased subjects.
Xingpeng Li & Tatiana Gelaf Romer & Olya Besedina, RVA - RNAseq Visualization Automation tool.
# NOT RUN {
plot_volcano(data = Sample_summary_statistics_table,
geneset = Sample_disease_gene_set)
plot_volcano(data = list(Sample_summary_statistics_table, Sample_summary_statistics_table1),
comp.names = c("A", "B"),
geneset = Sample_disease_gene_set)
# }
Run the code above in your browser using DataLab