plot_volcano: Volcano plot

View source: R/plot_volcano.R

plot_volcanoR Documentation

Volcano plot

Description

Plot fold changes and adjusted p-values in an interactive volcano plot or ggplot

Usage

plot_volcano(
  res,
  pvalue_cutoff,
  foldchange_cutoff,
  max_pvalue = 200,
  radius = 3,
  ggplot = TRUE,
  palette = "RdBu",
  missing = FALSE,
  labelsize = 3,
  ...
)

Arguments

res

Annotated DESeq results table from results_all.

pvalue_cutoff

either a single p-value cutoff on the y-axis or two p-values to label down- and up-regulated genes. The default is 1.3 (corresponding to padj = 0.05) for highcharts and no labels for ggplot.

foldchange_cutoff

either the absolute value of the log2 fold change cutoff or negative and positive fold changes to label genes, default is 2 for highcharts and no labels for ggplot.

max_pvalue

y-axis limit, maximum value on a -10 log10 y-axis scale, the default is 200 (padj < 1e-200), so genes below this cutoff are assigned the maximum p-value.

radius

point size, default 3

ggplot

plot ggplot version, default TRUE

palette

RColorBrewer palette name, vector of colors, or "RdGn" for ggplot

missing

Replace missing gene names with Ensembl IDs

labelsize

label size, default 3

...

other options passed to hc_chart or geom_text_repel

Details

For ggplot, the results should not be sorted by p-value or fold change to avoid stacking close overlapping points. Labels are added using ggrepel, so avoid labeling too many points (200 is the limit).

Value

A highchart or ggplot.

Author(s)

Chris Stubben

Examples

plot_volcano(pasilla$results, pvalue=c(35,25), foldchange=2.5)

HuntsmanCancerInstitute/hciR documentation built on March 26, 2024, 3:09 a.m.