VennDiagram: a package for the generation of highly-customizable Venn and Euler diagrams in R.
Chen H, Boutros PC. · 2011
Read VennDiagram: a package for the generation of highly-customizable Venn and Euler diagrams in R. by Chen H, Boutros PC. (2011) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/europmc-pmc3041657.txt.
Introduction
Chen and Boutros released in 2011 a software package that draws polished Venn and Euler diagrams inside the R statistics system. Such diagrams show how sets overlap, a need that comes up constantly when biologists merge results from several experiments. Older tools offered little control over colors, labels, and layout, and rarely produced print ready files.
The package lets users adjust nearly every feature, from fonts and label placement to rotation and transparency. It handles Venn diagrams of up to four sets and Euler diagrams, which drop empty overlaps for clarity, of up to three. Output is saved as high resolution image files ready for journals. Sensible defaults mean simple diagrams need almost no setup. The authors built it to slot into the analysis pipelines biologists already use in R.
Catalog record
| CREATOR | Chen H, Boutros PC. |
|---|---|
| YEAR | 2011 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 18 KB |
| LICENSE | CC BY 4.0 |
| RIGHTS | CC BY |
| SOURCE | Europe PMC |
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
VennDiagram: a package for the generation of highly-customizable Venn and Euler diagrams in R By Hanbo Chen, Paul C Boutros Published in: BMC Bioinformatics DOI: 10.1186/1471-2105-12-35 ABSTRACT Abstract Background Visualization of orthogonal (disjoint) or overlapping datasets is a common task in bioinformatics. Few tools exist to automate the generation of extensively-customizable, high-resolution Venn and Euler diagrams in the R statistical environment. To fill this gap we introduce VennDiagram, an R package that enables the automated generation of highly-customizable, high-resolution Venn diagrams with up to four sets and Euler diagrams with up to three sets. Results The VennDiagram package offers the user the ability to customize essentially all aspects of the generated diagrams, including font sizes, label styles and locations, and the overall rotation of the diagram. We have implemented scaled Venn and Euler diagrams, which increase graphical accuracy and visual appeal. Diagrams are generated as high-definition TIFF files, simplifying the process of creating publication-quality figures and easing integration with established analysis pipelines. Conclusions The VennDiagram package allows the creation of high quality Venn and Euler diagrams in the R statistical environment. BACKGROUND The visualization of complex datasets is an increasingly important part of biology. Many experiments involve the integration of multiple datasets to understand complementary aspects of biology. These overlapping results can be visualized in a number of ways, including textual tables (e.g. two-way tables), network diagrams [1,2] and in some cases heatmaps [3,4]. Venn diagrams have seen increasing use due to their familiarity, ease-of-interpretation, and graphical simplicity. For the purpose of this publication, Venn diagrams can be defined as diagrams that use simple geometrical shapes such as circles and ellipses to display all 2n-1 possible areas created by the interaction of n sets. The use of simple geometrical shapes reduces figure complexity and size relative to space-consuming tables or network layouts. However, despite this popularity, there are currently few packages for generating Venn diagrams in the widely-used R statistical environment. These packages are limited in their ability to generate high-resolution, publication-quality Venn diagrams in that they allow little customization of colours, line-types, label-placement, and label font. Numerous special-cases are handled inappropriately, and the output is not usually in the format of high-resolution, publication-quality TIFF files. Other, non-R-based local or web-based software capable of generating Venn diagrams exist, such as Venny [5], BioVenn [6], ConSet [7], and VennMaster [8]. All of these suffer from some of the weaknesses listed above. Further, integration into standard R-based statistical/computational pipelines such as the widely used BioConductor libraries of the R statistical environment [9] is viable, but not technically trivial. Additionally, if some intersecting or non-intersecting areas in a Venn diagram do not exist, another class of diagrams called Euler diagrams may be more desirable. Euler diagrams are equivalent to Venn diagrams when all intersecting and non-intersecting areas exist. However, areas containing zero elements are shown on Venn diagrams (by definition), whereas Euler diagrams show only non-zero areas. In many cases, Euler diagrams further reduce figure complexity, increase graphical accuracy and improve overall readability relative to Venn diagrams. Unfortunately, almost all existing packages cannot generate publication-quality Euler diagrams in R, although VennEuler does generate Euler diagrams. To address these issues we introduce VennDiagram, an R package for generating highly customizable, high-resolution Venn diagrams with up to four sets and Euler diagrams of two or three sets in the R statistical environment. IMPLEMENTATION The VennDiagram package has been developed in and designed for the R statistical environment. The R environment is open-source and available online under the GNU General Public License (GPLv2). R was chosen because of its open-source nature, versatile functions, and general preference within the bioinformatics community. The use of R should facilitate integration with existing data-analysis pipelines. All code was designed and tested using version 2.12.1 (32-bit and 64-bit versions) of R. The VennDiagram package is available as Additional Files 1 (linux .tar.gz file) and 2 (windows .zip file). VennDiagram uses the grid package for graphics. The grid package is a base (standard) package available in all installations, and offers more manoeuvrability than default R graphics in terms of graphical options and the existence of modifiable grid objects. VennDiagram uses these features to dynamically stretch/compress diagrams to fit the dimensions of the output file and to offer a vast number of graphical options. RESULTS Almost all graphical options in the VennDiagram package have been parameterized and made customizable. Default values were selected to generate sensible diagrams, so in simple cases a high level of customization is not required. Figure 1 highlights the diversity of parameterizations available. Four major graphical parameter groups exist: shape-fill, shape-line, labels and titles. Shape-fill refers to the colours within each circle or ellipse. All colours available in the R environment can be used, and alpha-blending can be adjusted on a per-shape basis. Shape-lines are the lines that surround each circle or ellipse. They can be entirely absent (figure 1C), solid (figures 1A and 1B), or any other R line-type available (figure 1D). Their colour can be changed, and each shape can have a separate set of parameters. Labels refer both to the captions describing each circle or ellipse and to the numbers within them. Again, these can be customized in terms of colour, font-type, and font-size with any available R parameter. The positions of caption labels can also be customized. Titles, which include the main title and the subtitle as demonstrated in figure 1D, can also be customized in the same way as labels. [Figure: The four types of Venn diagrams drawn by the VennDiagram package. A) A one-set Venn diagram showing rudimentary customizable features such as label font size, label font face, and shape-fill. B) A two-set Venn diagram showing more advanced features such as scaling, individual shape-fill specifications, and individual caption label placement. C) A three-set Venn diagram showing a different shape-line type ("transparent") and the "text" option of caption label placement where the caption labels are attached to area labels. D) A four-set Venn diagram showing a combination of all previous features plus the ability to customize titles. The code to generate all diagrams shown here is included in Additional File 3.] Beyond these specific graphic elements, VennDiagram also offers many general options, such as the scaling, rotation, or inversion of diagrams. Diagram scaling was implemented with the goal of displaying Venn diagrams where the graphical sizes of the partial areas (areas bound on all sides by curves and that cannot be further subdivided) actually correspond to the numerical values of the number of elements within each region. Scaling of two-set Venn diagrams and a select number of three-set Venn diagrams is possible - we discuss below the challenges of making this possible for all three-set cases. The use of scaling can sometimes lead to overlapping areas being too small for numeric labels. Figure 2, row 1, column 1 shows a programmatically generated connecting line that allows special handling of this case. Automatic recognition of a large number of Euler diagrams is implemented, but this mode can be deactivated with a function-call parameter to plot standard Venn diagrams instead. Figure 2, row 1, columns 2 and 3 show two examples of two-set Euler diagrams. Rows 2 and 3 show a subset of implemented three-set Euler