This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Venn diagrams for multiple (8) data lists in R

Hi.

I have around eight different lists with numerical values and i want to create a Venn plot for all of them. My lists looks like the above and have different length.

l1 = c(12,1234,544,6546,6445,45465,4566,1333)
l2 = c(89,2344,2346,6564,6424,770,12,4566,1333,4003,234,432)
l3 = c(4003,4002,432,1234)
l4 = ....
l5 = ....

I tried to use the vennDiagram from limma package but without any success and maybe because they have different length.

Is there any quick way to build a Venn diagram for them without calculating by hand the overlap values for each one with the other with intersect() function ?

Thank you

r venn diagram

might be better to just provided a binary matrix and pair-wise overlaps than an unreadable Venn diagram

2 answers

There's the venneuler package for this. Note that Euler diagrams with many sets are usually poor visualizations and are best avoided. You should try alternative visualizations e.g. from the UpSetR package.

Upvote for UpSetR. I used it recently, and though it took me some time to know how to read it properly - and explain it to my colleagues - it was easy enough to create a simple plot. Definitely and improvement on an 8-way venn which will be unreadable.

+1 for UpSetR from me too. It needs some familiarization to read it but it's really helpful.

Kudos for UpSetR! I've been looking for a tool like this for a while.

You can download the generated SVG file and customize as you want.

http://bioinformatics.psb.ugent.be/webtools/Venn/

This link is interesting. Thanks for sharing. +1 for the amazing link

Log in to answer this question.