Anno-class: Definition for S4 class Anno

Description Value Slots Creation Methods Access See Also Examples

Description

Anno has 3 slots: annoData, termData and domainData

Value

Class Anno

Slots

annoData

An object of S4 class AnnoData, containing data matrix with the column number equal to nrow(termData) and the row number equal to nrow(domainData).

termData

An object of S4 class InfoDataFrame, describing information on columns in annoData.

domainData

An object of S4 class InfoDataFrame, describing information on rows in annoData.

Creation

An object of this class can be created via: new("Anno", annoData, termData, domainData)

Methods

Class-specific methods:

Standard generic methods:

Access

Ways to access information on this class:

See Also

Anno-method

Examples

 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
# create an object of class Anno, only given a matrix
annoData <- matrix(runif(50),nrow=10,ncol=5)
as(annoData, "Anno")

# create an object of class Anno, given a matrix plus information on its columns/rows
# 1) create termData: an object of class InfoDataFrame
data <- data.frame(x=1:5, y=I(LETTERS[1:5]), row.names=paste("Term",
1:5, sep="_"))
termData <- new("InfoDataFrame", data=data)
termData
# 2) create domainData: an object of class InfoDataFrame
data <- data.frame(x=1:10, y=I(LETTERS[1:10]),
row.names=paste("Domain", 1:10, sep="_"))
domainData <- new("InfoDataFrame", data=data)
domainData
# 3) create an object of class Anno
# VERY IMPORTANT: make sure having consistent names between annoData and domainData (and termData)
annoData <- matrix(runif(50),nrow=10,ncol=5)
rownames(annoData) <- rowNames(domainData)
colnames(annoData) <- rowNames(termData)
x <- new("Anno", annoData=annoData, domainData=domainData,
termData=termData)
x
# 4) look at various methods defined on class Anno
dim(x)
annoData(x)
termData(x)
tData(x)
domainData(x)
dData(x)
termNames(x)
domainNames(x)
# 5) get the subset
x[1:3,1:2]

dcGOR documentation built on May 2, 2019, 3:34 p.m.

Related to Anno-class in dcGOR...