plotArray {PAA} | R Documentation

## Plot ProtoArray expression intensities in the original arrangement mimicking the original scan image.

### Description

Uses the `"Block"`, `"Row"` and `"Column"` information of an `EList` or `EListRaw` object to resemble the original positions on the array(s). The resulting plot is similar to the original scan image of the considered array(s). Thus, this function is a visualization tool that can be used to visualize protein microarrays for which the original scan image is not available. Visual inspection of the spatial expression pattern can then identify possible local tendencies and strong spatial biases. Moreover, the array can be inspected at all stages of the preprocessing workflow in order to check the impact of the particular methods that have been applied.

### Usage

    plotArray(elist=NULL, idx=NULL, data.type="fg", log=NULL, normalized=NULL,
      aggregation=NULL, colpal="heat.colors", graphics.device="tiff",
      output.path=NULL)

### Arguments

`elist` | `EList` or `EListRaw` object (mandatory).
`idx` | integer, vector of integers or the string `"all"` indicating the column indices of the sample(s) for drawing the plot(s) (mandatory).
`data.type` | string indicating whether the foreground (`"fg"`) or background (`"bg"`) data should be plotted. The default is `"fg"` (optional).
`log` | logical indicating whether the input data is logarithmized. If TRUE the log2 scale is expected. If FALSE a log2-transformation will be performed (mandatory).
`normalized` | logical indicating whether `elist` was normalized (mandatory).
`aggregation` | string indicating whether the data stored in `elist` has been aggregated and, if this is the case, which method has been used by the function `loadGPR()`. Possible values are `"min"`, `"mean"` and `"none"`(mandatory).
`colpal` | string indicating the color palette for the plot(s). The default is `"heat.colors"` (optional).
`graphics.device` | string indicating the file format for the plot(s) saved in `output.path`. Accepted values are `"tiff"` and `"png"`. The default is `"tiff"` (optional).
`output.path` | string indicating the output path for the plots (optional).

### Details

This function allows plotting of protein microarray data using the `gplots` function `heatmap.2()` for visual quality control. The data obtained from an `EList` or `EListRaw` object is re-ordered and represented in the same way the spots are ordered on the actual microarray. Consequently, the resulting plot is similar to the original scan image of the considered array. This allows for visual control and assessment of possible patterns in spatial distribution.

Mandatory arguments are `elist`, `idx`, `log`, `normalized` and `aggregation`. While `elist` specifies the `EList` or `EListRaw` object to be used, `idx` designates the array column index in `elist` to plot a single array from the `EList` object. Alternatively, a vector (e.g., `1:5`) or the string `"all"` can be designated to include multiple, respectively, all arrays that were imported.

Furthermore, `data.type` allows for plotting of `"fg"`, foreground data (i.e., `elist$E` and `elist$C`), which is the default or `"bg"`, background data (i.e., `elist$Eb` and `elist$Cb`).

The normalization approaches of PAA which comprise also data logarithmization do not include control data. With `normalized=TRUE` it is indicated that the input data was normalized, so the control data will be logarithmized (log2) before plotting as well. However, since the complete data (foreground and background values of protein features and control spots) can be logarithmized regardless of normalization the argument `log` states whether the designated data is already logarithmized (note: log2 scale is always expected).

The parameter `aggregation` indicates whether the protein microarray data has been aggregated by `loadGPR()` and, if so, which method has been used.

Moreover, the parameter `colpal` defines the color palette that will be used for the plot. Some exemplary values are `"heat.colors"` (default), `"terrain.colors"`, `"topo.colors"`, `"greenred"` and `"bluered"`.

Finally, the output path optionally can be specified with the argument `output.path` to save the plot(s). Then, one or more tiff or png file(s) containing the corresponding plot(s) are saved into the subfolder "array_plots".

### Value

No value is returned.

### Note

Please note the instructions of the PAA function `loadGPR()`. Note that the data has to be imported including controls to avoid annoying gaps in the plot (for ProtoArrays this is done automatically and for other types of arrays the arguments `description`, `description.features` and `description.discard` must be defined). Note that the data can be imported without aggregation by `loadGPR()` (when `aggregation="none"`) in order to inspect the array visually with `plotArray()` before duplicate aggregation.

### Author(s)

Daniel Bemmerl and Michael Turewicz michael.turewicz@rub.de

### References

The package `gplots` by Gregory R. Warnes et al. can be downloaded from CRAN (http://CRAN.R-project.org/package=gplots).

Gregory R. Warnes, Ben Bolker, Lodewijk Bonebakker, Robert Gentleman, Wolfgang Huber, Andy Liaw, Thomas Lumley, Martin Maechler, Arni Magnusson, Steffen Moeller, Marc Schwartz and Bill Venables (2015). gplots: Various R Programming Tools for Plotting Data. R package version 2.17.0. http://CRAN.R-project.org/package=gplots

### Examples

    cwd <- system.file(package="PAA")
    load(paste(cwd, "/extdata/BadData.RData", sep=""))
    plotArray(elist=bad.elist, idx=1, data.type="bg", log=FALSE, normalized=FALSE,
      aggregation="none")

[Package PAA version 1.28.0 Index]