BioVenn Tutorial

Example diagram 1: 3-circle diagram with absolute numbers

Create three lists of Affymetrix IDs.

list_x <- c("1007_s_at","1053_at","117_at","121_at","1255_g_at","1294_at")
list_y <- c("1255_g_at","1294_at","1316_at","1320_at","1405_i_at")
list_z <- c("1007_s_at","1405_i_at","1255_g_at","1431_at","1438_at","1487_at","1494_f_at")

Create the BioVenn diagram, using the three lists as input. The subtitle is set to “Example diagram 1”, and absolute numbers will be displayed. The function prints the resulting numbers.

biovenn <- draw.venn(list_x, list_y, list_z, subtitle="Example diagram 1", nrtype="abs")
## [1] "x total: 6"
## [1] "y total: 5"
## [1] "z total: 7"
## [1] "x only: 3"
## [1] "y only: 2"
## [1] "z only: 4"
## [1] "x-y total overlap: 2"
## [1] "x-z total overlap: 2"
## [1] "y-z total overlap: 2"
## [1] "x-y only overlap: 1"
## [1] "x-z only overlap: 1"
## [1] "y-z only overlap: 1"
## [1] "x-y-z overlap: 1"

The returned object contains the thirteen lists (the sets and their overlaps).

biovenn
## $x
## [1] "1007_s_at" "1053_at"   "117_at"    "121_at"    "1255_g_at" "1294_at"  
## 
## $y
## [1] "1255_g_at" "1294_at"   "1316_at"   "1320_at"   "1405_i_at"
## 
## $z
## [1] "1007_s_at" "1405_i_at" "1255_g_at" "1431_at"   "1438_at"   "1487_at"  
## [7] "1494_f_at"
## 
## $x_only
## [1] "1053_at" "117_at"  "121_at" 
## 
## $y_only
## [1] "1316_at" "1320_at"
## 
## $z_only
## [1] "1431_at"   "1438_at"   "1487_at"   "1494_f_at"
## 
## $xy
## [1] "1255_g_at" "1294_at"  
## 
## $xz
## [1] "1007_s_at" "1255_g_at"
## 
## $yz
## [1] "1255_g_at" "1405_i_at"
## 
## $xy_only
## [1] "1294_at"
## 
## $xz_only
## [1] "1007_s_at"
## 
## $yz_only
## [1] "1405_i_at"
## 
## $xyz
## [1] "1255_g_at"

Example diagram 2: 2-circle diagram with percentages

Create two lists of Ensembl IDs.

list_x <- NULL
list_y <- c("ENSG00000070778","ENSG00000271503","ENSG00000126351","ENSG00000182179","ENSG00000283726","ENSG00000048545","ENSG00000287363","ENSG00000274233")
list_z <- c("ENSG00000130649","ENSG00000173153","ENSG00000215572","ENSG00000271503","ENSG00000255974","ENSG00000198077","ENSG00000182580","ENSG00000204580","ENSG00000048545","ENSG00000287363","ENSG00000274233","ENSG00000137332","ENSG00000230456","ENSG00000234078","ENSG00000215522")

Create the BioVenn diagram, using the two lists as input. The subtitle is set to “Example diagram 2”, and percentages will be displayed. The function prints the resulting numbers.

biovenn <- draw.venn(list_x, list_y, list_z, subtitle="Example diagram 2", nrtype="pct")
## [1] "x total: 0"
## [1] "y total: 8"
## [1] "z total: 15"
## [1] "x only: 0"
## [1] "y only: 4"
## [1] "z only: 11"
## [1] "x-y total overlap: 0"
## [1] "x-z total overlap: 0"
## [1] "y-z total overlap: 4"
## [1] "x-y only overlap: 0"
## [1] "x-z only overlap: 0"
## [1] "y-z only overlap: 4"
## [1] "x-y-z overlap: 0"

The returned object contains the thirteen lists (the sets and their overlaps).

biovenn
## $x
## NULL
## 
## $y
## [1] "ENSG00000070778" "ENSG00000271503" "ENSG00000126351" "ENSG00000182179"
## [5] "ENSG00000283726" "ENSG00000048545" "ENSG00000287363" "ENSG00000274233"
## 
## $z
##  [1] "ENSG00000130649" "ENSG00000173153" "ENSG00000215572" "ENSG00000271503"
##  [5] "ENSG00000255974" "ENSG00000198077" "ENSG00000182580" "ENSG00000204580"
##  [9] "ENSG00000048545" "ENSG00000287363" "ENSG00000274233" "ENSG00000137332"
## [13] "ENSG00000230456" "ENSG00000234078" "ENSG00000215522"
## 
## $x_only
## NULL
## 
## $y_only
## [1] "ENSG00000070778" "ENSG00000126351" "ENSG00000182179" "ENSG00000283726"
## 
## $z_only
##  [1] "ENSG00000130649" "ENSG00000173153" "ENSG00000215572" "ENSG00000255974"
##  [5] "ENSG00000198077" "ENSG00000182580" "ENSG00000204580" "ENSG00000137332"
##  [9] "ENSG00000230456" "ENSG00000234078" "ENSG00000215522"
## 
## $xy
## NULL
## 
## $xz
## NULL
## 
## $yz
## [1] "ENSG00000271503" "ENSG00000048545" "ENSG00000287363" "ENSG00000274233"
## 
## $xy_only
## NULL
## 
## $xz_only
## NULL
## 
## $yz_only
## [1] "ENSG00000271503" "ENSG00000048545" "ENSG00000287363" "ENSG00000274233"
## 
## $xyz
## NULL

Example diagram 3: 3-circle diagram with altered colours

Create three lists of Affymetrix IDs.

list_x <- c("1007_s_at","1053_at","117_at","121_at","1255_g_at","1294_at")
list_y <- c("1255_g_at","1294_at","1316_at","1320_at","1405_i_at")
list_z <- c("1007_s_at","1405_i_at","1255_g_at","1431_at","1438_at","1487_at","1494_f_at")

Create the BioVenn diagram, using the three lists as input. The subtitle is set to “Example diagram 3”, and absolute numbers will be displayed. The background colour will be black, with different circle colours and white text. The function prints the resulting numbers.

biovenn <- draw.venn(list_x, list_y, list_z, t_c="#FFFFFF", subtitle="Example diagram 3", st_c="#FFFFFF", xt_c="#FFFFFF", yt_c="#FFFFFF", zt_c="#FFFFFF", nrtype="abs", nr_c="#FFFFFF", x_c="#FFFF00", y_c="#FF00FF", z_c="#00FFFF", bg_c="#000000")
## [1] "x total: 6"
## [1] "y total: 5"
## [1] "z total: 7"
## [1] "x only: 3"
## [1] "y only: 2"
## [1] "z only: 4"
## [1] "x-y total overlap: 2"
## [1] "x-z total overlap: 2"
## [1] "y-z total overlap: 2"
## [1] "x-y only overlap: 1"
## [1] "x-z only overlap: 1"
## [1] "y-z only overlap: 1"
## [1] "x-y-z overlap: 1"

The returned object contains the thirteen lists (the sets and their overlaps).

biovenn
## $x
## [1] "1007_s_at" "1053_at"   "117_at"    "121_at"    "1255_g_at" "1294_at"  
## 
## $y
## [1] "1255_g_at" "1294_at"   "1316_at"   "1320_at"   "1405_i_at"
## 
## $z
## [1] "1007_s_at" "1405_i_at" "1255_g_at" "1431_at"   "1438_at"   "1487_at"  
## [7] "1494_f_at"
## 
## $x_only
## [1] "1053_at" "117_at"  "121_at" 
## 
## $y_only
## [1] "1316_at" "1320_at"
## 
## $z_only
## [1] "1431_at"   "1438_at"   "1487_at"   "1494_f_at"
## 
## $xy
## [1] "1255_g_at" "1294_at"  
## 
## $xz
## [1] "1007_s_at" "1255_g_at"
## 
## $yz
## [1] "1255_g_at" "1405_i_at"
## 
## $xy_only
## [1] "1294_at"
## 
## $xz_only
## [1] "1007_s_at"
## 
## $yz_only
## [1] "1405_i_at"
## 
## $xyz
## [1] "1255_g_at"