plotMA: MA-plot: plot differences versus averages for high-throughput...

Description Usage Arguments Details Value Functions plotMA2 aliases Note Author(s) See Also Examples

Description

MA-plot: plot differences versus averages for high-throughput data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
plotMA(object, ...)

## S4 method for signature 'DESeqResults'
plotMA(
  object,
  alphaThreshold = NULL,
  lfcThreshold = NULL,
  baseMeanThreshold = NULL,
  genes = NULL,
  gene2symbol = NULL,
  ntop = 0L,
  direction = c("both", "up", "down"),
  pointColor = c(downregulated = AcidPlots::lightPalette[["purple"]], upregulated =
    AcidPlots::lightPalette[["orange"]], nonsignificant =
    AcidPlots::lightPalette[["gray"]]),
  pointSize = 2L,
  pointAlpha = 0.8
)

## S4 method for signature 'DESeqAnalysis'
plotMA(object, i, ...)

Arguments

object

Object.

alphaThreshold

numeric(1) or NULL. Adjusted P value ("alpha") cutoff. If left NULL, will use the cutoff defined in the object.

lfcThreshold

numeric(1) or NULL. Log (base 2) fold change ratio cutoff threshold. If left NULL, will use the cutoff defined in the object.

baseMeanThreshold

numeric(1) or NULL. Base mean (i.e. average expression across all samples) threshold. If left NULL, will use the cutoff defined in the object. Applies in general to DESeq2 RNA-seq differential expression output.

genes

character. Gene identifiers.

gene2symbol

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

ntop

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

direction

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

pointColor

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

pointSize

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

pointAlpha

numeric(1) (0-1). Alpha transparency level.

i

Indices specifying elements to extract or replace. Indices are numeric or character vectors, empty (missing), or NULL.

For more information:

help(topic = "Extract", package = "base")
...

Additional arguments.

Details

An MA plot is an application of a Bland–Altman plot for visual representation of genomic data. The plot visualizes the differences between measurements taken in two samples, by transforming the data onto M (log ratio) and A (mean average) scales, then plotting these values.

Value

ggplot.

Functions

plotMA2 aliases

Aliased methods for original DESeq2::plotMA() S4 methods, which us geneplotter instead of ggplot2. I prefer using ggplot2 instead, so the primary methods defined here in the package mask DESeq2.

Note

Updated 2020-08-05.

Author(s)

Michael Steinbaugh, Rory Kirchner

See Also

DESeq2::plotMA().

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
data(deseq)

## Get genes from DESeqDataSet.
dds <- as(deseq, "DESeqDataSet")
genes <- head(rownames(dds))
print(genes)

## DESeqAnalysis ====
plotMA(deseq, i = 1L)

## Customize the colors.
plotMA(
    object = deseq,
    i = 1L,
    pointColor = c(
        downregulated = "red",
        nonsignificant = "black",
        upregulated = "green"
    )
)

## Directional support (up or down).
plotMA(deseq, i = 1L, direction = "up", ntop = 5L)
plotMA(deseq, i = 1L, direction = "down", ntop = 5L)

## Label genes manually.
## Note that either gene IDs or names (symbols) are supported.
plotMA(deseq, i = 1L, genes = genes)

steinbaugh/DESeqAnalysis documentation built on Oct. 15, 2020, 2:02 a.m.