plotVolcano: Plot Volcano

Description Usage Arguments Value Author(s) See Also Examples

Description

Plot Volcano

Usage

1
2
3
4
5
6
7
8
plotVolcano(object, ...)

## S4 method for signature 'DESeqResults'
plotVolcano(object, alpha, lfcThreshold = 0L,
  ylim = 1e-10, genes = NULL, gene2symbol = NULL, ntop = 0L,
  direction = c("both", "up", "down"), pointColor = "gray50",
  sigPointColor = c(upregulated = "purple", downregulated = "orange"),
  histograms = FALSE, return = c("ggplot", "data.frame"))

Arguments

object

Object.

...

Passthrough arguments to pheatmap::pheatmap(). The names of the arguments should be formatted in camel case, not snake case.

alpha

Adjusted P value ("alpha") cutoff.

lfcThreshold

Log fold change ratio (base 2) cutoff threshold.

ylim

Upper boundary limit for y-axis. Helps preserve dynamic range for gene sets containing highly significant P values (e.g. 1e-100).

genes

Character vector of genes to include. These must match the rownames of the object. It is best practice to use the stable gene identifiers from Ensembl (e.g. "ENSG00000000003") and not the gene symbols.

gene2symbol

data.frame containing gene-to-symbol mappings. Must contain the columns geneID and geneName.

ntop

Number of top genes to label.

direction

Plot "both", "up", or "down" directions.

pointColor

Default point color for the plot.

sigPointColor

character vector containing color names for labeling upregulated and downregulated genes. Also supports a character string for labeling DEGs with the same color, regardless of direction.

histograms

Show LFC and P value histograms.

return

Object class to return. Uses match.arg() internally and picks the first item in the vector by default.

Value

ggplot.

Author(s)

John Hutchinson, Michael Steinbaugh, Lorena Pantano

See Also

This function is an updated variant of CHBUtils::volcano_density_plot().

Other Differential Expression Functions: alphaSummary, contrastName, plotDEGHeatmap, plotDEGPCA, plotMeanAverage, resultsTables

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
gene2symbol <- gene2symbol(bcb_small)

# DESeqResults ====
# Color DEGs in each direction separately
plotVolcano(
    object = res_small,
    sigPointColor = c(
        upregulated = "purple",
        downregulated = "orange"
    )
)

# Label DEGs with a single color
plotVolcano(res_small, sigPointColor = "purple")

# Directional support
plotVolcano(
    object = res_small,
    direction = "up",
    ntop = 5L,
    gene2symbol = gene2symbol,
    histograms = TRUE
)
plotVolcano(
    object = res_small,
    direction = "down",
    ntop = 5L,
    gene2symbol = gene2symbol,
    histograms = TRUE
)

# Return coordinates as a data.frame
x <- plotVolcano(res_small, return = "data.frame")
glimpse(x)

roryk/bcbioRnaseq documentation built on May 27, 2019, 10:44 p.m.