[BioC] affylmGUI gene list from Venn diagram, was: (no subject)
James Wettenhall
wettenhall at wehi.edu.au
Fri Jun 18 04:57:05 CEST 2004
On Thu, 17 Jun 2004, Simon Kidd wrote:
> Do the p values that affylmgui uses to calculate the venn diagram
> correspond to those given in the toptable lists?
No, not exactly. (But I'm not an expert on this, so others
may wish to correct me or clarify this further.)
See the p.value argument in ?classifyTestsF and compare with the
p.value in the object returned by eBayes (see ?eBayes).
> If this is so we
> should be able to get the same results by exporting the toptable
> lists into Filemaker and doing various sorts there.
Of course, you are welcome to export topTables and manually
find genes which are above a certain cutoff in more than one
topTable, but this will generally underestimate the number of
genes in the intersection. classifyTestsF/vennCounts uses a
more sophisticated method to count the genes in the
intersection.
Imagine a plot where you have a moderated t statistic for one
contrast on a horizontal axis, and a moderated t statistic for
another moderated t statistic on the other axis. If you want
genes which are up-regulated in both contrats, you could just
look for genes with t1 > 4 and t2 > 4, so the selected region
on the t1,t2 plot would have a rectangular boundary. Whereas
the classifyTestsF/vennCounts approach uses a curved boundary
to decide which genes are up-regulated in both conditions.
Thanks Anthony for the quick example of some venn diagram code
in R, which was probably a response to my last post. But I was
looking for something which actually used limma's classifyTestsF
and vennCounts.
The example in the help for ?vennCounts is:
tstat <- matrix(rt(300,df=10),100,3)
tstat[1:33,] <- tstat[1:33,]+2
clas <- classifyTestsF(tstat,df=10,p.value=0.05)
a <- vennCounts(clas)
So in your case, you need to get the tstat from affylmGUI.
Let's say you have saved an .RData file from File-Save As in
affylmGUI, called "affyDataContrastsComputed.lma"
Now, load this file into a new R session:
load("affyDataContrastsComputed.lma")
Then extract the moderated t statistics of interest, after
reading extract.pdf in the doc/ subdirectory of affylmGUI,
in particular, please read the following lines:
For example, the moderated t statistics can be obtained as follows:
> ContrastParameterizationList[[1]]$eb$t
tstat <- ContrastParameterizationList[[1]]$eb$t
Then you can use the ?vennCounts example above.
After you have computed your vennCounts object (called 'a'
above), you can combine it with your probe set IDs as follows:
geneIDs <- ls(getCdfInfo(RawAffyData))
where RawAffyData is an AffyBatch object.
class(a) <- "matrix"
data.frame(geneIDs=geneIDs,a)
This should give you the list of genes in the intersection.
Apologies for using the old limma style of storing the empirical
bayes statistics in a separate object "eb" rather than "fit",
but generally this sort of thing is updated much more gradually
in the GUI compared with limma.
Hope this helps,
James
--------------------------------------------------------------------------
James Wettenhall Tel: (+61 3) 9345 2629
Division of Genetics and Bioinformatics Fax: (+61 3) 9347 0852
The Walter & Eliza Hall Institute E-mail: wettenhall at wehi.edu.au
of Medical Research, Mobile: (+61 / 0 ) 438 527 921
1G Royal Parade,
Parkville, Vic 3050, Australia
http://www.wehi.edu.au
More information about the Bioconductor
mailing list