Onto-class {dcGOR}R Documentation

Definition for S4 class Onto

Description

Onto has 2 slots: nodeInfo and adjMatrix

Value

Class Onto

Slots

nodeInfo

An object of S4 class InfoDataFrame, describing information on nodes/terms.

adjMatrix

An object of S4 class AdjData, containing adjacency data matrix (for a direct graph), with rows for parent (arrow-outbound) and columns for children (arrow-inbound)

Creation

An object of this class can be created via: new("Onto", nodeInfo, adjMatrix)

Methods

Class-specific methods:

Standard generic methods:

Access

Ways to access information on this class:

See Also

Onto-method

Examples

# create an object of class Onto, only given a matrix
adjM <- matrix(runif(25),nrow=5,ncol=5)
as(adjM, "Onto")

# create an object of class Onto, given a matrix plus information on nodes
# 1) create nodeI: an object of class InfoDataFrame
data <- data.frame(term_id=paste("Term", 1:5, sep="_"),
term_name=I(LETTERS[1:5]), term_namespace=rep("Namespace",5),
term_distance=1:5, row.names=paste("Term", 1:5, sep="_"))
nodeI <- new("InfoDataFrame", data=data)
nodeI
# 2) create an object of class Onto
# VERY IMPORTANT: make sure having consistent names between nodeInfo and adjMatrix
adjM <- matrix(runif(25),nrow=5,ncol=5)
colnames(adjM) <- rownames(adjM) <- rowNames(nodeI)
x <- new("Onto", adjMatrix=adjM, nodeInfo=nodeI)
x
# 3) look at various methods defined on class Onto
dim(x)
adjMatrix(x)
nodeInfo(x)
nInfo(x)
nodeNames(x)
term_id(x)
term_namespace(x)
term_distance(x)
# 4) get the subset
x[1:2]

[Package dcGOR version 1.0.6 Index]