draw_volcano: draw a volcano plot

View source: R/1_plots.R

draw_volcanoR Documentation

draw a volcano plot

Description

warning a volcano plot for Differential analysis result in data.frame format.

Usage

draw_volcano(
  deg,
  lab = NA,
  xlab.package = TRUE,
  pvalue_cutoff = 0.05,
  logFC_cutoff = 1,
  pkg = 1,
  adjust = TRUE,
  change_col = "change",
  symmetry = FALSE,
  color = c("#2874C5", "grey", "#f87669")
)

Arguments

deg

a data.frame created by Differential analysis

lab

label for x axis in volcano plot; when 'NA', pkg = 4 uses 'log2FoldChange', and the other package codes keep their original labels

xlab.package

whether to use the package name as the x axis name

pvalue_cutoff

Cutoff value of pvalue,0.05 by default.

logFC_cutoff

Cutoff value of logFC,1 by default.

pkg

a integer ,means which Differential analysis packages you used,we support three packages by now, 1,2,3,4 respectively means "DESeq2","edgeR","limma(voom)","limma"; pkg = 4 uses 'log2FoldChange' as the default x-axis label.

adjust

a logical value; if TRUE, use padj and plot -log10(padj); otherwise use P.value and plot -log10(P.value).

change_col

column name for the up/down/status label. Default uses 'change' when it exists; otherwise the function falls back to the existing automatic classification logic.

symmetry

a logical value ,would you like to get your plot symmetrical

color

color vector

Value

a volcano plot according to logFC and either -log10(P.value) or -log10(padj), depending on adjust.

Author(s)

Xiaojie Sun

See Also

draw_heatmap;draw_pca;draw_venn

Examples


head(deseq_data)
draw_volcano(deseq_data)
draw_volcano(deseq_data,pvalue_cutoff = 0.01,logFC_cutoff = 2)
draw_volcano(deseq_data,color = c("darkgreen", "darkgrey", "#B2182B"))


tinyarray documentation built on Aug. 2, 2026, 9:07 a.m.