plot.expr {permax}R Documentation

Color image plot of gene expression levels

Description

Represents values in the rows of a matrix as colored rectangles in an image plot

Usage

plot.expr(x, logs=TRUE, ig1=NULL, ig2=NULL, clmn.lab=dimnames(x)[[2]], 
    row.lab=dimnames(x)[[1]], clmn.off=NULL, row.off=NULL,...)

Arguments

x matrix or data.frame containing the values to be plotted.
logs If logs=TRUE, then log values are used.
ig1 The columns of x for cases in group 1 (see Details)
ig2 The columns in group 2. By default, all the columns not in group 1.
clmn.lab Labels for the columns in the array.
row.lab Labels for the rows in the array.
clmn.off Offset for printing the column labels (<0 to put labels outside the plot).
row.off Offset for printing the row labels (<0 to put labels outside the plot).
... Additional arguments to image and text (see par) none

Details

Values within a row are centered and normalized to have variance 1. If ig1 is not given, then the values are centered to have mean 0. If ig1 is given, the values are centered so the means of the columns in ig1 and ig2 are equal in magnitude and opposite in direction. The plot is thus useful for comparing within rows, but differences in colors between rows have no meaning.

A graphics device supporting image plots must be initialized prior to calling this function. Under Splus 3.4 for unix, the following command (without the line breaks) initializes the X window motif plot window to use 30 colors from blue (lowest levels) to yellow (highest levels) for the image plots (in this scheme a value half way between the lowest and highest values would be a medium intensity gray).

motif("-xrm 'sgraphMotif.colorSchemes : background : black; lines : yellow cyan magenta green MediumBlue red; text : white yellow cyan magenta green MediumBlue red; images : blue 30 yellow'")

Side Effects

An image plot is created on the current graphics device

See Also

plot.permax

Examples

   set.seed(1292)
   ngenes <- 1000
   m1 <- rnorm(ngenes,4,1)
   m2 <- rnorm(ngenes,4,1)
    exp1 <- cbind(matrix(exp(rnorm(ngenes*5,m1,1)),nrow=ngenes),
               matrix(exp(rnorm(ngenes*10,m2,1)),nrow=ngenes))
   exp1[exp1<20] <- 20
   sub <- exp1>20 & exp1<150
   exp1[sub] <- ifelse(runif(length(sub[sub]))<.5,20,exp1[sub])
   dimnames(exp1) <- list(paste('x',format(1:ngenes,justify='l'),sep=''),
                     paste('sample',format(1:ncol(exp1),justify='l'),sep=''))
   dimnames(exp1) <- list(paste('x',1:ngenes,sep=''),
                     paste('sample',1:ncol(exp1),sep=''))
   exp1 <- round(exp1)

  plot.expr(exp1[1:20,])

[Package permax version 1.2.1 Index]