DESeq2 (original) (raw)
The MA plot is a visualisation that plots the log-fold-change between experimental groups (M) against the mean expression across all the samples (A) for each gene.
The second plot shows gene expression from the last selected sample, which can be selected from the table or directly from the summary plot.
To create the MA plot we first need to run differential expression (DE) analysis for our data using the DESeq
function.
The MA plot can then be created using the dds
object that now contains fitted results and the gene counts.
Interactions with the plot
In the plot above, try:
- Clicking points in the summary plot or rows in the table to plot the gene expression of the selection.
- Clicking genes in the table after selecting individual points will remove the previous selection.
- Searching for individual genes using the search box. The search results are displayed in the table.
- If genes are currently selected, the search box will not function.
- Setting a maximum value for the y-axis of the expression plot using the max_y_axis field.
- This allows for comparison of gene expression between genes on a comparable scale.
- Saving the currently selected genes using the Save Data dropdown.
- From here, you can also choose to save the entire table.
- Saving the summary plot or expression plot in either PNG or SVG formats, using the “Save Data” dropdown.
Modifications to the plot
Adjusting plot size
Usage: glimmaMA(dds, width=1200, height=1200)
Users can specify the width and height of the MA plot widget in pixels. The default width and height are both 920px.
Changing DE status colouring
Usage: glimmaMA(dds, status.cols=c("blue", "grey", "red")
Users can customise the colours associated with the differential expression status of a gene using the status.cols
argument. A vector of length three should be passed in, where each element must be a valid CSS colour string.
Changing sample colours in expression plot
Usage: glimmaMA(dds, sample.cols=colours)
The sample.cols
argument colours each sample based on the character vector of valid CSS colour strings colours
. The colours
vector must be of length ncol(counts)
.
Overriding counts and groups
Usage: glimmaMA(dds, counts=counts, groups=groups)
Glimma extracts counts from DESeq2::counts(dds)
by default, and experimental groups from a group
column in colData(dds)
if it is available. However, users can optionally supply their own counts matrix and groups vector using the counts
and groups
arguments.
Transforming counts values
Usage: glimmaMA(dds, transform.counts="rpkm")
The transform.counts
argument allows users to choose between strategies for transforming counts data displayed on the expression plot. The default argument is "logcpm"
which log-transforms counts using edgeR::cpm(counts, log=TRUE)
. Other options are "rpkm"
for edgeR::rpkm(counts)
, cpm
for edgeR::cpm(counts)
and none
for no transformation.
Changing displayed columns in gene annotation The gene annotations are pulled from the DGEList
object by default. This can be overwritten by providing a different table of annotations via the anno
argument, the substitute annotations must have the same number of rows as the counts matrix and the genes must be in the same order as in the counts.
Some annotations may contain too many columsn to be sensibly displayed. The display.columns
argument can be used to control the columns displayed in the plot. A vector of column names are to be provided for selecting the columns that will be displayed in the interactive plot.