Want to share your content on R bloggers? click here if you have a blog, or here if you don’t.
Overview
In general, set operations are very useful for comparing lists of things. These lists can contain all possible strings, such as gene or species names.
Set operations are also a good way to identify unique or shared genes in sets of analysis results. The free phone The SO app helps you perform fixed operations with gene lists, which can be produced based on differential expression or network analysis.
Potential questions
What shared genes drive the patterns of DE across genotypes?
Which genes drive the patterns of DE across treatments?
Which DE genes share coexpression patterns in a given network module?
Learning objectives
- Learn how to perform set operations with ggVennDiagram
- Practice comparing lists of gene names
- Understand how to identify shared and unique genes
Related
This tutorial is the fifth in a series on omics data analysis:
- Differential expression analysis with freeCount
- Functional analysis with freeCount
- Network analysis with freeCount
- Functional analysis of networks with freeCount
ggVennDiagram
The ggVennDiagram The R package enables nice Venn plots with 2-7 sets and generates publication quality figures. It also supports perturbed plots with unlimited sets as of version 1.4.4.
Before you start
The exercise in this tutorial uses the freeCount apps in RStudio on a PC. Make sure you have downloaded, installed, and installed the following tools up to date on your PC:
- R software environment
- RStudio desktop application
For Windows usersadditionally install RTools.
It is also possible to run the freeCount apps online via Posit Cloud. To see how, check out the freeCount Bioinformatics analysis apps on Posit Cloud self-study.
Input data
- Download the tribolium gene list 1 file
- Download the tribolium gene list 2 file
- Download the tribolium gene list 3 file
- Download the tribolium gene list 4 file
Tip! After clicking on the data linked above, right click and select Save as… to download the above files in the necessary formats.
The Analysis App
The following steps show you how to download and launch the freeCount set operations (SO) app.
- Download the free Count R Shiny applications
- Go to https://github.com/ElizabethBrooks/freeCount
- Click on the green < > Code knob
- Click Download ZIP
- Grab the freeCount-main folder
- Navigate to the apps folder
- Open the SO.R file in RStudio
- Click Install on the yellow banner to install the necessary R packages (or run the code on lines 10 through 15)
- Click on the Run app button in the top right corner of the source panel
Analysis process
Complete the following steps to create a
- Upload the four data sets
- Download the two-way Venn diagram results
- Download the results of the three-way Venn diagram
- Download the results of the four-way Venn diagram
1. Upload data
Upload the datasets (lists) you want to compare.
Input data
- First, upload a file with the list of things you want to compare. These lists can contain all kinds of strings, such as gene or species names. In this tutorial we will use the tribolium gene list 1 file.
- Then upload the second file with a list. In this tutorial we will use the tribolium gene list 2 file. After the second file is uploaded, the analysis results will appear. You can also continue to upload sets/lists that you want to compare (maximum 4 sets).
- Third, upload the third file with a list. In this tutorial we will use the tribolium gene list 3 file.
- Finally, upload the fourth file with a list. In this tutorial we will use the tribolium gene list 4 file. The free Count SO app allows you to compare up to 4 sets.
Note that the gene names in these files are actually IDs specific to the species and database.

2. Download Two-Way Venn
Download the two-way Venn diagram results from the Venn diagrams tab.

Below each Venn diagram are dropdowns and download buttons, which allow you to export specific set intersections. This allows you to select unique or shared gene lists for the sets you are comparing.

3. Download Three-Way Venn
Download the three-way Venn diagram results from the Venn diagrams tab.

4. Download Four-Way Venn
Download the four-way Venn diagram results from the Venn diagrams tab.

Related
#Set #operations #freeCount #bloggers


