maPlot {edgeR} | R Documentation

## Plots Log-Fold Change versus Log-Concentration (or, M versus A) for Count Data

### Description

To represent counts that were low (e.g. zero in 1 library and non-zero in the other) in one of the two conditions, a 'smear' of points at low A value is presented.

### Usage

    maPlot(x, y, logAbundance=NULL, logFC=NULL, normalize=FALSE, plot.it=TRUE,
         smearWidth=1, col=NULL, allCol="black", lowCol="orange", deCol="red",
         de.tags=NULL, smooth.scatter=FALSE, lowess=FALSE, ...)

### Arguments

`x` | vector of counts or concentrations (group 1)
`y` | vector of counts or concentrations (group 2)
`logAbundance` | vector providing the abundance of each gene on the log2 scale. Purely optional (default is `NULL`), but in combination with `logFC` provides a more direct way to create an MA-plot if the log-abundance and log-fold change are available.
`logFC` | vector providing the log-fold change for each gene for a given experimental contrast. Default is `NULL`, only to be used together with `logAbundance` as both need to be non-null for their values to be used.
`normalize` | logical, whether to divide `x` and `y` vectors by their sum
`plot.it` | logical, whether to produce a plot
`smearWidth` | scalar, width of the smear
`col` | vector of colours for the points (if `NULL`, uses `allCol` and `lowCol`)
`allCol` | colour of the non-smeared points
`lowCol` | colour of the smeared points
`deCol` | colour of the DE (differentially expressed) points
`de.tags` | indices for genes identified as being differentially expressed; use `exactTest` or `glmLRT` to identify DE genes. Note that ‘tag’ and ‘gene’ are synonymous here.
`smooth.scatter` | logical, whether to produce a 'smooth scatter' plot using the graphics::smoothScatter function or just a regular scatter plot; default is `FALSE`, i.e. produce a regular scatter plot
`lowess` | logical, indicating whether or not to add a lowess curve to the MA-plot to give an indication of any trend in the log-fold change with log-concentration
`...` | further arguments passed on to `plot`

### Details

The points to be smeared are identified as being equal to the minimum in one of the two groups. The smear is created by using random uniform numbers of width `smearWidth` to the left of the minimum A value.

### Value

a plot to the current device (if `plot.it=TRUE`), and invisibly returns the `M` (logFC) and `A` (logConc) values used for the plot, plus identifiers `w` and `v` of genes for which `M` and A values, or just `M` values, respectively, were adjusted to make a nicer looking plot.

### Author(s)

Mark Robinson, Davis McCarthy

### See Also

`plotSmear`

### Examples

    y <- matrix(rnbinom(10000,mu=5,size=2),ncol=4)
    maPlot(y[,1], y[,2])

[Package edgeR version 3.22.5 Index]