Array Quality Metrics
Array Quality Metrics
with arrayQualityMetrics
Contents
1 Basic use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Affymetrix data - before preprocessing . . . . . . . . . . . . . 3
1.2 Affymetrix data - after preprocessing . . . . . . . . . . . . . . 3
1.3 ExpressionSet and ExpressionSetIllumina . . . . . . . . . . . 4
1.4 Two colour arrays, NChannelSet, RGList, MAList . . . . . . . 4
1.5 Loading data from ArrayExpress . . . . . . . . . . . . . . . . 5
3 Extended use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1 Spatial layout of the array . . . . . . . . . . . . . . . . . . . . 5
3.2 Mapping of the reporters . . . . . . . . . . . . . . . . . . . . 6
3.3 RNA quality . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Introduction
The arrayQualityMetrics package produces, through a single function call, a compre-
hensive HTML report of quality metrics about a microarray dataset [1, 2, 3]. The
quality metrics are mainly on the per array level, i. e. they can be used to assess the
relative quality of different arrays within a dataset. Some of the metrics can also be
used to diagnose batch effects, and thus the quality of the overall dataset.
The report can be extended to contain further diagnostics through additional argu-
ments, and we will see examples for this in Section 3.
The aim of the arrayQualityMetrics package is to produce information that is relevant
for your decision making - not, to make the decision. It will often be applied to two,
somewhat distinct, use cases: (i) assessing quality of a “raw” dataset, in order to
Introduction
Figure 1: Left: An example plot from the report. The plot shows the arrays (points) in a two-dimensional
plot area spanned by the first two axes of a principal component analysis (PCA). By moving the mouse over
the points, the corresponding array’s metadata is displayed in the table to the right of the plot. By clicking
on a point, it can be selected or deselected. Selected arrays are indicated by larger points or wider lines in the
plots and by ticked checkboxes in the array table shown in the right panel. Arrays can also be (de)selected
by clicking the checkboxes. Initially, when the report is loaded (or reloaded) by the browser, all arrays are
selected that were called outliers by at least one criterion.
get feedback on the experimental procedures that produced the data; (ii) assessing
quality of a normalised dataset, in order to decide whether and how to use the dataset
(or subsets of arrays in it) for subsequent data analysis.
Different types of microarray data (one colour, two colour, Affymetrix, Illumina) are
represented by different object classes in Bioconductor. The function arrayQuality
Metrics will work in the same way for all of them. Further information about its
arguments can be found in its manual page.
When the function arrayQualityMetrics is finished, a report is produced in the di-
rectory specified by the function’s outdir argument. By default, a directory with a
suitable name is created in the current working directory. This directory contains an
HTML page index.html that can be opened by a browser. The report contains a se-
ries of plots explained by text. Some of the plots are interactive (see Figure 1). Tech-
nically, this is achieved by the use of SVG (scalable vector graphics) and JavaScript,
and it requires that you use a recent (HTML5 capable) web browser1 . Other plots, 1
If in doubt, please
where interactivity is less relevant, are provided as bitmaps (PNG format) and are see the notes about
also linked to PDF files that provide high resolution versions e. g. for publication. browser compatibility
at the top of the
Plus (+) or minus (-) symbols at the begin of different section headings of the report report; or contact the
Bioconductor mailing
(as in the left panel of Figure 1) indicate that you can show or hide these sections
list.
by clicking on the heading. After (re)loading, all sections are shown except for the
Outlier detection barplots, which are hidden and can be expanded by clicking on
them.
Metadata about the arrays is shown at the top of the report as a table (see Figure 1).
It is extracted from the phenoData slot of the data object supplied to arrayQuali
tyMetrics. It can be useful to adjust the contents this slot before producing the
report, and to make sure it contains the right quantity of information to make an
informative report - not too much, not too little.
2
Introduction
In the case of AffyBatch input, some Affymetrix specific sections are added to the
standard report. Also for other types of arrays, sections can be added to the standard
report if certain metadata are present in the input object (see Section 3).
The function arrayQualityMetrics also produces an R object (essentially, a big
list) with all the information contained in the report, and this object can be used by
downstream tools for programmatic analysis of the report. This is discussed in the vi-
gnette Advanced topics: Customizing arrayQualityMetrics reports and programmatic
processing of the output
1 Basic use
1.1 Affymetrix data - before preprocessing
If you are working with Affymetrix GeneChips, an AffyBatch object is the most ap-
propriate way to import your raw data into Bioconductor. Starting from CEL files,
this is typically done using the function ReadAffy from the affy package2 . Here, we 2
For more informa-
use the dataset MLL.A, an object of class AffyBatch provided in the data package tion on how to pro-
duce an AffyBatch
ALLMLL.
from your data,
library("ALLMLL") please see the doc-
umentation of the
data("MLL.A")
affy package.
This is the simplest way of calling the function. We give a name to the directory
(outdir) and we overwrite the possibly existing files of this directory (force). Finally,
we set do.logtransform to logarithm transform the intensities. You can then view
the report by directing your browser to the file index.html in the directory whose
name is indicated by outdir.
3
Introduction
nMLL = rma(MLL.A)
arrayQualityMetrics(expressionset = nMLL,
outdir = "Report_for_nMLL",
force = TRUE)
We do not need to set do.logtransform as after rma the data are already logarithm
transformed.
4
Introduction
arrayQualityMetrics(expressionset = nMLL,
outdir = "Report_for_nMLL_with_factors",
force = TRUE,
intgroup = c("condition", "batch"))
3 Extended use
Some of the quality metrics that the package can compute require specific information
about the features on the arrays. To use these, you need to make sure that this
information is provided in your input object. We use the nCCl4 example again.
5
Introduction
to convert the row, column and blocks indices into absolute "X" and "Y" coordinates
on the array. In the example of the dataset CCl4, the coordinates of the spots are in
the columns named "Row" and "Column" of the featureData (the slot of the object
containing the annotation of the probes). We copy this information into columns
named "X" and "Y" respectively
featureData(nCCl4)$X = featureData(nCCl4)$Row
featureData(nCCl4)$Y = featureData(nCCl4)$Column
The next call to arrayQualityMetrics with this refined version of nCCl4 (see Sec-
tion 3.3) will now include this information in the report, and the spatial distribution
of the intensities will be shown.
##
## FALSE TRUE
## 33296 10332
The next call to arrayQualityMetrics with this refined version of nCCl4 (see Sec-
tion 3.3) will now include this information in the report, and the spatial distribution
of the intensities will be shown.
6
Introduction
The RIN is always 9 for the reference (DMSO), the relevant value is that for the test
sample (CCl4).
RIN = with(pd, ifelse( Cy3=="CCl4", RIN.Cy3, RIN.Cy5))
fRIN = factor(RIN)
levels(fRIN) = c("poor", "medium", "good")
pData(nCCl4)$"RNA-integrity" = fRIN
Now we can use this to set the argument intgroup when calling the function ar
rayQualityMetrics.
arrayQualityMetrics(expressionset = nCCl4,
outdir = "Report_for_nCCl4_with_RIN",
force = TRUE,
intgroup = "RNA-integrity")
Boxplots, PCA plot and heatmap in the report will now indicate the values of the
factor RNA-integrity for each array.
Session Info
• R version 4.3.0 RC (2023-04-13 r84269), x86_64-pc-linux-gnu
7
Introduction
• LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
References
[1] Audrey Kauffmann, Robert Gentleman, and Wolfgang Huber.
arrayQualityMetrics - a Bioconductor package for quality assessment of
microarray data. Bioinformatics, 25:415–416, 2009.
[2] Audrey Kauffmann and Wolfgang Huber. Microarray data quality control
improves the detection of differentially expressed genes. Genomics, 95:138–142,
2010.
8
Introduction