Cnetwork-class: Definition for S4 class Cnetwork

Description Value Slots Creation Methods Access See Also Examples

Description

Cnetwork is an S4 class to store a contact network, such as the one from RWR-based contact between samples/terms by dcRWRpipeline. It has 2 slots: nodeInfo and adjMatrix

Value

Class Cnetwork

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("Cnetwork", nodeInfo, adjMatrix)

Methods

Class-specific methods:

Standard generic methods:

Access

Ways to access information on this class:

See Also

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

# create an object of class Cnetwork, 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 Cnetwork
# 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("Cnetwork", adjMatrix=adjM, nodeInfo=nodeI)
x
# 3) look at various methods defined on class Cnetwork
dim(x)
adjMatrix(x)
nodeInfo(x)
nInfo(x)
nodeNames(x)
# 4) get the subset
x[1:2]

dcGOR documentation built on May 30, 2017, 7:09 a.m.

Related to Cnetwork-class in dcGOR...