Dnetwork-class: Definition for S4 class Dnetwork

Description Value Slots Creation Methods Access See Also Examples

Description

Dnetwork is an S4 class to store a domain network, such as the one from semantic similairty between pairs of domains by dcDAGdomainSim. It has 2 slots: nodeInfo and adjMatrix

Value

Class Dnetwork

Slots

nodeInfo

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

adjMatrix

An object of S4 class AdjData, containing symmetric adjacency data matrix for an indirect domain network

Creation

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

Methods

Class-specific methods:

Standard generic methods:

Access

Ways to access information on this class:

See Also

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

# create an object of class Dnetwork, given a matrix plus information on nodes
# 1) create nodeI: an object of class InfoDataFrame
data <- data.frame(id=paste("Domain", 1:5, sep="_"),
level=rep("SCOP",5), description=I(LETTERS[1:5]),
row.names=paste("Domain", 1:5, sep="_"))
nodeI <- new("InfoDataFrame", data=data)
nodeI
# 2) create an object of class Dnetwork
# 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("Dnetwork", adjMatrix=adjM, nodeInfo=nodeI)
x
# 3) look at various methods defined on class Dnetwork
dim(x)
adjMatrix(x)
nodeInfo(x)
nInfo(x)
nodeNames(x)
id(x)
level(x)
description(x)
# 4) get the subset
x[1:2]

dcGOR documentation built on May 2, 2019, 6:14 p.m.

Related to Dnetwork-class in dcGOR...