Description Usage Arguments Value Note Author(s) References See Also Examples
Ploting function of 2-5 way Venn diagrams from 'VENNset' objects or count set vectors. A useful feature is the possiblity to combine the counts from several Venn comparisons with the same number of label sets in a single Venn diagram.
1 | vennPlot(x, mymain = "Venn Diagram", mysub = "default", setlabels = "default", yoffset = seq(0, 10, by = 0.34), ccol = rep(1, 31), colmode = 1, lcol = c("#FF0000", "#008B00", "#0000FF", "#FF00FF", "#CD8500"), lines = c("#FF0000", "#008B00", "#0000FF", "#FF00FF", "#CD8500"), mylwd = 3, diacol = 1, type = "ellipse", ccex = 1, lcex = 1, sepsplit = "_", ...)
|
x |
|
mymain |
Main title of plot. |
mysub |
Subtitle of plot. Default |
setlabels |
The argument |
yoffset |
The results from several Venn comparisons can be combined in a single Venn diagram
by assigning to |
ccol |
Character or numeric |
colmode |
See argument |
lcol |
Character or numeric |
lines |
Character or numeric |
mylwd |
Defines line width of shapes used in plot. |
diacol |
See argument |
type |
Defines shapes used to plot 4-way Venn diagram. Default |
ccex |
Controls font size for count values. |
lcex |
Controls font size for set labels. |
sepsplit |
Character used to separate sample labels in Venn counts. |
... |
Additional arguments to pass on. |
Venn diagram plot.
The functions provided here are an extension of the Venn diagram resources on this site: http://manuals.bioinformatics.ucr.edu/home/R_BioCondManual#TOC-Venn-Diagrams
Thomas Girke
See examples in 'The Electronic Journal of Combinatorics': http://www.combinatorics.org/files/Surveys/ds5/VennSymmExamples.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | ## Sample data
setlist <- list(A=sample(letters, 18), B=sample(letters, 16),
C=sample(letters, 20), D=sample(letters, 22),
E=sample(letters, 18), F=sample(letters, 22))
## 2-way Venn diagram
vennset <- overLapper(setlist[1:2], type="vennsets")
vennPlot(vennset)
## 3-way Venn diagram
vennset <- overLapper(setlist[1:3], type="vennsets")
vennPlot(vennset)
## 4-way Venn diagram
vennset <- overLapper(setlist[1:4], type="vennsets")
vennPlot(list(vennset, vennset))
## Pseudo 4-way Venn diagram with circles
vennPlot(vennset, type="circle")
## 5-way Venn diagram
vennset <- overLapper(setlist[1:5], type="vennsets")
vennPlot(vennset)
## Alternative Venn count input to vennPlot (not recommended!)
counts <- sapply(vennlist(vennset), length)
vennPlot(counts)
## 6-way Venn comparison as bar plot
vennset <- overLapper(setlist[1:6], type="vennsets")
olBarplot(vennset, mincount=1)
## Bar plot of standard intersect counts
interset <- overLapper(setlist, type="intersects")
olBarplot(interset, mincount=1)
## Accessor methods for VENNset/INTERSECTset objects
names(vennset)
names(interset)
setlist(vennset)
intersectmatrix(vennset)
complexitylevels(vennset)
vennlist(vennset)
intersectlist(interset)
## Coerce VENNset/INTERSECTset object to list
as.list(vennset)
as.list(interset)
## Pairwise intersect matrix and heatmap
olMA <- sapply(names(setlist),
function(x) sapply(names(setlist),
function(y) sum(setlist[[x]] %in% setlist[[y]])))
olMA
heatmap(olMA, Rowv=NA, Colv=NA)
## Presence-absence matrices for large numbers of sample sets
interset <- overLapper(setlist=setlist, type="intersects", complexity=2)
(paMA <- intersectmatrix(interset))
heatmap(paMA, Rowv=NA, Colv=NA, col=c("white", "gray"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.