rm(list = ls())
#BiocManager::install(c("RBGL","graph"))
#install.packages("Vennerable", repos="http://R-Forge.R-project.org")
library(Vennerable)
## Loading required package: graph
## Loading required package: BiocGenerics
## Loading required package: parallel
##
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:parallel':
##
## clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
## clusterExport, clusterMap, parApply, parCapply, parLapply,
## parLapplyLB, parRapply, parSapply, parSapplyLB
## The following objects are masked from 'package:stats':
##
## IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
##
## anyDuplicated, append, as.data.frame, basename, cbind, colnames,
## dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
## grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
## order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
## rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
## union, unique, unsplit, which, which.max, which.min
## Loading required package: RBGL
## Loading required package: grid
## Loading required package: lattice
## Loading required package: RColorBrewer
## Loading required package: reshape
## Warning: package 'reshape' was built under R version 4.0.3
## Loading required package: gtools
## Loading required package: xtable
data(StemCell)
class(StemCell)
## [1] "list"
#View(StemCell)
names(StemCell)
## [1] "OCT4" "SOX2" "NANOG" "E2F4"
StemCell[[1]][1:10]
## [1] "AASDH" "ABTB2" "ACCN4" "ACD" "ADAMTS16" "ADAMTSL1"
## [7] "ADD3" "ADRA1A" "ADRA2A" "ALKBH"
VennRaw <- Venn(StemCell)
VennRaw
## A Venn object on 4 sets named
## OCT4,SOX2,NANOG,E2F4
## 0000 1000 0100 1100 0010 1010 0110 1110 0001 1001 0101 1101 0011 1011 0111 1111
## 0 109 305 45 644 64 354 287 821 30 78 6 118 16 138 66
Venn3 <- VennRaw[, c("OCT4", "SOX2", "NANOG")]
Venn3
## A Venn object on 3 sets named
## OCT4,SOX2,NANOG
## 000 100 010 110 001 101 011 111
## 821 139 383 51 762 80 492 353
########circles", "squares", "triangles", or "AWFE"
plot(Venn3, doWeights = T)

plot(Venn3, doWeights = F)

plot(VennRaw, doWeights = F,type="AWFE")

plot(VennRaw, doWeights = T,type="AWFE")

plot(Venn3,type="squares")

plot(Venn3,type="triangles")

??Vennerable
## starting httpd help server ...
## done
#https://harrycaufield.net/severalog/2015/5/7/venn-diagrams-in-r-or-how-to-go-around-in-circles
#help(Vennerable)