mimager 1.22.0
The aim of mimager is to simplify the process of imaging microarrays and inspecting them for spatial artifacts by providing a single visualization function (mimage()
) that works consistently with many of Bioconductor’s microarray object classes. Currently, mimager supports AffyBatch
objects from the affy package, PLMset
objects from the affyPLM package, ExpressionFeatureSet
, ExonFeatureSet
, GeneFeatureSet
and SnpFeatureSet
classes from the oligoClasses package, and the oligoPLM
class from the oligo package.
You can install the latest release of mimager from Bioconductor:
if (!requireNamespace("BiocManager", quietly=TRUE))
install.packages("BiocManager")
BiocManager::install("mimager")
In this vignette we’ll work with the Dilution
data provided by the affydata package.
library(mimager)
library(affydata)
data("Dilution")
The most basic functionality of mimage()
is to produce a visualization of the probe-level intensities arranged by their physical location on the chip:
mimage(Dilution, select = 1)
NOTE:
mimage()
always produces a legend automatically; the title can be changed with the legend.label
argumentFor microarray platforms with perfect-match (PM) and mismatch (MM) probes, such as the Affymetrix Human Genome U95v2 chip used here, only PM probes are included by default. However, the type
argument can be used to select only MM probes (probes="mm"
) or both (probes="all"
). The abundant missing values that result from excluding a particular probe type can produce rasterization artifacts in the microarray images that diminish their informativeness. To compensate for this, mimage()
fills in empty rows with values from neighboring rows. By default, a row is considered empty if more than 60% of its values are missing. This threshold can be changed by setting empty.thresh
or row filling can be disabled altogether by changing empty.rows = "fill"
to empty.rows = "ignore"
.
One of mimager’s nicest features is the ability to visualize multiple microarrays simultaneously. Simply passing the Dilution
object to mimage()
will produce a grid of images that each represent one chip in the sample.
mimage(Dilution)
The order of images is determined by the order of samples in the microarray data object. You can override this order or specify a subset of samples to include using the select
argument, which accepts either a numeric vector corresponding to each sample’s index or or a character vector of sample names.
mimage() will compute a sensible layout for the image grid based on the dimensions of the current graphics device, or you can specify it manually by setting nrow
, ncol
or both.
mimage(Dilution, select = c("10A", "20A", "10B", "20B"), nrow = 1)
The fitPLM()
function from the affyPLM package and the fitProbeLevelModel()
function from the oligo package can both be used to fit probe-level linear models (PLMs). As demonstrated by Ben Bolstad (2004), replacing raw probe intensities with the residuals or weights from PLMs can reveal spatial artifacts that might otherwise go undetected. mimager supports visualizing PLM objects generated by either package. One notable difference when working with PLM objects (as opposed to microarray objects) is the type
argument refers to model value type (i.e., residuals or weights) rather than probe type.
library(affyPLM)
DilutionPLM <- fitPLM(Dilution)
mimage(DilutionPLM)