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
plotMAfunction from thegeneplotterpackage.If
selfcontains a column"svalue"then these will be used for coloring the points (with a defaultalpha=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=Truewas used, whether to plot the MLE (unshrunken estimates), defaults toFalse. Requires thatDESeqDataSet.results()was run withaddMLE=True. Note that the MLE will be plotted regardless of this argument, ifDESeq()wasrun withbetaPrior=False. SeelfcShrink()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