R: Color image for cDNA microarray spot statistics
maImage
R Documentation
Color image for cDNA microarray spot statistics
Description
We encourage users calling "image" rather than "maImage". The name of the arguments are change slightly.
The function maImage creates spatial images of shades of gray or colors that correspond to the values of a statistic for each spot on the array. The statistic can be the intensity log-ratio M, a spot quality measure (e.g. spot size or shape), or a test statistic. This function can be used to explore whether there are any spatial effects in the data, for example, print-tip or cover-slip effects.
Microarray object of class "marrayRaw" and "marrayNorm".
x
Name of accessor function for the spot statistic of interest, typically a slot name for the microarray object m, such as maM.
subset
A "logical" or "numeric" vector indicating the subset of spots to display on the image.
col
List of colors such as that generated by rainbow, heat.colors, topo.colors, terrain.colors, or similar functions. In addition to these color palette functions, a new function maPalette was defined to generate color palettes from user supplied low, middle, and high color values.
contours
If contours=TRUE, contours are plotted, otherwise they are not shown.
bar
If bar=TRUE, a calibration color bar is shown to the
right of the image.
overlay
A logical vector of spots to be highlighted on the image plots.
ol.col
Color of the overlay spots.
colorinfo
A logical value indicating whether the function
should return the color scale information.
...
Optional graphical parameters, see par.
Details
This function calls the general function maImage.func, which is not specific to microarray data. If there are more than one array in the batch, the plot is done for the first array, by default. Default color palettes were set for different types of spot statistics using the maPalette function. When x=c("maM", "maMloc", "maMscale"), a green-to-red color palette is used. When x=c("maGb", "maGf", "maLG"), a white-to-green color palette is used. When x=c("maRb", "maRf", "maLR"), a white-to-red color palette is used. The user has the option to overwrite these parameters at any point.
Value
If colorinfo is set to TRUE, the following list with elements will be returned.
x.col
vector of colors to be used for calibration color bar.
x.bar
vector of values to be used for calibration color bar.
summary
six number summary of the spot statistics, from the function summary.
S. Dudoit and Y. H. Yang. (2002). Bioconductor R packages for exploratory analysis and normalization of cDNA microarray data. In G. Parmigiani, E. S. Garrett, R. A. Irizarry and S. L. Zeger, editors, The Analysis of Gene Expression Data: Methods and Software, Springer, New York.
# To see the demo type demo(marrayPlots)
# Examples use swirl dataset, for description type ? swirl
data(swirl)
# Microarray color palettes
Gcol <- maPalette(low = "white", high = "green", k = 50)
Rcol <- maPalette(low = "white", high = "red", k = 50)
RGcol <- maPalette(low = "green", high = "red", k = 50)
# Color images of green and red background and foreground intensities
maImage(swirl[, 3], x="maGb")
maImage(swirl[, 3], x = "maGf", subset = TRUE, col = Gcol, contours = FALSE, bar = TRUE, main="Swirl array 93")
maImage(swirl[, 3], x = "maRb", contour=TRUE)
maImage(swirl[, 3], x = "maRf", bar=FALSE)
# Color images of pre-normalization intensity log-ratios
maImage(swirl[, 1])
maImage(swirl[, 3], x = "maM", subset = maTop(maM(swirl[, 3]), h = 0.1, l = 0.1), col = RGcol, contours = FALSE, bar = TRUE, main = "Swirl array 93: image of pre-normalization M for % 10 tails")
# Color image of print-tip-group
maImage(swirl[, 1],x="maPrintTip")
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(marray)
Loading required package: limma
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/marray/maImage.Rd_%03d_medium.png", width=480, height=480)
> ### Name: maImage
> ### Title: Color image for cDNA microarray spot statistics
> ### Aliases: maImage
> ### Keywords: hplot
>
> ### ** Examples
>
>
> # To see the demo type demo(marrayPlots)
>
> # Examples use swirl dataset, for description type ? swirl
> data(swirl)
>
> # Microarray color palettes
> Gcol <- maPalette(low = "white", high = "green", k = 50)
> Rcol <- maPalette(low = "white", high = "red", k = 50)
> RGcol <- maPalette(low = "green", high = "red", k = 50)
>
> # Color images of green and red background and foreground intensities
> maImage(swirl[, 3], x="maGb")
[1] FALSE
NULL
> maImage(swirl[, 3], x = "maGf", subset = TRUE, col = Gcol, contours = FALSE, bar = TRUE, main="Swirl array 93")
[1] FALSE
NULL
> maImage(swirl[, 3], x = "maRb", contour=TRUE)
[1] FALSE
NULL
> maImage(swirl[, 3], x = "maRf", bar=FALSE)
[1] FALSE
NULL
>
> # Color images of pre-normalization intensity log-ratios
> maImage(swirl[, 1])
[1] FALSE
NULL
> maImage(swirl[, 3], x = "maM", subset = maTop(maM(swirl[, 3]), h = 0.1, l = 0.1), col = RGcol, contours = FALSE, bar = TRUE, main = "Swirl array 93: image of pre-normalization M for % 10 tails")
[1] FALSE
NULL
>
> # Color image of print-tip-group
> maImage(swirl[, 1],x="maPrintTip")
[1] FALSE
NULL
>
>
>
>
>
>
> dev.off()
null device
1
>