Sam-class {ClassComparison}R Documentation

Class "Sam"

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, y, 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

y

Nothing, since it is supposed to be missing. Changes to the Rd processor require documenting the missing entry.

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 implementation 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 an object of class SamSummary.

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:

numeric vector containing the observed t-statistics.

observed:

numeric vector containing the sorted observed t-statistics.

expected:

numeric vector of the expected distribution of t-statistics based on a permutation test.

sim.data:

numeric matrix containing all the t-statistics from all the permutations.

call:

object of class call specifying the function call that was used to create this 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 oompaColor$CENTRAL.LINE and oompaColor$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 krc@silicovore.com

References

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

See Also

Bum, MultiTtest

Examples

showClass("Sam")
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)

[Package ClassComparison version 3.1.8 Index]