plot_volcano: Volcano Plot

View source: R/plot_volcano.R

plot_volcanoR Documentation

Volcano Plot

Description

This function plots effect size against significance for a given test of differential expression.

Usage

plot_volcano(
  dat,
  y = "p",
  fdr = 0.05,
  lfc = NULL,
  probes = NULL,
  size = NULL,
  alpha = NULL,
  title = "Volcano Plot",
  legend = "right",
  hover = FALSE
)

Arguments

dat

Data frame or similar object representing the results of a test for differential expression, such as the output of a call to limma::topTable, edgeR::topTags, or DESeq2::results. Alternatively, any object coercable to a data frame with columns for p-values, q-values, and log fold changes. Missing values are silently removed.

y

Plot p-values (y = "p"), q-values (y = "q"), or log-odds (y = "B") on the y-axis?

fdr

Significance threshold for declaring a probe differentially expressed.

lfc

Optional effect size threshold for declaring a probe differentially expressed.

probes

Optional column number or name specifying where probe names are stored, presuming they are not stored in rownames(dat).

size

Point size.

alpha

Point transparency.

title

Optional plot title.

legend

Legend position. Must be one of "bottom", "left", "top", "right", "bottomright", "bottomleft", "topleft", or "topright".

hover

Show probe name by hovering mouse over data point? If TRUE, the plot is rendered in HTML and will either open in your browser's graphic display or appear in the RStudio viewer. Probe names are extracted from dat.

Details

Volcano plots visualize the relationship between each probe's effect size and significance for a given test of differential expression. Points are colored to distinguish between those that do and do not meet a user-defined FDR threshold. Up- and down-regulated genes may also be differentially colored if a minimum absolute fold change is supplied. These figures help to evaluate the symmetry, magnitude, and significance of effects in an omic experiment.

Examples

# Simulated data
library(DESeq2)
dds <- makeExampleDESeqDataSet()
dds <- DESeq(dds)
res <- results(dds)
plot_volcano(res)

# Real data
data(airway)
dds <- DESeqDataSet(airway, design = ~ cell + dex)
dds <- DESeq(dds)
res <- results(dds)
plot_volcano(res)


dswatson/bioplotr documentation built on March 3, 2023, 9:43 p.m.