Volcano plot

plotVolcano(object, ...)

# S4 method for DESeqResults
plotVolcano(object, ylim = 1e-10,
  genes = NULL, gene2symbol = NULL, ntop = 0L,
  direction = c("both", "up", "down"), pointColor = c(downregulated =
  "darkorchid3", upregulated = "darkorange2", nonsignificant = "gray50"),
  pointSize = 2L, pointAlpha = 0.7, histograms = FALSE,
  return = c("ggplot", "DataFrame"))

# S4 method for DESeqAnalysis
plotVolcano(object, results, lfcShrink = TRUE,
  ylim = 1e-10, genes = NULL, ntop = 0L, direction = c("both",
  "up", "down"), pointColor = c(downregulated = "darkorchid3",
  upregulated = "darkorange2", nonsignificant = "gray50"),
  pointSize = 2L, pointAlpha = 0.7, histograms = FALSE,
  return = c("ggplot", "DataFrame"))

Arguments

object

Object.

ylim

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

genes

character. Gene identifiers. It is considered better practice to input the stable gene identifiers from Ensembl (e.g. "ENSG00000000003") and not the (HGNC) gene symbols (e.g. "TSPN6"), if possible.

gene2symbol

Gene2Symbol. Gene-to-symbol mappings. Must contain geneID and geneName columns. See Gene2Symbol for more information.

ntop

integer(1). Number of top genes to label.

direction

character(1). Plot "both", "up", or "down" directions.

pointColor

character(1). Default point color for the plot.

pointSize

numeric(1). Point size. In the range of 1-3 is generally recommended.

pointAlpha

numeric(1). Alpha transparency level. Must be a proportion (0-1).

histograms

logical(1). Show LFC and P value histograms.

return

character(1). Return type. Uses match.arg() internally and defaults to the first argument in the character vector.

results

character(1) or integer(1). Name or position of DESeqResults.

lfcShrink

logical(1). Use shrunken log2 fold change (LFC) values.

...

Additional arguments.

Value

ggplot.

See also

Modification of CHBUtils::volcano_density_plot().

Examples

data(deseq) ## Get genes from DESeqDataSet. dds <- as(deseq, "DESeqDataSet") genes <- head(rownames(dds)) print(genes)
#> [1] "gene001" "gene002" "gene003" "gene004" "gene005" "gene006"
## DESeqAnalysis ==== plotVolcano(deseq, results = 1L)
#> condition_B_vs_A (shrunken LFC)
## Customize the colors. plotVolcano( object = deseq, results = 1L, pointColor = c( downregulated = "red", nonsignificant = "black", upregulated = "green" ) )
#> condition_B_vs_A (shrunken LFC)
## Directional support (up or down). plotVolcano( object = deseq, results = 1L, direction = "up", ntop = 5L )
#> condition_B_vs_A (shrunken LFC)
plotVolcano( object = deseq, results = 1L, direction = "down", ntop = 5L )
#> condition_B_vs_A (shrunken LFC)
## Label genes manually. ## Note that either gene IDs or names (symbols) are supported. plotVolcano(deseq, results = 1L, genes = genes)
#> condition_B_vs_A (shrunken LFC)