Limma Package R User Guide Clarification - 7.2 Affymetrix And Other Single-Channel Designs
2
2
Entering edit mode
11.6 years ago
AngryBird ▴ 30

Referring to section 7.2 Affymatrix and other single-channel designs of the user guide located here: http://bioconductor.org/packages/2.6/bioc/vignettes/limma/inst/doc/usersguide.pdf

"A Venn diagram showing numbers of genes signi cant in each comparison can be obtained from

vennDiagram(results)" I get a venn diagram with 3 circles A B C, in the model, the comparison specified are pairwise, but in the venn diagram all three circles intersect.

My question: 1. Does the contrast also do a three way comparison implicitly? 2. What is the meaning of A intersect B intersect C, also the area of A specific to only A ie [ A - A intersect B - A intersect C + A intersect B intersect C]

limma r microarray model • 4.2k views
ADD COMMENT
5
Entering edit mode
11.6 years ago

In this vignette, there are three groups of samples being compared (three arrays with RNA1, two arrays with RNA2, and three arrays with RNA3). In this case, all three pairwise comparisons are said to be of interest (group2-group1, group3-group2, group3-group1). Therefore, the 'results' object should contain three lists of genes found to be significantly differentially expressed according to the limma method. These three lists are being visualized in a Venn diagram showing overlap between the lists (if any). The fact that all three Venn diagram circles intersect doesn't necessarily have anything to do with whether the comparisons are pairwise. Comparisons could possibly be done in some non-pairwise manner. But if more than one comparison was done, and the results of that comparison had overlap in their gene lists then the venn diagram would overlap.

design <- model.matrix(~ 0+factor(c(1,1,1,2,2,3,3,3)))
colnames(design) <- c("group1", "group2", "group3")
fit <- lmFit(eset, design)    
contrast.matrix <- makeContrasts(group2-group1, group3-group2, group3-group1, levels=design)
fit2 <- contrasts.fit(fit, contrast.matrix)
fit2 <- eBayes(fit2)
results <- decideTests(fit2)

To answer you questions specifically: (1) No, the 'makeContrasts' call does not do a three-way comparison implicitly. It was explicitly set up in this case to do a three-way comparison. But, it could have just done a two-way comparison with something like the following if you were only interested in comparing group2 and group3 to a common reference (imagine two different drug-treatments versus a single control).

contrast.matrix <- makeContrasts(group2-group1, group3-group1, levels=design)

(2) The portion of the venn diagram where A intersects B and intersects C represents those genes which were found to be significantly differentially expressed in all three comparisons. The area of A specific only to A represents those genes which were significantly differentially expressed in just one comparison (group2-group1) and not in either of the two other comparisons.

The code illustrated in this vignette is for a relatively simple scenario but can be re-worked for many other more complex situations. Keep digging into what is going on until you understand how it works and then you will be able to modify it to your own needs.

ADD COMMENT
1
Entering edit mode

You exactly answered my question, thanks for such detail oriented answer, and the common control example helped as well!

ADD REPLY
4
Entering edit mode
11.6 years ago

To answer your two questions:

  1. The contrast does not do a three-way comparision.
  2. You'll want to read the help for decideTests since decideTests is used to determine the sets for the Venn diagram. From the help page:

The setting ‘method="separate"’ is equivalent to using ‘topTable’ separately for each coefficient in the linear model fit, and will give the same lists of probes if ‘adjust.method’ is the same

ADD COMMENT
0
Entering edit mode

Thanks Sean this was helpful, and setting ‘method="separate" is good to know too.

ADD REPLY

Login before adding your answer.

Traffic: 1907 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6