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

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

Description

A generic function which produces an MA-plot for an object containing microarray, RNA-Seq or other data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'DESeqResults'
plotMA(object, genes = NULL,
  gene2symbol = NULL, ntop = 0L, direction = c("both", "up", "down"),
  pointColor = "gray50", sigPointColor = c(upregulated = "purple",
  downregulated = "orange"), return = c("ggplot", "DataFrame"))

## S4 method for signature 'DESeqAnalysis'
plotMA(object, results, lfcShrink = TRUE,
  genes = NULL, ntop = 0L, direction = c("both", "up", "down"),
  pointColor = "gray50", sigPointColor = c(upregulated = "purple",
  downregulated = "orange"), return = c("ggplot", "DataFrame"))

Arguments

object

A data object, typically containing count values from an RNA-Seq experiment or microarray intensity values.

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.

sigPointColor

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

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, for use in specific methods.

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.

Note

We are not allowing post hoc alpha or lfcThreshold cutoffs here.

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
29
30
31
32
33
data(deseq)

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

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

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

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

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

steinbaugh/DESeqAnalysis documentation built on March 22, 2019, 5:51 p.m.