Plots Log-Fold Change versus Log-Concentration (or, M versus A) for Count Data
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.
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, ...)
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 |
logFC |
vector providing the log-fold change for each gene for a given experimental contrast. Default is |
normalize |
logical, whether to divide |
plot.it |
logical, whether to produce a plot |
smearWidth |
scalar, width of the smear |
col |
vector of colours for the points (if |
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 |
smooth.scatter |
logical, whether to produce a 'smooth scatter' plot using the graphics::smoothScatter function or just a regular scatter plot; default is |
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 |
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.
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.
Mark Robinson, Davis McCarthy
y <- matrix(rnbinom(10000,mu=5,size=2),ncol=4) maPlot(y[,1], y[,2])
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.