plot_volcano {RVA} | R Documentation |
Plot volcanoplot
Description
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).
Usage
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)"
)
Arguments
data |
Summary statistics table or a list contain multiple summary statistics tables from limma or DEseq2, where each row is a gene. |
comp.names |
A character vector that contains the comparison names which correspond to the same order as |
geneset |
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). |
geneset.FCflag |
The column name of fold change in |
highlight.1 |
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. |
highlight.2 |
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. |
upcolor |
The color of the gene names in |
downcolor |
The color of the gene names in |
plot.save.to |
The file name and address where to save the volcano plot, e.g. "~/address_to_folder/volcano_plot.png". |
xlim |
Range of x axis. Default = |
ylim |
Range of x axis. Default = |
FCflag |
Column name of log2FC in the summary statistics table. Default = "logFC". |
FDRflag |
Column name of FDR in the summary statistics table. Default = "adj.P.Val". |
highlight.FC.cutoff |
Fold change cutoff line want to be shown on the plot. Default = 1.5. |
highlight.FDR.cutoff |
FDR cutoff shades want to be shown on the plot. Default = 0.05. |
title |
The plot title. Default "Volcano plot". |
xlab |
The label for x-axis. Default "log2 Fold Change". |
ylab |
The label for y-axis. Default "log10(FDR)". |
Details
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.
Value
The function return a volcano plot as a ggplot object.
References
Xingpeng Li & Tatiana Gelaf Romer & Olya Besedina, RVA - RNAseq Visualization Automation tool.
Examples
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)