Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotDensities

Plot Expression Densities


Description

Plot the density of expression values for multiple arrays on the same plot.

Usage

## S3 method for class 'RGList'
plotDensities(object, log=TRUE, group=NULL, col=NULL, main="RG Densities",
              bc.method="subtract", ...)
## S3 method for class 'MAList'
plotDensities(object, log=TRUE, group=NULL, col=NULL, main="RG Densities", ...)
## S3 method for class 'EListRaw'
plotDensities(object, log=TRUE, bc.method="subtract", ...)
## S3 method for class 'EList'
plotDensities(object, log=TRUE, ...)
## Default S3 method:
plotDensities(object, group=NULL, col=NULL, main=NULL, legend="topleft", ...)

Arguments

object

an RGList, MAList, EListRaw or EList object containing expression data. Or any data object that can be coerced to a matrix.

log

logical, should densities be plotted on the log2 scale?

group

optional vector or factor classifying the arrays into groups. Should be same length as ncol(object).

col

optional vector of colors of the same length as the number of groups.

main

the main title for the plot.

bc.method

background subtraction method passed to backgroundCorrect.

legend

character string giving position to place legend. See legend for possible values. Can also be logical, with FALSE meaning no legend.

...

other arguments are passed to plotDensities.default or density.

Details

This function is useful to display and contrast the distribution of expression values on different arrays. It can for example be used to display the effects of between-array normalization. See the section on between-array normalization in the LIMMA User's Guide.

Value

A plot is created on the current graphics device.

Author(s)

Natalie Thorne and Gordon Smyth

See Also

An overview of diagnostic plots in LIMMA is given in 09.Diagnostics. There is a section using plotDensities in conjunction with between-array normalization in the LIMMA User's Guide.

This function uses density and matplot.

Examples

## Not run: 
#  Default is to plot red channels in red and green channels in green
plotDensities(MA)

#  Alternatively colors
plotDensities(MA, col=c("red","blue"))

#  Color by group, with three groups:
plotDensities(MA,group=group,col=c("blue","orange","green"))

## End(Not run)

limma

Linear Models for Microarray Data

v3.46.0
GPL (>=2)
Authors
Gordon Smyth [cre,aut], Yifang Hu [ctb], Matthew Ritchie [ctb], Jeremy Silver [ctb], James Wettenhall [ctb], Davis McCarthy [ctb], Di Wu [ctb], Wei Shi [ctb], Belinda Phipson [ctb], Aaron Lun [ctb], Natalie Thorne [ctb], Alicia Oshlack [ctb], Carolyn de Graaf [ctb], Yunshun Chen [ctb], Mette Langaas [ctb], Egil Ferkingstad [ctb], Marcus Davy [ctb], Francois Pepin [ctb], Dongseok Choi [ctb]
Initial release
2020-10-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.