Last data update: 2014.03.03
R: Class '"VENNset"'
VENNset-class R Documentation
Class "VENNset"
Description
Container for storing Venn intersect results created by the overLapper
function.
The setlist
slot stores the original label sets as vectors
in a list
;
intersectmatrix
organizes the label sets in a present-absent matrix; complexitylevels
represents the number of comparisons considered for each comparison set as vector of integers;
and vennlist
contains the Venn intersect vectors.
Objects from the Class
Objects can be created by calls of the form new("VENNset", ...)
.
Slots
setlist
:Object of class "list"
: list
of vectors
intersectmatrix
:Object of class "matrix"
: binary matrix
complexitylevels
:Object of class "integer"
: vector
of integers
vennlist
:Object of class "list"
: list
of vectors
Methods
as.list signature(x = "VENNset")
: coerces VENNset
to list
coerce signature(from = "list", to = "VENNset")
: as(list, "VENNset")
complexitylevels signature(x = "VENNset")
: extracts data from complexitylevels
slot
intersectmatrix signature(x = "VENNset")
: extracts data from intersectmatrix
slot
length signature(x = "VENNset")
: returns number of original label sets
names signature(x = "VENNset")
: extracts slot names
setlist signature(x = "VENNset")
: extracts data from setlist
slot
show signature(object = "VENNset")
: summary view of VENNset
objects
vennlist signature(x = "VENNset")
: extracts data from vennset
slot
Author(s)
Thomas Girke
See Also
overLapper
, vennPlot
, olBarplot
, INTERSECTset-class
Examples
showClass("VENNset")
## 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))
## Create VENNset
vennset <- overLapper(setlist[1:5], type="vennsets")
class(vennset)
## Accessor methods for VENNset/INTERSECTset objects
names(vennset)
setlist(vennset)
intersectmatrix(vennset)
complexitylevels(vennset)
vennlist(vennset)
## Coerce VENNset/INTERSECTset object to list
as.list(vennset)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(systemPipeR)
Loading required package: Rsamtools
Loading required package: GenomeInfoDb
Loading required package: stats4
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, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: Biostrings
Loading required package: XVector
Loading required package: ShortRead
Loading required package: BiocParallel
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/systemPipeR/VENNset-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: VENNset-class
> ### Title: Class '"VENNset"'
> ### Aliases: VENNset-class as.list,VENNset-method
> ### coerce,list,VENNset-method complexitylevels,VENNset-method
> ### intersectmatrix,VENNset-method length,VENNset-method
> ### names,VENNset-method setlist,VENNset-method show,VENNset-method
> ### vennlist,VENNset-method
> ### Keywords: classes
>
> ### ** Examples
>
> showClass("VENNset")
Class "VENNset" [package "systemPipeR"]
Slots:
Name: setlist intersectmatrix complexitylevels vennlist
Class: list matrix integer list
>
> ## 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))
>
> ## Create VENNset
> vennset <- overLapper(setlist[1:5], type="vennsets")
> class(vennset)
[1] "VENNset"
attr(,"package")
[1] "systemPipeR"
>
> ## Accessor methods for VENNset/INTERSECTset objects
> names(vennset)
[1] "setlist" "intersectmatrix" "complexitylevels" "vennlist"
> setlist(vennset)
$A
[1] "c" "e" "m" "u" "y" "h" "d" "r" "a" "q" "b" "o" "n" "t" "l" "s" "j" "g"
$B
[1] "u" "v" "p" "b" "z" "x" "s" "l" "j" "y" "c" "h" "d" "m" "i" "g"
$C
[1] "g" "d" "e" "x" "w" "s" "k" "a" "i" "b" "c" "m" "f" "q" "j" "r" "o" "l" "t"
[20] "z"
$D
[1] "a" "z" "f" "i" "j" "b" "g" "v" "q" "n" "e" "p" "k" "c" "w" "o" "h" "y" "r"
[20] "s" "m" "l"
$E
[1] "v" "j" "s" "c" "d" "b" "f" "z" "h" "m" "l" "k" "o" "q" "i" "r" "w" "g"
> intersectmatrix(vennset)
A B C D E
a 1 0 1 1 0
b 1 1 1 1 1
c 1 1 1 1 1
d 1 1 1 0 1
e 1 0 1 1 0
f 0 0 1 1 1
g 1 1 1 1 1
h 1 1 0 1 1
i 0 1 1 1 1
j 1 1 1 1 1
k 0 0 1 1 1
l 1 1 1 1 1
m 1 1 1 1 1
n 1 0 0 1 0
o 1 0 1 1 1
p 0 1 0 1 0
q 1 0 1 1 1
r 1 0 1 1 1
s 1 1 1 1 1
t 1 0 1 0 0
u 1 1 0 0 0
v 0 1 0 1 1
w 0 0 1 1 1
x 0 1 1 0 0
y 1 1 0 1 0
z 0 1 1 1 1
> complexitylevels(vennset)
[1] 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 5
> vennlist(vennset)
$A
character(0)
$B
character(0)
$C
character(0)
$D
character(0)
$E
character(0)
$A_B
[1] "u"
$A_C
[1] "t"
$A_D
[1] "n"
$A_E
character(0)
$B_C
[1] "x"
$B_D
[1] "p"
$B_E
character(0)
$C_D
character(0)
$C_E
character(0)
$D_E
character(0)
$A_B_C
character(0)
$A_B_D
[1] "y"
$A_B_E
character(0)
$A_C_D
[1] "a" "e"
$A_C_E
character(0)
$A_D_E
character(0)
$B_C_D
character(0)
$B_C_E
character(0)
$B_D_E
[1] "v"
$C_D_E
[1] "f" "k" "w"
$A_B_C_D
character(0)
$A_B_C_E
[1] "d"
$A_B_D_E
[1] "h"
$A_C_D_E
[1] "o" "q" "r"
$B_C_D_E
[1] "i" "z"
$A_B_C_D_E
[1] "b" "c" "g" "j" "l" "m" "s"
>
> ## Coerce VENNset/INTERSECTset object to list
> as.list(vennset)
$setlist
$setlist$A
[1] "c" "e" "m" "u" "y" "h" "d" "r" "a" "q" "b" "o" "n" "t" "l" "s" "j" "g"
$setlist$B
[1] "u" "v" "p" "b" "z" "x" "s" "l" "j" "y" "c" "h" "d" "m" "i" "g"
$setlist$C
[1] "g" "d" "e" "x" "w" "s" "k" "a" "i" "b" "c" "m" "f" "q" "j" "r" "o" "l" "t"
[20] "z"
$setlist$D
[1] "a" "z" "f" "i" "j" "b" "g" "v" "q" "n" "e" "p" "k" "c" "w" "o" "h" "y" "r"
[20] "s" "m" "l"
$setlist$E
[1] "v" "j" "s" "c" "d" "b" "f" "z" "h" "m" "l" "k" "o" "q" "i" "r" "w" "g"
$intersectmatrix
A B C D E
a 1 0 1 1 0
b 1 1 1 1 1
c 1 1 1 1 1
d 1 1 1 0 1
e 1 0 1 1 0
f 0 0 1 1 1
g 1 1 1 1 1
h 1 1 0 1 1
i 0 1 1 1 1
j 1 1 1 1 1
k 0 0 1 1 1
l 1 1 1 1 1
m 1 1 1 1 1
n 1 0 0 1 0
o 1 0 1 1 1
p 0 1 0 1 0
q 1 0 1 1 1
r 1 0 1 1 1
s 1 1 1 1 1
t 1 0 1 0 0
u 1 1 0 0 0
v 0 1 0 1 1
w 0 0 1 1 1
x 0 1 1 0 0
y 1 1 0 1 0
z 0 1 1 1 1
$complexitylevels
[1] 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 5
$vennlist
$vennlist$A
character(0)
$vennlist$B
character(0)
$vennlist$C
character(0)
$vennlist$D
character(0)
$vennlist$E
character(0)
$vennlist$A_B
[1] "u"
$vennlist$A_C
[1] "t"
$vennlist$A_D
[1] "n"
$vennlist$A_E
character(0)
$vennlist$B_C
[1] "x"
$vennlist$B_D
[1] "p"
$vennlist$B_E
character(0)
$vennlist$C_D
character(0)
$vennlist$C_E
character(0)
$vennlist$D_E
character(0)
$vennlist$A_B_C
character(0)
$vennlist$A_B_D
[1] "y"
$vennlist$A_B_E
character(0)
$vennlist$A_C_D
[1] "a" "e"
$vennlist$A_C_E
character(0)
$vennlist$A_D_E
character(0)
$vennlist$B_C_D
character(0)
$vennlist$B_C_E
character(0)
$vennlist$B_D_E
[1] "v"
$vennlist$C_D_E
[1] "f" "k" "w"
$vennlist$A_B_C_D
character(0)
$vennlist$A_B_C_E
[1] "d"
$vennlist$A_B_D_E
[1] "h"
$vennlist$A_C_D_E
[1] "o" "q" "r"
$vennlist$B_C_D_E
[1] "i" "z"
$vennlist$A_B_C_D_E
[1] "b" "c" "g" "j" "l" "m" "s"
>
>
>
>
>
> dev.off()
null device
1
>