Hi all,
was wondering if somebody could explain how limma produces genes that will be entered in to a venndiagram. I have produced a vennDiagram using limma results:
ebayesliversamples<-eBayes(contrastfitliversamples).......
resultsvennliversamples <- decideTests(ebayesliversamples, method="separate", adjust.method="BH", p.value=0.05)
then call vennDiagram to look at the result. This is really nice, however, I get a different number of genes when I then change the "include" argument.
For "both" up-regulated and down-regulated genes, I get (just as an example) 168 genes on one outer ring (specific to one contrast).
Now, if I ask for genes that are up-regulated only (include="up") then the same outer ring as above now contains 301 genes. Similarly, include= "down" = 174 genes.
This is really confusing for me, as I thought there should be 168 genes in total and then the up and down regulated genes would be a number out of the 168...
My question is, why, when specifying to view genes that are specifically up-regulated or down-regulated, are there more genes than the total number of DE genes exclusive to this contrast when specifying "both"
Not sure of the code that might be useful here, I also couldn't directly attach the venn diagrams, however, I will respond with any requests for further code etc! But any help with this would be greatly appreciates as it is incredibly confusing!
Many thanks!
Thank you! In response to your first paragraph, does this then imply that the total number of genes in the venn diagram should be the same? but that genes fall in and out of intersections based on whether you specify up or down? Because when I specify up or down, the total number of genes in the entire venn diagram is completely different to when specifying "both"
Total number of genes for up and down=11966
Total number of genes for specifying both=11605
No, there is no reason to expect the total number to be the same. In the example I gave there are 20 genes that will be counted in both the 'up' and 'down' Venn diagrams (for a total of 40), but that will only be counted once in the 'both' Venn diagram.
Many thanks! and sorry for the delay in replying. Yes this makes sense. Thank you for helping shed light!