Sam-class {ClassComparison} | R Documentation |
Implements the "Significance Analysis of Microarrays" approach to detecting differentially expressed genes.
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, ...)
data |
Either a data frame or matrix with numeric values or an
exprSet 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
exprSet , 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 |
The SAM approach to analyzing microarray data wwas developed by Tusher
and colleagues; their implementation is widely available. This is an
independent implementaiton based on trhe description in their original
paper, customized to use the same interface (and thus work with
exprSet
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.
summary
returns a SamSummary object.
selectSignificant
returns a vector of logical values.
countSignificant
returns an integer.
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.
t.statistics
:observed
:expected
:sim.data
:call
:call
that created the object.tracks
argument causes paralle 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
Kevin R. Coombes <kcoombes@mdanderson.org>
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.
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)