Tool to generate proportional Venn Diagrams?
17
33
Entering edit mode
13.2 years ago
Ryan D ★ 3.4k

I saw this Biostar post on Venn diagrams for GO term overlap. And this tool could be modified to do something like I wish, but was wondering if there's a tool that can make nicely proportional Venn diagrams by entering just the number of elements in each set and intersection.

For instance circle A has 10 items, B has 10 items, A+B has 6 items. Drawing them proportionally would be nice, but not essential. Also nice, but not critical, would be something open source which could be integrated with a suite of Perl scripts.

P.S. not using any standard GO terms, gene IDs, etc. This is for CNVs. So elements would take the form of: chr1:100000-200000.

visualization • 61k views
12
Entering edit mode
13.2 years ago

Something quite interesting that I learned from the VizBi conference (workshop on visualizing biological data) last month concerns depicting relationships linearly vs by area. Humans can proportionally relate objects of different lengths. That is if A = 10 and B = 5, A looks exactly twice as long, and if A = 10 and B = 9.8, B looks shorter. If A and B are depicted by area, things get difficult to discern because perceived differences in area relate to one another not by the power of 1.0 but by 0.6-0.7. Thus, one loses the degree of difference between objects when using area.

Although Venn diagrams are popular and convenient, this information is something to keep in mind when trying to depict the relationships.

Added 27 Apr 2011: Try Hohli at charts.hohli.com. With Hohli, you can create a Venn diagram and customize its look and feel. One can specify a title, choose data points, and alter the background. Hohli also allows you to create other charts, including scatter plots and other line charts.

1
Entering edit mode

Good point! Another option to consider is UpSetR: https://github.com/hms-dbmi/UpSetR

It's a very versatile tool with helpful vignettes.

0
Entering edit mode

A good thought, Larry. I realize Venns are not as sexy as some. Do you have any example links from the conference (other otherwise) that would be good for showing the overlap of A,B,C or even more sets?

0
Entering edit mode

I'll offer you this link and the links therein: http://iphylo.blogspot.com/2011/03/some-vizbi-2011-links.html. No, I have nothing specific because I don't know how many data groupings you have and how many different overlaps. Hive plots (accessed from above link) might be a possibility. Or you could try overlapping lines, bending them as necessary to cover all overlaps.

11
Entering edit mode
13.2 years ago

The Google Chart API will do this.

Update - the Chart API has now been deprecated (bummer...)

0
Entering edit mode

That page doesn't show how I can get it to show the numbers of the overlaps too. Do you know if that is possible with Google Chart?

0
Entering edit mode

Chris, that is great. It scales the sizes of the Venns and even lets me specify the size overlap. The resulting HTML is great. Still need to play with the options, but I think this will do the job.

0
Entering edit mode

You could try Lucidchart - that's what I use for diagrams.

11
Entering edit mode
13.2 years ago
Laurent ★ 1.7k

I can recommend Vennerable. It is quite flexible and will allow you to plot proportional Venn/Euler diagrams and define the set names (foo and bar below) and weights directly (bar only has 7 elements, their intersection has 9, and there are 12 unique elements in foo):

Venn(SetNames = c("foo", "bar"), Weight = c('00' = 0, '01' = 7, '11' = 8, '10' = 12))


If you want to stick with Perl, there is Venn::Chart, which I have never used though.

0
Entering edit mode

Thanks Laurent, I'm less familiar with R. The link above doesn't take me to Venn-Chart, but I gather this is it: http://search.cpan.org/~djibel/Venn-Chart-1.00/lib/Venn/Chart.pm

0
Entering edit mode

Sorry for the wrong url, I just updated it. Yes, your link is correct.

0
Entering edit mode

@Laurent I think in your example, it should be back ticks instead of single quotes.

0
Entering edit mode

@Sameet You can indeed use back ticks, but single quotes do work.

0
Entering edit mode

If set A totally include set B, seems the weighted venn diagram not working?

6
Entering edit mode
13.2 years ago

Like others, I have started using The R VennDiagram package. I just presented on this at our local R user's group:

For 3-way proportional venns, you could also try this Euler Venn Applet or Vennmaster:

0
Entering edit mode

I tried Vennerable and it's great too.

0
Entering edit mode

both links to Dropbox are broken!

0
Entering edit mode

Okay, I fixed the links. Sorry, switched to google drive. By the way, I recently used vennerable some more, and it will let you do 3-way area proportional venns (approx).

5
Entering edit mode
13.2 years ago
Andreas ★ 2.5k

Not exactly sure if this is possible but it might be worth checking the following two references taken from Chen and Boutros BMC Bioinformatics 2011, 12:35 VennDiagram: a package for the generation of highly-customizable Venn and Euler diagrams in R:

Hulsen T, de Vlieg J, Alkema W: BioVenn - a web application for the comparison and visualization of biological lists using area-proportional Venn diagrams. BMC Genomics 2008, 9:488.

Kestler HA, Muller A, Kraus JM, Buchholz M, Gress TM, Liu H, Kane DW, Zeeberg BR, Weinstein JN: VennMaster: area-proportional Euler diagrams for functional GO analysis of microarrays. BMC Bioinfo 2008, 9:67.

Andreas

0
Entering edit mode

Interesting. In the discussion, the authors note: "During development of the VennDiagram package, it was discovered that it was impossible to draw accurate, scaled Venn diagrams with three sets using circles." Apparently this is only possible using elipses or polygons.

0
Entering edit mode

Yeah, I ran into that same realization a few years back when I was trying to draw a three-fold venn. In some cases, it's possible, but if you get out a pencil and paper, it's pretty easy to come up with cases that don't work. For example, A,B,C,ABC=5, AB,AC,BC=0

0
Entering edit mode

If A,B,C,ABC=5, then wouldn't AB,AC,BC also be 5?

5
Entering edit mode
13.2 years ago
Ian 6.0k

My current favourite (for two sets) is pyvenn (a python script).

I have a version of the script that i altered, which does not display any text. This is good for papers where you want to add your own text.

You may also be interested in this link and the associated comments.

0
Entering edit mode

Ian, thanks. I read the OpenHelix post. It's where I got the links above from. But again it's within Cytoscape and not proportional.

4
Entering edit mode
13.2 years ago
Pascal ▴ 40

BioVenn is another tool for generating rea-proportional Venn diagrams. It supports only 2 or 3 comparisons, but might be handy anyway.

3
Entering edit mode
13.2 years ago

Have you tried Venny ?

0
Entering edit mode

Thanks, Khader. Venny seems to be able to handle my data very well. While not proportional in size, like Chris's solution, it does give me numbers in each group by just pasting my CNV lists.

0
Entering edit mode

Venny was down today... In any event, I would highly recommend I would highly recommend VENDIS.

It just came out and it's really quite good!

3
Entering edit mode
13.2 years ago
Zazo0o ▴ 40

Hi!

I don't know if it's possible to integrate R code into a suite of Perl suite, but to generate proportional and colorful Venn diagrams I use a R package called VennDiagram. You can find it there: VennDiagram: a package for the generation of highly-customizable Venn and Euler diagrams in R

2
Entering edit mode
13.2 years ago
Puthier ▴ 250

I think that the venneuler R package could do the trick.

library("venneuler")
vd <- venneuler(c(A=0.3, B=0.3, C=1.1, "A&B"=0.1, "A&C"=0.2, "B&C"=0.1 ,"A&B&C"=0.1))
plot(vd)


Depending on your needs, you can also have a look at the venn function in gplots package (not proportional but offers venn diagrams with up to 5 sets). You can get colors by slightly modifying the function.

#construct some fake gene names..
oneName <- function() paste(sample(LETTERS,5,replace=TRUE),collapse="")
geneNames <- replicate(1000, oneName())
GroupA <- sample(geneNames, 400, replace=FALSE)
GroupB <- sample(geneNames, 750, replace=FALSE)
GroupC <- sample(geneNames, 250, replace=FALSE)
GroupD <- sample(geneNames, 300, replace=FALSE)
input  <-list(GroupA,GroupB,GroupC,GroupD)
venn(input)


You may also look at the ClueGO cytoscape plugin (which is intended to summarize the results obtained from any functional enrichment analysis). It offers very nice and meaningful outputs.

2
Entering edit mode
12.8 years ago
Leszek 4.2k

I've been using this tool. It draws very nice 3-,4- and 5-way Venns. It's very handy, as you give the text or files containing f.e. geneID and it computes the overlap itself:)

No customisation options though...

2
Entering edit mode
9.7 years ago
klausgerome ▴ 20

This vector graphic sw could be helpful

0
Entering edit mode

It does not appear to create proportional Venn diagrams.

1
Entering edit mode
12.8 years ago
Uth Video ▴ 10

Here’s a Venn diagram that shows the intersection of two opposites. It doesn’t sound logical, but these are human emotions, which are rarely logical. We’ve all held simultaneously happy and sad feelings,

--brought to you by mental_floss!

1
Entering edit mode
5.8 years ago
Jennifer Pham ▴ 450

BioVinci can help you with the proportional venn diagrams. It's pretty quick with a drag-and-drop mechanism.

Here's a quick snapshot.

0
Entering edit mode
4.6 years ago
Renesh ★ 2.2k

Try this for proportional Venn diagrams https://reneshbedre.github.io/blog/venn.html

0
Entering edit mode
4.0 years ago
FatihSarigol ▴ 260

This one is sort of new and gives perfectly proportional venn diagrams:

Using nVennR to generate and explore n-dimensional, quasi-proportional Venn diagrams

It can also calculate the common/unique members of different groups from a single list..

0
Entering edit mode
3.7 years ago
thulsen • 0