inmoose.diffexp.DEResults.DEResults.plotMA

DEResults.plotMA(alpha=None, main='', xlab='mean of normalized counts', ylab='log fold change', ylim=None, colNonSig='grey', colSig='blue', colLine='grey', returnData=False, MLE=False, cex=1, log='x')

MA-plot from base means and log fold changes

A simple helper function that makes a so-called “MA-plot”, i.e. a scatter plot of log2 fold changes (on the y-axis) versus the mean of normalized counts (on the x-axis).

This function also contains the code of the plotMA function from the geneplotter package.

If self contains a column "svalue" then these will be used for coloring the points (with a default alpha=0.005).

Parameters:
  • alpha (float) – the significance level for thresholding adjusted p-values

  • main (str, optional) – title for the plot

  • xlab (str, optional) – x-axis label, defaults to “mean of normalized counts”

  • ylim (pair of floats, optional) – y limits

  • colNonSig (str) – color to use for non-significant data points

  • colSig (str) – color to use for significant data points

  • colLine (str) – color to use for the horizontal (y=0) line

  • returnData (bool) – whether to return the DataFrame instead of plotting

  • MLE (bool) – if betaPrior=True was used, whether to plot the MLE (unshrunken estimates), defaults to False. Requires that DESeqDataSet.results() was run with addMLE=True. Note that the MLE will be plotted regardless of this argument, if DESeq() wasrun with betaPrior=False. See lfcShrink() for examples on how to plot shrunken log2 fold changes.

Returns:

the axes object to be plotted with matplotlib.pyplot.show()

Return type:

matplotlib.pyplot.Axes