[BioC] VennDiagrams, decideTests and topTable

Christian De Santis christian.desantis at stir.ac.uk
Wed Oct 16 12:30:13 CEST 2013

Hi Jim,

Thanks for taking the time to answer my query. Unfortunately my beginner skills do not allow me to modify the code of a package. I did find my way around by subsetting the "fit" object and plotting just the genes of interest with genas, which gave me a very nice view of what is happening within the subgroup of interest. In doing so, I came across another issue that I wasn't able to solve. 

When I plot the Venn diagram of those contrasts of interest

vennDiagram((decideTests (fit.contrast[,c (5, 10, 14, 17, 19)], adjust.method = "none", method="separate", p.value=0.05)),  include=c("up","down"), counts.col=c("red","green"))

From the above I get 894 genes at the intersection of the 5 groups. My rationale is that I could isolate this group of probes by selecting the common unique probenames.

The function decideTests (method="separate") should be the equivalent of topTable on individual coefficients and should give the same probes if adjust.method is the same (Vignette, decideTests). Therefore: 

contrast.5  <- topTable(fit.contrast, adjust.method="none", coef=5, number=20000, p.value = 0.05)
contrast.10 <- topTable(fit.contrast, adjust.method="none", coef=10, number=20000, p.value = 0.05)
contrast.14 <- topTable(fit.contrast, adjust.method="none", coef=14, number=20000, p.value = 0.05)
contrast.17 <- topTable(fit.contrast, adjust.method="none", coef=17, number=20000, p.value = 0.05)
contrast.19 <- topTable(fit.contrast, adjust.method="none", coef=19, number=20000, p.value = 0.05)
probes <- Reduce(intersect, list(contrast.5$ProbeName, contrast.10$ProbeName, contrast.14$ProbeName, contrast.17$ProbeName, contrast.19$ProbeName))

However this returns me a list of 1081 probes, not 894! I don’t understand where I am doing this wrong. 

Any help is very appreciated. 


R version 3.0.1 (2013-05-16)
Platform: i386-w64-mingw32/i386 (32-bit)

[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ellipse_0.3-8 limma_3.16.7 

loaded via a namespace (and not attached):
[1] bitops_1.0-6 tools_3.0.1

-----Original Message-----
From: James W. MacDonald [mailto:jmacdon at uw.edu] 
Sent: 15 October 2013 16:05
To: Christian De Santis
Cc: bioconductor at r-project.org
Subject: Re: [BioC] Modify plot - genas function from LIMMA

Hi Christian,

The short answer is no. The longer answer is 'of course you can!'. And thus is the nature of Open Source projects.

The only argument to genas() that pertains to plots is whether or not you want one. The remaining code is all 'hard coded' within the function, so you are unable to effect any changes on the results by adding extra arguments to the function call.

However, you have access to the code, and can simply check it out of the subversion repository, or if that sounds daunting you can always just download the source package and work with that.

And then all you have to do (easy for me to say) is modify genas() to your liking, and then install your modified package.

An alternative would be to make a really good argument to Gordon Smyth for what you want to do, and hope that he buys your argument, and is motivated enough to make the changes for you.



On Tuesday, October 15, 2013 10:49:21 AM, Christian De Santis wrote:
> Hi everyone,
> I am using the function genas from the Limma package to calculate the logFC correlation between some contrasts.
> genas(fit.contrast, coef = c(2,3), chooseMethod = "Fpval", plot = 
> I have isolated the list of DE probes in common between the contrasts of interest and I would like to visualize these probes on the plots with a different colour. Is there a way to do this directly on the plot generated by genas? I am quite stuck on trying to enter the options of the plot argument and impose these parameters. Any help would be very appreciated. Thanks in advance.
> Regards,
> Christian

James W. MacDonald, M.S.
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099

The University of Stirling has been ranked in the top 12 of UK universities for graduate employment*.
94% of our 2012 graduates were in work and/or further study within six months of graduation.
*The Telegraph
The University of Stirling is a charity registered in Scotland, number SC 011159.

More information about the Bioconductor mailing list