Venn Diagrams with R? [closed]

2019-01-06 12:32发布

Are other packages for doing Venn diagrams in R besides the limma package.

Anyone got tips?

Here's some notes on doing Venn diagrams with the limma packages.

8条回答
Juvenile、少年°
2楼-- · 2019-01-06 12:56

This comes very late but it might useful for others searching for an answer: VennDiagram, on CRAN here.

It allows multiple sets (four sets for venn, 3 sets for Euler diagrams), customizable colours and fonts, simple syntax and and best of all the size of the circles is proportional to the size of the data sets (at least when comparing 2 data sets). To install:

install.packages("VennDiagram")
library(VennDiagram)

For those using bioconductor packages and working with genomic coordinates, recently vennDiagram was implemented in the package ChIPpeakAnno (version 2.5.12) and allows pretty intersections of Genomic coordinates of, for instance, Chip-seq peaks. For early adopters you might need to install the development package.

peaks1 = RangedData(IRanges(start = c(967654, 2010897, 2496704),
    end = c(967754, 2010997, 2496804), names = c("Site1", "Site2", "Site3")),
    space = c("1", "2", "3"), strand=as.integer(1),feature=c("a","b","f"))

peaks2 = RangedData(IRanges(start = c(967659, 2010898,2496700,3075866,3123260),
    end = c(967869, 2011108, 2496920, 3076166, 3123470),
    names = c("t1", "t2", "t3", "t4", "t5")),
    space = c("1", "2", "3", "1", "2"), strand = c(1, 1, -1,-1,1), feature=c("a","b","c","d","a"))

makeVennDiagram(RangedDataList(peaks1,peaks2, peaks1, peaks2), NameOfPeaks=c("TF1", "TF2","TF3", "TF4"),
     totalTest=100,useFeature=TRUE, main="Venn Diagram",
    col = "transparent",fill = c("cornflowerblue", "green", "yellow", "darkorchid1"),
    alpha = 0.50,label.col = c("orange", "white", "darkorchid4", "white", "white", "white", "white", "white", "darkblue", "white", "white", "white", "white", "darkgreen", "white"), cat.col = c("darkblue", "darkgreen", "orange", "darkorchid4"))
查看更多
虎瘦雄心在
3楼-- · 2019-01-06 12:56

I would recommend the package VennDiagram: http://cran.r-project.org/web/packages/VennDiagram/VennDiagram.pdf

On pake 19 you will find 10 pakes of very good examples (both advanced and simplified ones). As of yet I have not found anything that it can't do that I need it to do.

查看更多
一纸荒年 Trace。
4楼-- · 2019-01-06 12:58

Here is reference to another version for 3-variable data: http://elliotnoma.wordpress.com/2011/02/09/venn-diagram/

The code is also available in the package colorfulVennPlot: http://cran.r-project.org/web/packages/colorfulVennPlot/index.html

查看更多
走好不送
5楼-- · 2019-01-06 12:59

There is Vennerable package on R-forge.

source("http://bioconductor.org/biocLite.R")
biocLite(c("graph", "RBGL", "gtools", "xtable"))
install.packages("Vennerable", repos="http://R-Forge.R-project.org")

Venn diagram

查看更多
淡お忘
6楼-- · 2019-01-06 13:05

The venn function in the gplots package is also useful if you need to create Venn Diagram of 4/5 sets.

查看更多
Anthone
7楼-- · 2019-01-06 13:06

List of Venn Diagram packages:

查看更多
登录 后发表回答