plot_volcano_de: Make a pretty Volcano plot!

View source: R/de_plots.R

plot_volcano_deR Documentation

Make a pretty Volcano plot!

Description

Volcano plots and MA plots provide quick an easy methods to view the set of (in)significantly differentially expressed genes. In the case of a volcano plot, it places the -log10 of the p-value estimate on the y-axis and the fold-change between conditions on the x-axis. Here is a neat snippet from wikipedia: "The concept of volcano plot can be generalized to other applications, where the x-axis is related to a measure of the strength of a statistical signal, and y-axis is related to a measure of the statistical significance of the signal."

Usage

plot_volcano_de(
  table,
  alpha = 0.5,
  color_by = "p",
  color_list = c(`FALSE` = "darkblue", `TRUE` = "darkred"),
  fc_col = "logFC",
  fc_name = "log2 fold change",
  line_color = "black",
  line_position = "bottom",
  logfc = 1,
  p_col = "adj.P.Val",
  p_name = "-log10 p-value",
  p = 0.05,
  shapes_by_state = FALSE,
  minimum_p = NULL,
  size = 2,
  invert = FALSE,
  label = NULL,
  label_column = "hgncsymbol",
  ...
)

Arguments

table

Dataframe from limma's toptable which includes log(fold change) and an adjusted p-value.

alpha

How transparent to make the dots.

color_by

By p-value something else?

color_list

List of colors for significance.

fc_col

Which column contains the fc data?

fc_name

Name of the fold-change to put on the plot.

line_color

What color for the significance lines?

line_position

Put the significance lines above or below the dots?

logfc

Cutoff defining the minimum/maximum fold change for interesting.

p_col

Which column contains the p-value data?

p_name

Name of the p-value to put on the plot.

p

Cutoff defining significant from not.

shapes_by_state

Add fun shapes for the various significance states?

minimum_p

If a pvalue is lower than this, then set it to this, thus artificially limiting the y-scale of a volcano plot. This is only valid if one thinks that the pvalues are artificially low and that is messing with the interpretation of the data.

size

How big are the dots?

invert

Flip the x-axis?

label

Label the top/bottom n logFC values?

label_column

Use this column of annotations for labels instead of rownames?

...

I love parameters!

Value

Ggplot2 volcano scatter plot. This is defined as the -log10(p-value) with respect to log(fold change). The cutoff values are delineated with lines and mark the boundaries between 'significant' and not. This will make a fun clicky googleVis graph if requested.

See Also

[all_pairwise()]

Examples

## Not run: 
 plot_volcano_de(table)
 ## Currently this assumes that a variant of toptable was used which
 ## gives adjusted p-values.  This is not always the case and I should
 ## check for that, but I have not yet.

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.