[BioC] limma: get all sig genes from multiple contrasts

James W. MacDonald jmacdon at med.umich.edu
Fri Jun 9 13:45:21 CEST 2006

Hi Ivan,

Ivan Baxter wrote:
> I realize this may be a silly question, but I have gone through all the 
> case studies in the limma users manual and I can't seem to find the 
> answer to this anywhere.   I have a 3x3 factorial experiment and I 
> followed the case studies to make my linear model and designate 13 
> contrasts of interest.  My question is: is there a simple way to get all 
> the genes that show significant differences in any one of my contrasts? 
> (for use in clustering, for ex.)
> I manged to pull them out using:
> results <- decideTests(fit2)
> abres <- abs(results)
> sig_gene <- abres[rowSums(abres) > 0,]
> which then has to be linked up by
> test <- match(rownames(sig_gene), geneNames(eset))
> sigchange <-  eset[test]
> This seems rather ungainly when compared to how elegantly all the other 
> functions in limma work. Is there a simpler way to do this?

You can do this easily enough without needing any added functionality in 

results <- decideTests(fit2)
index <- apply(results, 1, any)
sigchange <- eset[index,]

As an aside, unless you are planning to cluster your data to show 
patterns you have extracted using the different contrasts, this is 
probably not what you want to do. You are extracting only those genes 
that fulfill a certain set of criteria, so any resulting clustering 
solution will by definition show a pattern that reflects that.

As an example, if you do a t-test comparing two sample types and then 
cluster the significant genes, you will get a heatmap showing that the 
two samples are quite different from each other, with very little 
variation within each sample type (which is what the t-test is testing for).



> ivan

James W. MacDonald
University of Michigan
Affymetrix and cDNA Microarray Core
1500 E Medical Center Drive
Ann Arbor MI 48109

Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.

More information about the Bioconductor mailing list