View source: R/MultiModuleDetect.R
MultiModuleFind | R Documentation |
Detect multiple possible optimized subnetworks in network object based on either combined node scores and edge scores or node scores only in the network by heuristic algorithm by maximizing the weighted sum of node scores and edge scores in all possible subnetworks or by maximizing sum of node scores in all possible subnetworks
MultiModuleFind(network, node.scores, edge.scores, weightratio.edge.node = 1,
ncluster, method)
network |
igraph or graphNEL object with nodes and edges with default node scores and node names, the edges with names and scores |
node.scores |
The vector of scores of the corresponding nodes in network the names of the node.scores are the names of the nodes in the network |
edge.scores |
The vector of scores of the connecting edges of all the nodes in network the names of the edge.scores are the names of the edges in the network, which is the names of two connecting nodes in the network joined with "_" |
weightratio.edge.node |
The weight ratio of edges scores versus node scores with default value 1, reflecting the weights of the nodes and edges in the network at object function |
ncluster |
The prespecified number of signaling clusters |
method |
Two possible fixed input values-"NodeOnly",apply Dittrich's heuristic algorithm based on node scores only(Dittrich 2008) or "NodeEdge" optimizition based on both node scores and edge scores |
The list of multiple possible optimized subnetworks in igraph format with attributes node and edge with both name and scores for both nodes and edges, the length of the list equal to ncluster
MT. Dittrich, GW. Klau, A. Rosenwald, T. Dandekar, and T. Muller Identifying functional modules in protein-protein interaction networks: an integrated exact approach. Bioinformatics, 24 (13): i223-231, 2008
D.Beisser, GW. Klau, T. Dandekar, T. Muller, and MT. Dittrich. Bionet: an r-package for the functional analysis of biological networks. Bioinformatics, 26 (8): 1129-1130, 2010.
dat1<-matrix(rnorm(4000),ncol=40,nrow=100)
colnames(dat1)<-paste("Var", as.character(1:40),sep="")
# simulate the p values for all the possible edges in the network
ind.pos.pval.edge<-rbinom(40*39/2,1,0.5)
pval.edge<-(1-ind.pos.pval.edge)*runif(40*39/2)+ind.pos.pval.edge*rbeta(40*39/2,0.1,1)
names(pval.edge)<-unlist(sapply(1:39,function(i){sapply((i+1):40, function(j){paste(paste("Var",
as.character(i),sep=""),paste("Var",as.character(j),sep=""),sep="_")})}))
# simulate p values for all the nodes in the network
ind.pos.pval.node<-rbinom(40,1,0.2)
pval.node<-(1-ind.pos.pval.node)*runif(40)+ind.pos.pval.node*rbeta(40,0.1,1)
names(pval.node)<-paste("Var", as.character(1:40),sep="")
# generate the node score-NodeScore, edge scores-EdgeScore and igraph object-Network
network.test<-uniform.beta.node.edge.score(pval.node,pval.edge,0.05,0.05,dat1)
network.test1<-network.test$Network
node.scores<-network.test$NodeScore
edge.scores<-network.test$EdgeScore
#identify all possible signaling modules in simulated network
# using Dittrich's method using node scores only
multi.mod.e<-MultiModuleFind(network.test1,node.scores,edge.scores,
weightratio.edge.node=1,ncluster=3,method="NodeOnly")
# identify all possible signaling modules in simulated network
# using our proposed method based on node scores and edge scores
multi.mod.n<-MultiModuleFind(network.test1,node.scores,edge.scores,
weightratio.edge.node=1,ncluster=3,method="NodeEdge")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.