Object Oriented Microarray Library: Two Groups

The two groups module provides the definition of the two.groups class, in addition to an auxiliary function. See the bottom of the page for an example of how the class can be used.

Class Name: two.groups

Attributes

one
An object of the single.group class, which represents the Baggerly-Coombes smoothing of the first group's standard deviation as a function of the mean.
two
An object of the single.group class, which represents the Baggerly-Coombes smoothing of the second group's standard deviation as a function of the mean.
fit
A list containing x and y components, representing the pooled standard deviation as a function of mean expression.
good.score
The vector of t-statistics, using the smoothed pooled estimates of standard deviation.
avg
The vector of overall means for the combined groups.
dif
The vector of log ratios between the two groups. Positive values mean the gene is overexpressed in the second group when compared to the first group.
aname
A character string used as a label for the first group.
bname
A character string used as a label for the second group.
stats
The object of type two.group.stats from which the current object was initially constructed.

Methods

two.groups(stats, aname, bname)
The constructor requires an object of class two.group.stats. The remaining arguments are optional.
plot(object, folddiff, goodflag, badch, ccl, name, pch, xlab, ylab, ...)
Only the first argument is required. This method produces six plots of the object. The ccl argument should be a list of color codings; if omitted, it defaults to the list produced by the group.coding method from the folddiff, goodflag, and badch arguments (which default to 3, 2, and 4, respectively). The first two plots show the single group objects one and two, pasing the badch argument along to determine which multiples should be flagged. The third plot is a color coded scatter plot o the means of the two groups. The fourth plot is a Baggerly-Coombes plot of the difference of the two group means as a function of the average. The final two plots are histograms of the t-statistics good.score and the log ratios .
group.coding(objects, goodflag=2, badch=4, folddiff=3)
Create a color.coded.pair object.
as.data.frame
Extract the average, difference, t-statistic, and both bad flags and package them as a data frame.

Description

An object of the two.groups class represents our attempt to build a standard tool for answering the question: which genes are differentially expressed between these two replicated groups of microarray experiments? You construct an object of class two.groups from an object of class two.group.stats. Return values one and two are both single group objects (constructed from the mean1, var1 and mean2, var2 attributes of the two.group.stats object). The smoothed estimates of standard deviation are merged (as fit), and the good.score is computed as the vector of t-statistics using the merged, smoothed estimate of standard deviation.

Auxiliary Functions

f.merge(fit1, fit2, n1, n2)
This function pools two estimated standard deviation functions, (fit1 and fit2), into a common estimate. The optional arguments n1 and n2 give the number of samples used in constructing the original fitting; if omitted, they both use the default value of 2.

Example

  bogus <- matrix(rnorm(30*1000, 8, 3), ncol=30, nrow=1000)
  splitter <- rep(F, 30)
  splitter[16:30] <- T
  x <- two.group.stats(bogus, splitter)
  y <- two.groups(x)
  opar <- par(mfrow=c(2, 3), pch='.')
  plot(y, badch=2, goodflag=1)
  par(opar)