No retraction, correction or concern found when last checked on Oct 15, 2026.
UpSetR: an R package for the visualization of intersecting sets and their properties
Jake R Conway, Alexander Lex, Nils Gehlenborg
Bioinformatics · 2017 · CC BY
Abstract
Motivation. Venn and Euler diagrams are a popular yet inadequate solution for quantitative visualization of set intersections. A scalable alternative to Venn and Euler diagrams for visualizing intersecting sets and their properties is needed.
Results. We developed UpSetR, an open source R package that employs a scalable matrix-based visualization to show intersections of sets, their size, and other properties.
Availability and implementation. UpSetR is available at https://github.com/hms-dbmi/UpSetR/ and released under the MIT License. A Shiny app is available at https://gehlenborglab.shinyapps.io/upsetr/.
Supplementary information. Supplementary data are available at Bioinformatics online.
Full text
From PubMed Central, U.S. National Library of Medicine, as current on Oct 15, 2026. Paragraph numbers are ours, so an answer can point at one.
1 Introduction
The visualization of sets and their intersections is a common challenge for researchers who are dealing with biological and biomedical data. For example, a researcher might need to compare multiple algorithms that identify single nucleotide polymorphisms (, Supplementary Fig. S1) or show orthologs of genes in newly sequenced species across genomes of related species (, Supplementary Fig. S2). Although many alternative set visualization techniques exist, such data are typically visualized using Venn and Euler diagrams. Such diagrams can be generated with R packages such as venneuler and VennDiagram. These closely related techniques have well known shortcomings, as they are hard to generate for more than a small number of sets. The visual representation of intersection size by irregularly shaped and unaligned areas makes it hard to answer essential questions such as ‘What is the biggest intersection?’ or ‘Is intersection X larger than intersection Y?’.
2 Materials and methods
Here we present an R package named ‘UpSetR’ based on the ‘UpSet’ technique that employs a matrix-based layout to show intersections of sets and their sizes. It is implemented using ggplot2 and allows data analysts to easily generate generate UpSet plots for their own data. UpSetR support three input formats: (i) a table in which the rows represent elements and columns include set assignments and additional attributes; (ii) sets of elements names; and (iii) an expression describing the size of the set intersections as introduced by the venneuler package. UpSetR provides support for the visualization of attributes associated with the elements contained in the sets, enabling researchers to explore and characterize the intersections. UpSetR differs from the original UpSet technique as it is optimized for static plots and for integration into typical bioinformatics workflows. We also provide a Shiny app that allows researchers to create publication-quality UpSet plots directly in a web browser.
UpSetR visualizes intersections of sets as a matrix in which the rows represent the sets and the columns represent their intersections (Fig. 1 and Supplementary Figs. S1 and S2 for comparisons of Venn and Euler diagrams with UpSetR plots). For each set that is part of a given intersection, a black filled circle is placed in the corresponding matrix cell. If a set is not part of the intersection, a light gray circle is shown. A vertical black line connects the topmost black circle with the bottommost black circle in each column to emphasize the column-based relationships. The size of the intersections is shown as a bar chart placed on top of the matrix so that each column lines up with exactly one bar. A second bar chart showing the size of the each set is shown to the left of the matrix.
3 Usage scenario
To illustrate the utility and features of UpSetR, we retrieved variant calls for eight cancer studies from from the ICGC Data Portal (see Supplementary Material). Each cancer study represents a set and each variant represents an element that is contained in one or more sets (Supplementary Fig. S3). UpSetR supports queries on the data to highlight features. Intersection queries can be used to select subsets of elements in the dataset defined by an intersection. Queries are assigned a unique color and their results are plotted on top of the intersection size bar chart. For example, this can be used to select elements in particular intersections (Supplementary Fig. S4). Additionally, UpSetR supports queries for the selection of elements based on attributes associated with the elements in the sets. Attributes can be numerical, Boolean or categorical. In our example, element attributes are chromosome, genomic location, and variant type (deletion, insertion, substitution) associated with each variant. UpSetR element queries select elements across intersections and sets based on particular attribute values. Basic built-in queries can be extended to arbitrarily complex queries by providing a custom query function that operates on any combination of attributes. Element queries can be used to select variants of a particular type, such as deletions, and to view them across intersections (Supplementary Fig. S5).
UpSetR provides integration of additional attribute plots that visualize attributes of elements selected by an intersection or element query. Support for scatter plots and histograms is built into UpSetR. Additional plot types can be integrated by providing in a function that returns a ggplot object to visualize the data. When attribute or intersection queries are applied, query results can also be overlaid on attribute plots in addition to the intersection size bar plot. Figure 1 demonstrates how these features, including the visualization of metadata about the sets, can be combined into a plot that among other issues, reveals a notable over-representation of unique deletions among the variants in the THCA-SA study.
4 Conclusion
UpSetR is a highly customizable tool for data exploration and generation of set visualizations. By making UpSetR compatible with the input formats of the existing popular Venn and Euler diagram packages and by offering a Shiny web interface, we incentivize the use of UpSet diagrams and enable users without programming skills to generate effective set visualizations. Through its seamless integration with ggplot2 and its ability to apply virtually any query, it is possible to customize and explore data in ways not supported by any other set visualization package. In addition, the integration of UpSetR with ggplot2 allows developers to extend UpSetR for use in their own software packages.
References 9
- 1.
Alsallakh B. et al (2016 ) The State-of-the-Art of Set Visualization. Computer Graphics Forum, 35: 234–260.
Not in our library
- 2.
- 3.
Cleveland W.S., McGill R. (1984 ) Graphical perception: Theory, experimentation, and application to the development of graphical methods. J. Am. Stat. Assoc, 79, 531–554.
Not in our library
- 4.
D’Hont A. et al (2012 ) The banana (musa acuminata) genome and the evolution of monocotyledonous plants. Nature, 488, 213–217.
Not in our library10.1038/nature11241
- 5.
Lex A., Gehlenborg N. (2014 ) Sets & intersections. Nat. Methods, 11, 779.
Not in our library10.1038/nmeth.3331
- 6.
Lex A. et al (2014 ) UpSet: Visualization of intersecting sets. IEEE Trans. Vis. Comput. Graph., 20, 1983–1992.
Not in our library10.1109/tvcg.2014.2346248
- 7.
Wickham H. (2009 ). ggplot2: Elegant Graphics for Data Analysis. Springer, New York.
Not in our library
- 8.
Wilkinson L. (2012 ) Exact and approximate area-proportional circular Venn and Euler diagrams. IEEE Trans. Vis. Comput. Graph., 18, 321–331.
Not in our library10.1109/tvcg.2011.56
- 9.
Xu F. et al (2012 ) A fast and accurate SNP detection algorithm for next-generation sequencing data. Nat. Commun., 3, 1258.
Not in our library10.1038/ncomms2256
Cited by papers we hold 60
- The spatial landscape of glial pathology and T cell response in Parkinson’s disease substantia nigra · 2025Not checked
- Personalized bacteriophage therapy outcomes for 100 consecutive cases: a multicentre, multinational, retrospective observational study · 2024No notice
- Characteristics of blood–brain barrier heterogeneity between brain regions revealed by profiling vascular and perivascular cells · 2024No notice
- Genes4Epilepsy : An epilepsy gene resource · 2023No notice
- CRISPR screens reveal genetic determinants of PARP inhibitor sensitivity and resistance in prostate cancer · 2023No notice
- Plasmodium falciparum resistant to artemisinin and diagnostics have emerged in Ethiopia · 2023No notice
- A chromosome-scale genome assembly of the false clownfish, <i>Amphiprion ocellaris</i> · 2022Not checked
- Mild respiratory COVID can cause multi-lineage neural cell and myelin dysregulation · 2022No notice
- Vascular tissue engineering from human adipose tissue: fundamental phenotype of its resident microvascular endothelial cells and stromal/stem cells · 2022Not checked
- Transcriptional Regulation of Pine Male and Female Cone Initiation and Development: Key Players Identified Through Comparative Transcriptomics · 2022Not checked
- An integrated bioinformatic investigation of mitochondrial solute carrier family 25 (SLC25) in colon cancer followed by preliminary validation of member 5 (SLC25A5) in tumorigenesis · 2022Not checked
- Comprehensive Analysis of YTHDF1 Immune Infiltrates and ceRNA in Human Esophageal Carcinoma · 2022Not checked
- Biosynthetic potential of the global ocean microbiome · 2022No notice
- A highly conserved core bacterial microbiota with nitrogen-fixation capacity inhabits the xylem sap in maize plants · 2022No notice
- Population-scale long-read sequencing uncovers transposable elements associated with gene expression variation and adaptive signatures in Drosophila · 2022No notice
- Pseudofinder: Detection of Pseudogenes in Prokaryotic Genomes · 2022No notice
- Characterization of the COPD alveolar niche using single-cell RNA sequencing · 2022No notice
- Convergent Epigenetic Mechanisms Avoid Constitutive Expression of Immune Receptor Gene Subsets · 2021Not checked
- Characterization of progression-related alternative splicing events in testicular germ cell tumors · 2021Not checked
- Additional description and genome analyses of Caenorhabditis auriculariae representing the basal lineage of genus Caenorhabditis · 2021Not checked
and 40 more
Reads
Read by people on this page
None yet.
Checked or read by AI through naulon
None yet.
A person counts once a day per paper. We keep no cookie and no address: a reader is a hash that changes every day. Any month under five reads shows no number.
Are you an author?
Is this your paper?
Claim it to add your note and be paid when agents cite it. Free.