Sets Explorer

Introduction

There are several different ways to visualize number of common features between sets. To make this more convenient, we wrapped a Shiny app named Sets Explorer, which was inspired by the article “Sets and intersections”(Nature Methods volume 11, page 779, 2014) by authors A. Lex & N. Gehlenborg.

Contents

This app aims to help visualize intersections of sets, including:

  • Venn/Euler plot for smaller number of sets (no more than five), generated using the package “eulerr” ;
  • Upset plot for sets of any size, generated using the package “UpSetR” ;
  • Pairwise intersection heatmap for sets of any size, using package “pheatmap”.

Application

When there’s a smaller number of sets (e.g. five or less), intersections are usually illustrated using Euler or Venn diagrams. Euler diagrams represent intersecting sets as overlapping shapes, typically circles or ellipses, that are often drawn so that their area is proportional to the number of elements they represent. Venn diagrams are identical to Euler diagrams with the exception that Venn diagrams show all possible intersections, including empty ones, which are not drawn in Euler diagrams. When there’s a larger number of sets, it is diffcult to vidualize using Euler or Venn diagrams. UpSet plot and Pairwise heatmap are more scalable approaches.

Tutorial

Step 1. Data preparation

There are two different ways to prepare your data.

One way is to upload your data table using a spreadsheet, as the example below. Features that are not detected in each sample can be representated using zero, NAN or blank. It is also optional to use the actual intensities for detected features, otherwise you could simply put the number “1” and such.

The other way is to directly prepare a list of detected features for each sample. This will be copy-pasted to the Shiny app.

Step 2. Upload your data

Go to https://shiny.imetalab.ca/SetExplorer/ and upload your data.

Workflow 1 accepts the spreadsheet, remember to choose the correct character in the data matrix that should be deemed as NA. After checking your data matrix, click “Explore sets” button to continue.

Workflow 2 is prepared for your copy-paste list. First, input the number of sets that you would like to compare, then click “Generate list” button. You’ll then get a blank area to paste the list of features for each sample. After the list is pasted, click the button at the lower right to continue.

Step 3. Explore sets

You will see four tab panels Venn/Euler plot, Upset plot, Pairwise heatmap and Result table download.

For a small number of sets (<= 5), you could choose either Venn or Euler and press “Plot”. A figure will show on the right. Adjust other options to change the appearance. If more than five sets are inputed but “Plot” button is clicked, an error message will show.

Click on the tabs to go to other plots.

In the Upset plot, you can choose specific sets to show, and order the columns on the sets dimension as well as the intersection dimension.

The Pairwise heatmap shows the count with heat colors. If the input is the actual intensity, additional correlation analysis can be performed.

Step 4. Download results

For each figure, there are options to download as svg, png or pdf formats. The result table download tab include the count of shared features between groups.


Back to the list of iMetaShiny Apps.