generate venn diagram in R
Our DGE project report provide a differently expressing genes list which is infered using DEGseq. When I was trying to follow the analysis pipline, I found that DEGseq has a so simple document that I cannot even figure out how to apply the function in my work, then I turn to DESeq, which provide a very good document with explanation of options and typical cases. Now I have to DG(Different Gene)lists: one from NOvogene, another is mine(generated by DESeq). Some genes are the same in them, while some not. My goal is to identify the same and plot a venn diagram. Here is the outline:
- idnetify the same genes, calculate the number of same and different genes.
- draw a venn diagram in R to display above result.
DEGseq list has 2k+ genes, and my DESeq list has 1230 genes, obviously I need a quick script to compare each gene in DESeq and remember the number of genes in both.
1 | import sys |
Now I the number, time to fire up R and begin ploting. There are at least two ways to plot venn diagram, let us begin with a simpler one:
1 | require(venneuler) |
Need no extra comments, just so intuitive. Cannot wait to dive in? ok, here it is:
1 | require(VennDiagram) |
There are more options and more functions in VennDiagram, check out the help manual if you want.