Sam-class {ClassComparison}R Documentation

The Sam Class

Description

Implements the "Significance Analysis of Microarrays" approach to detecting differentially expressed genes.

Usage

Sam(data, classes, nPerm = 100, verbose = TRUE)
## S4 method for signature 'Sam, missing':
plot(x, tracks=NULL, xlab='Expected T Statistics (Empirical)',
 ylab='Observed t Statistics', ...)
## S4 method for signature 'Sam':
summary(object, cutoff=1, ...)
## S4 method for signature 'Sam':
selectSignificant(object, cutoff=1, ...)
## S4 method for signature 'Sam':
countSignificant(object, cutoff=1, ...)

Arguments

data Either a data frame or matrix with numeric values or an ExpressionSet as defined in the BioConductor tools for analyzing microarray data.
classes If data is a data frame or matrix, then classes must be either a logical vector or a factor. If data is an ExpressionSet, then classes can be a character string that names one of the factor columns in the associated phenoData subobject.
nPerm An integer; the number of permutations
verbose A logical flag
x A Sam object
tracks a numeric vector
xlab Label for the x axis
ylab Label for the y axis
object A Sam object
cutoff A numeric value
... The usual extra arguments to generic functions

Details

The SAM approach to analyzing microarray data was developed by Tusher and colleagues; their implementation is widely available. This is an independent implementaiton based on the description in their original paper, customized to use the same interface (and thus work with ExpressionSet objects) used by the rest of the ClassComparison package. The fundamental idea behind SAM is that the observed distribution of row-by-row two-sample t-tests should be compared not to the theoretical null distribution but to a null distribution estimated by a permutation test. The Sam constructor performs the permutation test.

Value

summary returns a SamSummary object.
selectSignificant returns a vector of logical values.
countSignificant returns an integer.

Creating Objects

As usual, objects can be created by new, but better methods are available in the form of the Sam function. The inputs to this function are the same as those used for row-by-row statistical tests throughout the ClassComparison package; a detailed description can be found in the MultiTtest class.

Slots

t.statistics:
A numeric vector containing the observed t-statistics.
observed:
A numeric vector containing the sorted observed t-statistics.
expected:
A numeric vector of the expected distribution of t-statistics based on a permutation test.
sim.data:
A matrix containing all the t-statistics from all the permutations.
call:
The function call that created the object.

Methods

summary(object, cutoff=1, ...)
Compute a summary of the object.
plot(x, tracks=NULL, xlab='Expected T Statistics (Empirical)', ylab='Observed t Statistics', ...)
Plot the observed and expected t-statistics. The tracks argument causes parallel lines to be drawn on either side of the quantile-quantile central line, at the specified offsets. Colors in the plot are controlled by the current values of COLOR.CENTRAL.LINE and COLOR.CONFIDENCE.CURVE
selectSignificant(object, cutoff=1, ...)
Compute a vector that selects significant values
countSignificant(object, cutoff=1, ...)
Count the number of significant values

Author(s)

Kevin R. Coombes <kcoombes@mdanderson.org>

References

Tusher, V.G., Tibshirani, R., and Chu, G. 2001. Significance analysis of microarrays applied to the ionizing radiation response. Proc Natl Acad Sci U S A 98, 5116-5121.

See Also

MultiTtest, Bum

Examples

ng <- 10000
ns <- 50
nd <- 100
dat <- matrix(rnorm(ng*ns), ncol=ns)
dat[1:nd, 1:(ns/2)] <- dat[1:nd, 1:(ns/2)] + 2
dat[(nd+1):(2*nd), 1:(ns/2)] <- dat[(nd+1):(2*nd), 1:(ns/2)] - 2
cla <- factor(rep(c('A', 'B'), each=25))

res <- Sam(dat, cla)
plot(res)

plot(res, tracks=1:3)

summary(res)
summary(res, cutoff=2)

a <- summary(res)
plot(a@significant.calls)
plot(a@significant.calls[1:300])

countSignificant(res, 1)

rm(ng, ns, nd, dat, cla, res, a)

[Package ClassComparison version 1.3 Index]